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

Sub reprot problem again

Status
Not open for further replies.

haneen97

Programmer
Dec 10, 2002
280
US
Hi,
I have a sub report that is expecting a date range from the main report. The sub report seems to be only querying data for the last date in that range. The parameter field is set to range on both the main and the sub reprots. Please help.

Thanks

Mo
 
Consider not putting a parameter in the subreport, rather pointing the main report parameter to the fields in the subreport.

In either case, you can verify what is being used by the subreport by right clicking the subreport and selecting eidt subreport, and then check the Report->Edit Selection Formula->Record

You can also verify what is being passed to the database by ckecking the Database->Show SQL Query in the subreport.

-k
 
If you have a daterange parameter already set up in the subreport, you can link the subreport to the main report by selecting the parameter for the main report and when choosing the parameter for the subreport, use the dropdown list on the bottom left (at least in 8.0) of the edit subreport links screen to choose {?daterange}, not the default {?pm-?daterange}.

-LB
 
I tried that. It is still not working. I am going crazy here.

Mo
 
That information is not really helpful. Please explain where your subreport is located and exactly how you linked the subreport to the main report. It might also help to know the overall group structure of your main report and your subreport, and what you are trying to achieve with the subreport.

-LB
 
I wish there is a way that I can attach the .rpt. You could see what I mean.

Mo
 
I found it guys. Gosh my head hearts ?.

Something about the sub report in 8.5 that does not accept parameter dates as range. It only reads it as a discrete field. So I converted that date range in the container report to two dates and passed them as start date and end date. In the sub report, I added grater than or equals to start date and less than or equals to end date in record selection. It worked like a champ.

Thanks for all your help.

Mo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top