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!

shared numbervars are showing up, but not in right colomns...

Status
Not open for further replies.

cmpgeek

Technical User
Feb 11, 2003
282
US
i have finally gotten a handle on the shared variables (thanks to all who helped); but now the problem is that,
for some reason the variable that is for patient #1 shows up in the row for pt#2 when it comes across to the main report... in case i am talking in circles here is an example

........MAIN REPORT............ .....SUBREPORT......
pt #1 #1s acct number "0" "110" (#1s variable)
pt #2 #2s acct number "110" "130" (#2s variable)
pt #3 #3s acct nunmber "130" "70" (#3s variable)

i can not figure out why this is, but would appreciate it so much if someone could help me figure out how to correct it...

thanks
 
Where is your subreport executing?

It appears that you should have a group by patient, and have the subreport fire in the group header. Then the subreport shared variable will be available for that group (patient) throughout the details and group footer.

-k

kai@informeddatadecisions.com
 
i also just realized that when the subreport field that is the variable came back with a null result, that when the variable came across to the main report it repeated the last variable again instead of putting a 0 there...
i dont know if that will help figure this out or not...
 
ok - regrouping fixed it so the variables DO show up with the right patient; but the one that is NULL still has the previous variable showing up there... is there anything i can add (conditional formatting or whatever) that will prevent this?
 
In the group footer, after the value has been displayed, (or in the group header before the subreport), reset the value of the shared variable.

Use an formula like:

WhilePrintingRecords;
Shared NumberVar MyVariable := 0;

Naith
 
that did it! thank yall so much... i am finally getting a better understanding of variables and how to use them...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top