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

Passing parameter values by formula in CRS XI

Status
Not open for further replies.

KKST

Programmer
Jan 30, 2006
9
0
0
US
Hi all,

I've a report developed using command objects and has two date parameters (Start Date and End Date).
This report will be published using CRS XI and is scheduled to run 2nd of everymonth and date parameters
values should be 1st day of the previous month is Start Date and Last day of the previous month is End Date, always.

Now I want to pass parameter values to the report automatically everymonth.

So how can I implement this? I've developed two formauls to calculate 1st day and Last day of the previous month
and use these formulas inplace of Paramters.

Is this correct way of doing it? Or is there any other way to do this within CRS XI actually without modifying the .RPT file?
Please suggest.
 
If you are always running the report for last month then the date range can be calculated right in the SQL. Should not be necessary to use a parameter.
 
I've another 50 reports ready for publishing. Some of these reports have different scheduling times.
Thats the reason I want to do it in Crystal Reports or CRS XI if possible to do so.

Thanks,
kkst
 
At first I was going to say that you were absolutely correct by your writing 2 formulas (as I assume put into the select expert) to replace Parameters UNTIL I got to your comment " ...Or is there any other way to do this within CRS XI actually without modifying the .RPT file? How you modify the report without modifying the .rpt?


DataDog
'Failure Is Not An Option'
 
Do you care if the SQL sent by Crystal to your database is efficient. If so, then please include some information about the database, drivers(OLEDB, ODBC, Native). How many records in the largest table. If you use formulas double check the SQL that is sent to the database to make sure there is sufficient criteria in the Where Clause.
 
I mean, instead of modifying .RPT file to replace parameters with formulas, is there any alternative in Crystal Enterprise where I can pass formula based parameter values, so that I need not to change .RPT file.

If there is no alternative, then I've to modify .RPT file anyway. Actually I use AddCommand objects.

Thanks,
--kkst
 
O.K. NOW I understand..... If you can go into the CMC for the report, Click on Process, then Filters. You can replace your ?parameter with the CONTENT of your formulas.

The disadvantage of this is that then you would have 2 "things" out there with the same name but operating differently.

DataDog
'Failure Is Not An Option'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top