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

conditional linking to subreport

Status
Not open for further replies.
Jul 21, 2001
102
US
I have a subreport linked on a date to the main report. I would like to toggle between using different date fields-- date1 and date2 based on a parameter.

If parameter1 = 1 then date1
else if parameter1 = 2 then date2

This requires linking using a formula on the subreport side and is very slow compared to using set date field. Is there a more efficient way to do this?
 
I can understand a slight overhead, but it shouldn't be that significant.

If it's that bad, then instead of using a formula, copy the subreport and place it in a section below (right click the section and select insert section below) and join to one of each date fields respectively.

Now conditionally suppress the subreport sections based on the parm (right click the section and select format section->X-2 next to suppress), as in:

{?parm} = "Date 1"

Perhaps the subreport isn't passing the SQL to the database as a result, please post the actual formula used, and check the Database->Show SQL on the subreport.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top