Discussion Locked

I want put parameters in crystal rep 8.5

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a SQL Server database, and using the Crystal Report 8.5 I want put parameters to the report, How can I do it ?, I wish create queries in runtime with Crystal Reports 8.5.

If you have a sample program using queries and Crystal Report 8.5, please send me.
Actually the old report (rpt files) doesn't refresh the datasource in the preview and printer using the crystal report version 8.5.

7 replies

by sl-campbell

There are several ways this can be done but you are going to need to do some searching and experimenting on your own:

You can base the report on a SQL statement set in CR. When a new standard report is created, you can select "SQL" and build a statement. Then at run time you can change the "WHERE" criteria by passing what you want to the report.

Or, you base the report on a database and either make Parameter fields, or, pass record selections and formulas to the report to affect the records returned.

Or, you can pass an array of data to the report.
Check out the CR "Help for developer's" help file (installed with the CR program) under "Using the Crystal Data Object", and "When to use the Crystal Data Source Type Library"!.

Or,you can pass a recordset (DAO/ADO) to a external report created using a definition file. For this, check out "Using the Active Data Driver" in the same help file or go on-line to the Crystal Care Technical Support Knowledge Base Articles: c2002281,c2002848,c2003548,c2002748.

by miss kitty

Hi. In Crystal, go to the fields icon (next to the 'ab' on the middle toolbar and select parameters. When you give your parameter a name, put an @ sign in front (for example: @fromdate). The user will be prompted to enter the parameter when they run the report.You can display the parameters on the report just like you do data fields.

To create queries in Crystal, go to the same place where you went to create the parameter only click on sql expression fields and create a new one.
On the old report, make sure that in the report options, you are not saving the data with the report. You want to delete any saved data when you open the report so it will refresh when it opens.

Cathy
covcat@riverstonegrp.com

This discussion is closed to new replies.