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 date over parameters 1

Status
Not open for further replies.

jehanzebn

Programmer
May 28, 2001
244
0
0
Dear all,

I have created a report which consists of 3 sub reports. All three sub reports uses different date fields from different tables (though the database is the same). The main report uses its own date field which is from another table.

So, there are 4 reports in all

Main Report takes date field from table A
Sub Report 1 takes date field from table B
Sub Report 2 takes date field from table C
Sub Report 3 takes date field from table D

Now when I run the main report, it asks me to input dates 4 places (total of 8 places where I have to replicate same date each time I run the report.

Now to over come this I linked the Date parameters of the main report with the date fields of the sub reports.The problem occurs when the results are shown.

All of the results are incorrect except the main report results.

I am wondering how can I pass dates which I have entered into the main report parameter field to all sub report fields so that I don't have to enter dates 8 times each time I open a report.

Here is the record selection formula for main report date field
Code:
({foccredsum.date_created} in {?Start Date} to {?End Date})

Sub Report Record Selection formula A
Code:
({order_progress.date_created} in {?Pm-?Start Date} to {?Pm-?End Date})

Sub Report Record Selection formula B
Code:
({order_progressed.date_created} in {?Pm-?Start Date} to {?Pm-?End Date})

Sub Report Record Selection formula C
Code:
({order_header.date_entered} in {?Pm-?Start Date} to {?Pm-?End Date})

How can I integrate the date parameters of the main report with the sub reports so that when I enter one single date range all of the reports filter accordingly.?

I have placed the Shared vars into the report Group footer and the sub reports are placed on the Report Header b.


Regards

Jehanzeb

Jehanzeb
Crystal Reports 2008
Visual Studio 2008
Informix Database
 
You should create the start and end parameters in each of the main and subreports, and add the desired selection criteria into each selection formula area. Then in the subreport linking screen, use the dropdown in the lower left corner to select {?start}, not the default {?pm-?start}. Repeat for {?End}. Then you should get only two prompts, one for each parameter.

-LB
 
Should the ?Start and the ?Stop for both the main and subreport be the same fields or just have the same Prompting text?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top