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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert a parameter into Crystal Report 4.6

Status
Not open for further replies.

nata66

Programmer
May 15, 2002
4
US
The problem here is that I cannot figure out how to define parameter fields in the design of the report. Later versions of Crystal Reports are supposed to have the option to insert a parameter under the "Insert" menu at design time. This version does not have this feature.

 
4.6 doesn't have parameters - it's over 4 years old.
Get 8.5 Andrew Baines
Chase International
 
Thank you,
But seriously I can't update the version, the project was written few years ago and I need just make some updates.

Anyway, it is supposed to be a way to set up a page number cross multiple reports: to pass the "first" page number of each report from VB program. (Like for example first report has 2 pages, then next report, if it has 3 pages, starts from #3page to 6)
If it is not possible to use parameters, I need to figure out how to pass data from VB program to Crystal report
4.6.

Thanks for your help anyway.
 
I know of a large software company that hacked the CR4.6 report structure to pass report parameters in from their application. They've had to rewrite everything to be able to upgrade to later versions - not pretty.

Only options I can think of-
Base the report on a view and change the WHERE clause of the view at run time.
Stored procedure - not sure if 4.6 supports them.
Create a temp table and populate the table before the report runs.
Use the report creation API to modify the report in code - Crystal won't give that to you, but it comes with 8.5.
Andrew Baines
Chase International
 
Stored Procedures work in CR4.6 Make sure you go into the SQL tab in the File/Options menu and check off Stored Procedures

To set the variable in the stored procedure, use StoredProcParam to set the variable in the stored procedure.
IE. cr1.StoredProcParam(0) = SomeVariable

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top