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

On demand subreports and SQL SP Parameters

Status
Not open for further replies.

mrees

Programmer
Feb 20, 2003
197
GB
Hello all
Crystal Reports/Enterprise 9
SQL 2k.

I have a Crystal report that runs each day, reporting the previous days posistion (subject matter is not important). We keep the last 40 historical instances for the users to view at will. What I want to do is add several on demand subreports, that contain subsets of data from the main report, that are in a format that the users can print/export. My problem is that as the data from the underlying SQL dataset is so large, I would ideally like to filter the data in the subreports within the SQL, which the main criteria is the report run date.

Is there a way that I can pass the report run date (held in the main report instance) to a SQL stored proc to return the same days data to the sub report? Because at the moment if an instance of the report is viewed that is more than 1 day old, the sub reports won't work as they currently filtered on getdate()-1 in the SQL SP. I hope this makes some sense and that someone out there can help.

mrees
 
You might try creating a formula in the main report which contains Datadate, and changing the on demand subreports parameter to use a link to that formula.

In theory it works...

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top