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

Creating Subreport Links 1

Status
Not open for further replies.

Yerdon

Programmer
Jul 29, 2002
62
US
I know this should be easy but I just can't put my finger on how to do it. I have a subreport that I imported into my main report and now I want to pass a date parameter to it so that I can filter the subreport in the same way that I do the main report...

However, when I open the "Change Subreport Links..." box I can put the date parameter in the "Fields to link to" box, but then there are no fields to choose from in the dropdown that is under the "Select data in subreport based on field:" - that box has no fields! So when I hit "OK" it just closes and no link is created...

What am I doing wrong? Please help!
 
I'm not in the same league as most of the people in Tek-Tips as I regularly get lost in some of the threads but in my humble experience, this is because the field type you are linking is not present in the sub-report.

As it is a date parameter, it is probably most likely that all the "date" fields in the sub-report are actually datetime fields.

A way (and I'm sure other people will have better options) is to set up a formula in the sub report that changes the datetime field you wish to link to a "date" ie date({field}). You should then be able to link to this formula from the main report.
 
I have found that while sometimes the problem is caused by different data types there are other times that the data types are the same. What I did was add a data column instead of the parameter and that primed the drop down list with the parameters from the subreport. Then add the parameter and the drop downlist should still have the parameter from the sub report. Then remove the column.

Hope that helps

Kevin McManus
kevin@mcmanusreporting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top