SQL Server Performance

Calculated Fields in Report Dataset

Discussion in 'SQL Server 2005 Reporting Services' started by MQuinn, Nov 30, 2007.

  1. MQuinn New Member

    I'm creating an easy report on invoices, I have my invoices grouped by type with a count of all projects in that group and a sum of all invoice amounts in each group. I have a grand totals field in my report footer with a SUM(Fields!COUNT.Value) and SUM(Fields!AMT.Value) to give me grand totals of all amounts and grand total of all invoices in all groups. My problem is that I need to have a percentage of the total shown in each invoice type group. So if I have 100 invoices and 10 are type A then the type A group should show 10%. If I enter the calculation of (Fields!Count.Value)/(SUM(Fields!Count.Value) it will divide 10 by 10 for group A since it's in the group. For some reason, if I create a calculated field in the dataset with the calculated value of =SUM(Fields!COUNT.Value), I get an error when trying to preview the report. Can anyone help?
  2. MQuinn New Member

    Nevermind, I created a second dataset without the group by and used those numbers for my division problems.

Share This Page