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

help with calc?

Status
Not open for further replies.

croiva25

Technical User
Dec 3, 2003
125
AU
Have a repot with a subreport, this code below is the forumula code within the subreport where I am trying to have the total from two columns displayed

WhilePrintingRecords;
Shared NumberVar dTotalA;
Shared NumberVar dTotalB;

if({rptRemovalistCrosstab.RemovalistNumber}=1) then
dTotalA:=dTotalA + {rptRemovalistCrosstab.Removals}
else
dTotalB:=dTotalB + {rptRemovalistCrosstab.Removals};

So that was before and that was great,if Removalist 1 was used create dTotalA else dTotalB, now we are looking at the selected Removalist which could be one or more, and that is a bit field.

So how can I create totals if I have more then one Selected=true

WhilePrintingRecords;
Shared NumberVar dTotalA;
Shared NumberVar dTotalB;

if({rptRemovalistCrosstab_01.Selected}=true) then
dTotalA:=dTotalA + {rptRemovalistCrosstab_01.Removals};


hope this makes sense and somebody can help me

thanks
 
I think you'd be better starting from scratch using running totals. Once you've learned how to use them, they are much simpler for most purposes.

It helps to give your Crystal version, since newer versions have extra options, and some extra problems. I use Crystal 8.5

Madawc Williams (East Anglia)
 
Once again, using 8.5.

Have not been introduced yet to running totals, I will do a search and hopefully find something, a good example.
In the mean time if somebody has a suggestion or a good link for me to find something about it I would really appreciate it.

Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top