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

Shared Variable Was Working Renamed it and now no longer working 1

Status
Not open for further replies.

AnnetteB1305

Technical User
Aug 17, 2011
166
GB
Hello,

I have a report and in this report I have had to create a subreport which gives me 2 running totals of number of calls from specific helpdesk group members one for month selected and one for previous month. I have to also report these on a summary in my main report.

So I have created 2 shared variables being


//HdeskAssignedCalls

WhilePrintingRecords;

Shared NumberVar HdeskAssignedCalls;

HdeskAssignedCalls:={#Tot#HDUnique}


and


//PrevHDUnique
WhilePrintingRecords;

Shared NumberVar PrevHDUnique;

PrevHDUnique:={#Tot~HDUniquePrev}


and then in my main report created

//HdeskAssignedCalls
Shared NumberVar HdeskAssignedCalls;

HdeskAssignedCalls

and

//PrevHDUnique
WhilePrintingrecords;
Shared NumberVar PrevHDUnique;

PrevHDUnique


The @PrevHDUnique wasn't working but the first variable was but I roiginally named it @sharedvariable. I have the variables in my report footer in my sub report and they work when displayed there, however using the variables on my main report I just get 0.00

Any help would be appreciated, I looked at this till midnight last night and all this morning and I know it's something blaringly obvious but I've been obviously looking at it too long

Thanks,

Annette
 
The subreports have to be located in a report section above the one where the shared variables are being referenced, so if the subs are in the report footer (e.g., RF_a), the variables will be correct only if referenced in a lower section, e.g., RF_b.

The name of the formula is irrelevant. Only the names and types of variables must remain consistent.

-LB
 
My subreport is in RHb and I have inserted the variable in RHc but not working
 
Did you suppress or hide RH_b or the subreport? Shared variables won't pass if you do that. Instead, suppress all sections WITHIN the subreport, format the subreport (format->subreport->subreport tab->check "suppress blank subreport", and then in the main report->section expert->RH_b->check "suppress blank section".

-LB
 
No I am showing details from the sub report not hidden any of the section where the subreport is have hidden a couple of things in the subreport but other than that all should be ok
 
So you have not suppressed the subreport in the main report or the RH_b. Did you copy and paste the actual formulas you are using. The problem has to be one of these things. Suppression/hiding of the sub or main report section, placement of formulas in the wrong sections, or the variables don't have consistent names or do not consistently reference "shared".

-LB
 
I'll double check everything now I have fresh eyes and let you know
 
Right I removed the subreport and the variables from the main report and then put the subreport back and one of the variables and all worked fine. When I brought the second variable in it broke.???

Any ideas?
 
Would it be that I am trying to bring the sharedvariable into RHb as well as RHc and the subreport is in RHb?
 
That's what it was I have inserted a section above put the subreport there and suppressed everything in the subreport and then used variables in RHB and RHC

Thanks for your help,

Annette
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top