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!

Subreport and subreport shared variables

Status
Not open for further replies.

dellguy

Programmer
Aug 14, 2001
70
CA
OK this is a strange one. My report shows 4 fields from a table. After the 4th column I have a subreport that displays 2 shared variables that are calculated in the subreport. After that, I show the individual shared variables from that are also defined in the main report. The individual shared variables show the same values as the shared report except on the next detail record in the main report. Example:

.........................................subreport.....shared.variables
part....desc....qty....uom.......ft......lbs.......ft......lbs
123.....abscd...3......each.....27....150.......0.......0
234.....ccvcc....6......each.....42....360.......27.....150
656.....fvdfv.....4......each....24....200.......42.....360

Any idea why the values from the shared variables in the main report are lagging behind what is in the same shared vaiable fields in the subreport? The values under the subreport columns are correct.
 
is the subreport in the details section?

Can you put the subreport in the report/group header and see what values you get?

If you cannot move it, you may try creating a new details section below your current details, moving the current values into the bottom details and the subreport into the top details, then suppress the subreport and show the shared values in the bottom details.

The values will not 'share' until they have been calculated, so the earlier in the report the subreport is, the easier it is to accurately display the values later in the report.

I hope i have helped and not misunderstood &/or muddied things.
 

Creating a detail lines A and B and putting the subreport in A and the shared variables in B did the trick.

Thanks for the solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top