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

Passing Date Range To sub report 1

Status
Not open for further replies.

ganjass

Technical User
Dec 30, 2003
154
GB
CR9

Hi all,

I'm trying to pass the date range from a main report to a sub report, but it only seems to be passing the maximum date value. I also tried to use a multiple dicrete list as well but only the last value was pased. Does a paramater field only supply 1 value to a subreport. If so how would i pass multiple values from the main to the sub reoprt.

Thanks in advance

 
Edit your parameter field in the main report, and see if it is a discrete value, a range value or a multiple value parameter.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
The date parameter is a range, and the string parameter is set to multiple values. I've also tried changing the parameter links in the report so that they are the same as the main reports any ideas?
 
I've also used join(pm-param,",") for the string to see what is being passed and its only the one string out of 3 being passed on the main, which is the maximum string. I've never had this problem in the past usually its just a case of setting the links and away you go.
 
I'd suggest creating formula fields with the two ends of the range. Then pass these.


Madawc Williams
East Anglia, Great Britain
 
Older versions of CR wouldn't link a range or multi value parameter to a subreport.

CR8.5 onwards seems to do this.

Either upgrade or create a formula to calculate the Maximum and Minimum and link them seperately.

Editor and Publisher of Crystal Clear
 
I use the following to create my 28 monthly subreports under one main report

The following is equivalent to the last two months

@FrDt
//Date range From

dateserial(year(currentdate),month(currentdate)-2,1)

@ToDt
//Date Range to

dateserial(year(currentdate),month(currentdate),1-1)


Specify the above formula as subreport links with no subreport data fields specified.

?pm-@FtDt
?pm-ToDt


From the subreport, I use the links in my select expert formula

Data.datefield in ?pm-FrDt to_ ?pm-ToDt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top