Author |
Message |
Padma
Newbie
Joined: 09 Sep 2010
Location: India
Online Status: Offline
Posts: 20
|
Topic: how to pass parameter automatically from the DB Posted: 14 Dec 2010 at 6:59pm |
HI,
I am using crystal report 2008 and oracle DB.
Parameter field is not getting automatically from the database. If any changes made in the database at the backend is not reflecting in the parameter filed in the crystal report after updating the DB.
Im currently update the parameter field manually by clearing and appending from db.
Is there are any other ways to update the parameter field automatically from database?
thanks in advance,
Padma
|
priya
|
IP Logged |
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
|
Posted: 15 Dec 2010 at 3:15am |
use a command object. place your sql select statemtent there and use that table for the parameter list. This will allow the parameter list to be current with the database.
In Database Expert, select your connection and then select Add Command
HTH
Edited by lockwelle - 15 Dec 2010 at 3:16am
|
IP Logged |
|
Keikoku
Senior Member
Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
|
Posted: 15 Dec 2010 at 3:23am |
Use 'dynamic' parameters along with the Command.
Then specify which field(s) your want the parameter list to come from.
Edited by Keikoku - 15 Dec 2010 at 3:25am
|
IP Logged |
|
Padma
Newbie
Joined: 09 Sep 2010
Location: India
Online Status: Offline
Posts: 20
|
Posted: 22 Dec 2010 at 12:59am |
hi,
Thanks for your help, since im a beginner to crystal report can you advice me in details how to do it
Thanks,
Padma
|
priya
|
IP Logged |
|
Keikoku
Senior Member
Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
|
Posted: 22 Dec 2010 at 2:50am |
I don't use 2008 I'm assuming the process should be somewhat similar.
When you have created a command, edit your existing parameter to be "dynamic" (instead of "static") and then select the column from the table that you want your list to retrieve its values from.
Hit OK, then either use a selection formula or just drag your parameter onto the report.
|
IP Logged |
|
Padma
Newbie
Joined: 09 Sep 2010
Location: India
Online Status: Offline
Posts: 20
|
Posted: 22 Dec 2010 at 8:12pm |
Thanks for your guidance, im able to do that and it also works. But if i choose dymanic for parameter selection when im running the report im not able to choose all the paramter.
Eg. Say if there are 3 countries in the parameter im able to choose either the 1 or 2 or 3 country, im not able to give an option likk ' ALL' to choose all the 3 countries detail.
Can you suggest is there anyway to handle this situation.
Thanks,
Padma
|
priya
|
IP Logged |
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
|
Posted: 23 Dec 2010 at 3:24am |
use a union in your command object to add an ALL option and then add the code to handle the parameter in either the stored proc or the selection criteria
|
IP Logged |
|
Keikoku
Senior Member
Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
|
Posted: 23 Dec 2010 at 4:33pm |
You can also allow multiple values to be selected by the user. It's one of the options when you're setting/editing the parameter.
The window for selecting multiple values allows users to include all the values with a >> button.
Edited by Keikoku - 23 Dec 2010 at 4:34pm
|
IP Logged |
|
ishu1404
Newbie
Joined: 03 Jan 2011
Location: India
Online Status: Offline
Posts: 12
|
Posted: 10 Jan 2011 at 7:56pm |
Hi,
I have created a command object as follows:
SELECT BRANCH_CODE FROM STTMS_BRANCH UNION SELECT 'ALL' FROM STTMS_BRANCH
Also i have created a dynamic parameter as specified but i am not able to link the branch code column with the parameter i have created.
I am not able to see any option to link. Request you to please guide me how to link the column with parameter...
Thanks
Ishu
|
IP Logged |
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
|
Posted: 11 Jan 2011 at 4:28am |
you don't link the parameter to the table, you use it to filter out the unwanted values.
Report/Selection Formulas/Record...
Here you can test if the record is 'valid' for the parameters supplied.
HTH
|
IP Logged |
|
|