Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Count is returning a count of all rows Expand / Collapse
Author
Message
Posted Friday, December 14, 2012 3:50 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, January 08, 2013 6:31 PM
Points: 10, Visits: 33
I have a dataset column in a table region and I want to count on a condition with an expression in the header textbox but expression returning
could this be a scope problem since the textbox is not bound to dataset. Even though textbox is bound to the dataset.


=Count(ReportItems!Test.Value = "Pass") just counts all the rows - this is in a textbox in the header of the report
Post #1396832
Posted Monday, December 17, 2012 7:16 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, April 10, 2014 10:18 AM
Points: 1,769, Visits: 2,800
Does this do it?

=Sum(iif(ReportItems!Test.Value = "Pass", 1, 0))

Cheers
Gaz
Post #1397250
Posted Monday, December 17, 2012 8:30 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, November 06, 2013 7:03 AM
Points: 10, Visits: 126
D'oh... never mind <post deleted>
Post #1397280
Posted Monday, December 17, 2012 10:14 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, January 08, 2013 6:31 PM
Points: 10, Visits: 33
Sum(IIF(ReportItems!Test.Value Like "2011 Pass",1,0)) Im using a textbox in the header so there are scope issues if I use the Fields collection.

Thanks
Post #1397338
Posted Monday, December 17, 2012 10:16 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, January 08, 2013 6:31 PM
Points: 10, Visits: 33
Thanks is works
Post #1397339
Posted Monday, December 17, 2012 10:18 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, January 08, 2013 6:31 PM
Points: 10, Visits: 33
Sum(IIF(ReportItems!Test.Value Like "2011 Pass",1,0)) Im using a textbox in the header so there are scope issues if I use the Fields collection.

Thanks Ten Centuries

Post #1397341
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse