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

Subreport passing in prior group's shared var

Status
Not open for further replies.

rmedh5393

Technical User
Jan 17, 2006
1
US
This question is similar to thread767-1005386

I am using CR 8.5 with ODBC connection to SQL database.

I have a main report showing client contacts for a time period designated by two date parameter fields. The report is grouped by clientID.

In the group header (GH-a), I have a subreport that is linked to the main report by the clientID in order to pull in the minimum contact date (even if it occurred prior to the date parameters in the main report).

The minimum contact date is then a shared datevar and is being used in GH-b to evaluate if the client was new (first contacted) during the main report's date parameters ({@new}).

The shared variable of min contact date is being incorrectly passed to the subsequent clienID group. So the minimum date for client A is being used to determine if client B is new.

I was assuming that GH-b would be considered a later section than GH-a and work around the problem of needing to call the shared subreport variable in a section after the subreport. Is this assumption wrong? I have tried listing my shared datevar of min contact date in GF-a and it does evaluate correctly, but even when I list {@new} in GF-b it does not evaluate correctly.

I tried resetting the shared min contact date and that did not solve the problem. I also tried playing around with using EvaluateAfter({shared datevar min contact date}) at the beginning of my {@new} formula instead of WhilePrintingRecords, but that also had no result.

Any thoughts would be greatly appreciated.
RME
 
You should place a shared variable reset formula in the Group Footer. Also, what is your formula for comparing the main report date to the subreport shared variable?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top