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

Passing dates from subreports???

Status
Not open for further replies.

PQTIII

IS-IT--Management
Sep 21, 2004
110
I have these fields @startdate ans @enddate that finds the min(date) and max(date) and then returns it to the main report as a date range heading. I'm not sure how to use date variables.

I tried this:
Sub report-

WhilePrintingRecords;
shared datetimevar sdate :=Minimum ({hist_exproot.shiftdate})

When I used this it says " a variable cannot be redeclaried with a different type," but the {hist_exproot.shiftdate} is a DateTime field. How do I pass this min date back to the main report?


Thanks Paul
 
The message means that you have declared a variable "sdate" as some other kind of variable in a different formula. So check your formulas to make sure you have consistently declared the variable as "shared datetimevar".

-LB
 
LB

It helps to know what you're looking for, I found it. Thanks, that was right on. I did have it named something else in another subreport. It works now, but I want the field to show after the report title as a date range(of the data). It doesn't because the sub report is called after the report title and proposed date range prints.

If I put the shared datetimevar @sdate in the report footer is shows fine. How do I get @sdate back up to the report header after the subreports run?

Thanks Paul
 
If the date range is determined only by the subreports, then you would have to insert a copy of the subreport in the report header in order to use the date range there. You could display only the subreport report header or footer and use this to display your date range.

-LB

 
Lb

I'll do that. Thanks again for your help.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top