Print Page | Close Window

how to pass parameter automatically from the DB

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=11867
Printed Date: 18 May 2024 at 8:04pm


Topic: how to pass parameter automatically from the DB
Posted By: Padma
Subject: how to pass parameter automatically from the DB
Date 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



Replies:
Posted By: lockwelle
Date 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


Posted By: Keikoku
Date 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.


Posted By: Padma
Date 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


Posted By: Keikoku
Date 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.


Posted By: Padma
Date 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


Posted By: lockwelle
Date 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


Posted By: Keikoku
Date 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.


Posted By: ishu1404
Date 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


Posted By: lockwelle
Date 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


Posted By: ishu1404
Date Posted: 11 Jan 2011 at 10:25pm
hi ,
 
  I think i got the problem but the solution is still unknown..Actually when i am creating the dynamic parameter and choosing "NEW" data source i am not able to see any object in the Value column. Only "NONE" is getting displayed. I think because of this i am not able to proceed with the prmpt creation...
 
  I am getting data in the report so the possibility of not connected to the datasource is also not there.
Can anyone help me out why the objects are not getting displayed?
 
Thanks in Advance
 
Ishu


Posted By: Keikoku
Date Posted: 12 Jan 2011 at 4:19am
When you choose NEW, you go to the table below and select the field you want.

Click ok, and when you go back to edit your parameter, you should see that your parameter is retrieving values from the correct field.


Posted By: ishu1404
Date Posted: 20 Feb 2011 at 12:20am
Hi,
 
 When i checking new and going to the value column the only value that i can see is "NONE" no table nothing is coming.....any idea "NONE" is getting displayed?
 
Thanks in AQdvance
Ishu



Print Page | Close Window