Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing parameters at runtime

Status
Not open for further replies.

tmunson99

MIS
Jun 18, 2004
62
US
Is it possible to import parameters at runtime in Crystal XI? I know you can import a static list of parameters, but I'd like to be able to decide at runtime what to import and it may be lengthy enough that I don't want to have to pick through thousands of field values to pick my parameters. In other words, suppose I maintain a lengthy list of project numbers in Excel or a text file. Can I use this file, at runtime, to populate a parameter that accepts multiple values? I'm thinking maybe this can be done via an array and file location but would like to know if anyone else has any ideas or even how to formulate an array for this to work. Thanks!
 
CR XI can use a table as the source for dynamic parameters, and if you had an ODBC connection to your Excel file or text file, you could use a Command Object and issue a select.

That said, this allows you to populate the parameter pick list, your question is a littel unclear as you talk about importing parameters, not importing parameter values, adn then later you ask about using Excel or a text file which sounds like parameter values, but then it appears that you don't want to have the user then click the select all in the parameter list, rather automatically populate and then run, which is possible as well by setting up the record selection to have a default of ALL or some such.

Anyway, if you're inquiring about populating parameters from external code, such as VB or some such, we need to know that as well.

Some clarification and stating your software version would be helpful.

There are also 3rd party Crystal viewers that can populate parameters dynamically which work for versions prior to XI.

-k
 
Thanks for your reply. Sorry about being vague. I want to be able to import parameters values from a text or Excel file that a user has maintained. For example, suppose I have a database table with 10,000 account IDs and, for whatever reason, I have a text file listing 150 of these IDs. I want to use this text to file to import the parameter values at run time and then use those parameter values in my select statement. I realize I can use dynamic parameters and select those 150 accounts but I have them in a text file.
 
No need for a parameter.

Create an ODBC DSN for that text file.
Add it as a 2nd data source.
Join on Account_ID.
Only records that match would survive the join, so you are done.

- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks Ido. I can see where that would work. I develop Crystal reports for BOE XI so I need to go one step further to determine how to make it so that an end user can do this from InfoView. Plus it sounds like it's an either/or deal. The parameter values either have to come from the Excel/text file or from a database. It would be nice to determine that at run time because multiple users use the report.
 
If you need it to act as a parameter, then follow the suggestion by K.

- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top