Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group selection formula in SSRS

Status
Not open for further replies.

Cnnx

Technical User
Aug 19, 2003
16
GB
I am trying to rewrite some Crystal 9.0 reports in SSRS 2005

My Select query is as follows:
Code:
SELECT Table1.Client_Ref, Table2.DateStart, 
FROM Table1 LEFT OUTER JOIN Table2 ON Table1.Client_Ref = Table2.Client_Ref
WHERE (TABLE2.DateStart <= '2008-11-30')

I then want to group by Client_Ref and show the record with the latest DateStart. In Crystal I grouped by Client_Ref and then defined a group selection formula:

Code:
{DateStart}= Maximum ({DateStart},{Table1.Client_Ref})

thus returning only one line for each client (the record with the latest DateStart).

I cannot see how to do this in SSRS. Any help gratefully received.
 
Put this in the expression for the data column's textbox in the header of footer. =MAX(Fields!DateField.Value)
 
Many thanks RiverGuy. I realise it was probably a fairly basic question but you have saved me a great deal of time.
Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top