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, Shared NumberVar Problem

Status
Not open for further replies.

scott1971

Technical User
Apr 20, 2005
125
EU
Thanks to you guys and lbass in particular I thought I had sussed linking subreports but alas I was wrong.

I'm using Crystal XI and I have two reports, a main one showing productivity and a subreport showing time in seconds (it is this field that is my shared numbervar).

whileprintingrecords;
Shared NumberVar AuxTime:= sum({magent.ti_auxtime1},{@User Name})

I can get the reports to almost link by placing the subreport in the GH2 (User ID) of my main report, GH1 is a grouping on Department and then linking the subreports on User although I had to create the subreport user list with a formula as the reports come from different databases and as always there was no direct link.

The problem I have is that the shared numbervar places a '0' against the first User ID which means each subsequent User has the time for the person below them.

Sorry, this has got me lost, head hurts already and I've only been at this for 4 hrs this morning!
 
When subreports return a value, the value will be zero or blank in the section calling the subreport. Only the section below will have the value. Is that it?

If so, you just need to create another GH2 section below the one with the subreport.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Madawc, many thanks for this, can't believe it was that simple. It's sorted the problem and the headache. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top