Hi all and thanks for any help but I am still having problems using a shared variable. the background is I have a report showing stock information and need to include on it total demand from the workshop (held line by line in a second file)
I created my main report and a sub report which totaled the workshop demand and tried to use a shared varaible to pass this back to the main to calculate free stock. the definition in the main report is
formula field mainformula defined as
whileprintingrecords;
shared numbervar mytotal;
mytotal
in the sub report i have subformula defined as
whileprintingrecords;
shared numbervar myTotal:= sum({@Needed})
all works well so long as there is a demand and records exist in the sub report if not the previous total is returned. I understand I need to reset the variable to zero but how do I do that I can only have one definition of the field cant I? People have mentioned having
mytotal:=0
at a level above the subreport but isnt the definition of a formular the same regardless of level or am I being a real plonker?
Thanks in hope
I created my main report and a sub report which totaled the workshop demand and tried to use a shared varaible to pass this back to the main to calculate free stock. the definition in the main report is
formula field mainformula defined as
whileprintingrecords;
shared numbervar mytotal;
mytotal
in the sub report i have subformula defined as
whileprintingrecords;
shared numbervar myTotal:= sum({@Needed})
all works well so long as there is a demand and records exist in the sub report if not the previous total is returned. I understand I need to reset the variable to zero but how do I do that I can only have one definition of the field cant I? People have mentioned having
mytotal:=0
at a level above the subreport but isnt the definition of a formular the same regardless of level or am I being a real plonker?
Thanks in hope