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

add a column that is a shared varable to get total. 1

Status
Not open for further replies.

wwillis

MIS
Jun 15, 2012
2
US
I have created a report and its subreport such that my subreport is in detaila and my printed line is in detailb.
The shared varable is also on the detailb line and is printing out.

The subreport determines if the record has a certain value and places 1 or 0 in the shared varable

MAIN @Flag
whileprintingrecords;
Shared NumberVar Flag;
Flag

Now I need to get a total of all records that have a 1 in the Flag field to place in my Report footer.
I tried to insert summary but this does not work.

Thanks

wwillis
 
Create another formula for detailb

MAIN @Tot

whileprintingrecords;
Shared NumberVar Flag;
Shared NumberVar Tot;

If Flag = 1 then tot:=tot+1;

You can suppress this so you do not see it incrementing then in report footer

@display Tot

whileprintingrecords;
Shared NumberVar Tot;

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top