I have a report where there is a sub report inside its page header and footer.
The subreports have a control inside that needs to change color based upon a value in the detail section.
I tried to pass a parameter into the subreport inside the detail format sub(as well as page header format and page footer format), but it does not seem to work. The color almost seems random.
Here’s the code I used for that:
If DateDiff(“d”, e100_date, dNewImageDate) <= 0 Then Subreport1.Report.Parameters("Parameter1").Value = True Subreport2.Report.Parameters("ShowNewLogo").Value = True Else Subreport1.Report.Parameters("Parameter1").Value = False Subreport2.Report.Parameters("ShowNewLogo").Value = False End If
e100_date being a value set in FetchData, and dNewImageDate being a static value that is set at the top of the page.
If I avoid using sub reports I can get the item to change color correctly to match the detail item on the page, but there are several reports doing this same thing so getting this to work with sub reports would be very useful.