Sunday, March 25, 2012

COunt Function in Report

I am creating a report that will print the customer's Invoices grouped by SalesPerson. I created a variable in the dataset so that it sets to the status of the invoce to Paid, Not Paid and Partial. All is working fine so far.

I have a groupfooter for each salesperson where I want to print the total no. of invoices for that SalesPerson that are PAID, NONPAID and Partaial.

So on the expressions of that fields, I have the following code. It allows me to print the report, but it prints #Error for the value of thoses field

I also want to print the the same fields in the report total area.

Any ideas ?

=Count(Fields!Document_No_.Value)having (Fields!InvStatus.Value = "PAID")

=Count(Fields!Document_No_.Value)having (Fields!InvStatus.Value = "UNPAID")

=Count(Fields!Document_No_.Value)having (Fields!InvStatus.Value = "PARTIAL")

Guys, I figured this one out.

Here is the solution :
=Sum(IIF Fields!InvStatus.Value = "PAID",1,0)

sql

No comments:

Post a Comment