[SOLVED] Adding a count of records to the Totals Line
I have generated a report that includes subtotals and a grand total line. Everything was fine until the user requested a Total # of records value added to the grand total line. I have been struggling trying to find a way to do this. My mind says that this should be a simple task, but it's not clicking. Any help would be appreciated.This message has been edited. Last edited by: James at WI,
Release 7.7.03, Windows platform, Excel, PDF, HTML,Active Reports, Active/Flex,
July 27, 2011, 04:39 PM
jimster06
Hi James, The following comes to mind: Use a define such that at the table or matrix is built each record gets an integer count of one and at the break disply a sum of that count. DEFINE MYFILE RECD_CNT/I9 = 1; END This, essentially, builds a new field in each extracted record containing the value one. Then you can do with it whatever turns you on. HTH
jimster06 DevStu WF 7.6.11 W7 HTML, PDF, EXL2K
July 27, 2011, 04:58 PM
James at WI
Better, I now have a new column that has a 1 on every detail row, but at least the total (and subtotal) line has the correct value. Do you know if there is anyway to stop the display of the detail value but maintain the totals?
Thanks
Release 7.7.03, Windows platform, Excel, PDF, HTML,Active Reports, Active/Flex,
July 27, 2011, 05:15 PM
FrankDutch
What you can do is do the count first in a hold pass then read the number into an amper value and put that in the footer
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
July 27, 2011, 05:27 PM
Saravanan J
James,
How about using subfoot to print the total lines? If that is acceptable then the below example will help you. Here the Define field "CNT" is not diplayed in the table, however the sum of CNT is displayed in the subfoot.
DEFINE FILE CAR
CNT\I4=1;
END
TABLE FILE CAR
SUM
SALES
BY CNT NOPRINT
BY COUNTRY
BY CAR
ON CNT SUBFOOT
"Total Lines <ST.CNT>"
ON TABLE PCHOLD FORMAT HTML
END
Release : 7.7.02 OS : Linux App Server : Tomcat all output
July 27, 2011, 05:45 PM
James at WI
Absolutely perfect. thanks for all the help.
Release 7.7.03, Windows platform, Excel, PDF, HTML,Active Reports, Active/Flex,