Showing posts with label coding. Show all posts
Showing posts with label coding. Show all posts

Wednesday, March 7, 2012

How to Count the Items In Dataregion With out writing Query

Hi Group,
How to Count the items
Sample:
ID TestColumn
1 Coding
2 Design
3 Coding
4 Coding
5 Requirement
6 Coding
My Output Should be
Requirements Count Design Count Coding Count
1 1 4If you make a group on the Testcolumn, you may use one of the Count()
functions to count the rows...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Manoj.Pasumarthi" <ManojPasumarthi@.discussions.microsoft.com> wrote in
message news:19D19F77-093A-4A54-BC72-4520693088F1@.microsoft.com...
> Hi Group,
> How to Count the items
> Sample:
> ID TestColumn
> 1 Coding
> 2 Design
> 3 Coding
> 4 Coding
> 5 Requirement
> 6 Coding
> My Output Should be
> Requirements Count Design Count Coding Count
> 1 1 4|||You might also consider these expressions:
=Sum(iif(Fields!TestColumn.Value = "Coding", 1, 0))
=Sum(iif(Fields!TestColumn.Value = "Design", 1, 0))
=Sum(iif(Fields!TestColumn.Value = "Requirement", 1, 0))
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:OmdPRQTrEHA.1952@.TK2MSFTNGP12.phx.gbl...
> If you make a group on the Testcolumn, you may use one of the Count()
> functions to count the rows...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Manoj.Pasumarthi" <ManojPasumarthi@.discussions.microsoft.com> wrote in
> message news:19D19F77-093A-4A54-BC72-4520693088F1@.microsoft.com...
> > Hi Group,
> >
> > How to Count the items
> >
> > Sample:
> > ID TestColumn
> > 1 Coding
> > 2 Design
> > 3 Coding
> > 4 Coding
> > 5 Requirement
> > 6 Coding
> >
> > My Output Should be
> > Requirements Count Design Count Coding Count
> > 1 1 4
>