A
Ally
I have four group levels set on a report which gets data from a
table(TABLE1). The
Report is grouped first by project#, then Cap#, PO# and Inv#. Both of Cap#
level and PO# Level has an numeric filed: such as CapAmount in Cap# level,
POAmount in PO# level. One Project# might have multiple Cap#s and one Caps
might have multiple POs. Therefore, the TABLE1 records some repetitive field
information for different rows. However, the report needs to be printed out
the information in group level. If there are three PO#s in one Cap#, the
information such as CapAmount, Capdescriptions related to that Cap# will only
be printed out once in one row instead of three times in three rows.
I understand that I can set HideDuplicates property to Yes or simply use
grouped level in the report to prevent duplicate data from being printed on a
grouped data. However, the total sum of the amount in each level (CapAmount
and POAmount) was not correct using =sum([CapAmount]) and sum([POAmount]) at
the project footer and report footer. It's way larger than it's supposed to
be and it seems that those hided lines with numeric fields are still be
counted, which causing the final result way larger than what they are
supposed to be.
I tried typing the subquery as below to the sum control in the report footer
and project footer on the report:
SELECT Sum(TABLE1.POAmt) AS SumOfPOAmt
FROM (SELECT TABLE1.[PO#], TABLE1.POAmt FROM TABLE1 GROUP BY TABLE1.[PO#],
TABLE1.[POAmt]);
There is nothing except “#Name?†printed on the final report.
Would anyone please help me out here to get the right sum that only reflect
the displayed data?
Thanks in advance!
Ally
table(TABLE1). The
Report is grouped first by project#, then Cap#, PO# and Inv#. Both of Cap#
level and PO# Level has an numeric filed: such as CapAmount in Cap# level,
POAmount in PO# level. One Project# might have multiple Cap#s and one Caps
might have multiple POs. Therefore, the TABLE1 records some repetitive field
information for different rows. However, the report needs to be printed out
the information in group level. If there are three PO#s in one Cap#, the
information such as CapAmount, Capdescriptions related to that Cap# will only
be printed out once in one row instead of three times in three rows.
I understand that I can set HideDuplicates property to Yes or simply use
grouped level in the report to prevent duplicate data from being printed on a
grouped data. However, the total sum of the amount in each level (CapAmount
and POAmount) was not correct using =sum([CapAmount]) and sum([POAmount]) at
the project footer and report footer. It's way larger than it's supposed to
be and it seems that those hided lines with numeric fields are still be
counted, which causing the final result way larger than what they are
supposed to be.
I tried typing the subquery as below to the sum control in the report footer
and project footer on the report:
SELECT Sum(TABLE1.POAmt) AS SumOfPOAmt
FROM (SELECT TABLE1.[PO#], TABLE1.POAmt FROM TABLE1 GROUP BY TABLE1.[PO#],
TABLE1.[POAmt]);
There is nothing except “#Name?†printed on the final report.
Would anyone please help me out here to get the right sum that only reflect
the displayed data?
Thanks in advance!
Ally