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

ok here we go, i have 2 sub reports

Status
Not open for further replies.

konad

Programmer
Jan 5, 2001
43
US
ok here we go, i have 2 sub reports that contains this info:

this sub report uses a call time from the main report and subtracts the StatusDateTime from it.
CallTime:= 09/09/00 4:30PM
___________________________________________________________
RadioID: 210 Status: D StatusDateTime: 09/09/00 5:00PM TotalMinutes: 30
RadioID: 400 Status: D StatusDateTime: 09/09/00 5:05PM TotalMinutes: 35

this sub report uses the StatusDateTime from the above subreport and subtracts its StatusDateTime from it. however, i need to seperate each StatusDateTime from above by each RadioID so that i can calculate for each instance of a unique RadioID, anyone know how i might do this? ive tried some simple if statements and crystal seems to ignore them quite nicely :)____________________________________________________________
RadioID: 210 Status: C StatusDateTime: 09/09/00 6:00PM TotalMinutes: 60
RadioID: 400 Status: C StatusDateTime: 09/09/00 6:05PM TotalMinutes: 65

crystal is only using the first StatusDate time from the First sub report to calculate the 2nd's time, i want it to do it for each RadioID.

sorry for the lengthy post
 
konad: The key to using subreports and transferring variables is to ensure that your subreport runs at the correct frequency and delivers the correct result to the shared variable BEFORE you need to use it.

In your example the first shared variable would be in the main report and would 'store' the result of the StatusDateTime. There would be a matching shared variable in each subreport to 'get' the result.

Each of the subreports would then need to be placed in either a group header or footer in the main report which would be grouped by RadioID and linked between the main and each sub on RadioID. This would ensure that the subsequent shared variable value retrieved from the subreport was that for the corresponding RadioID and that it would execute once for each RadioID.

HTH David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top