Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Need to do Max like Crystal Reports

Author  Topic 

bubberz
Constraint Violating Yak Guru

289 Posts

Posted - 2005-12-20 : 10:11:14
My table structure is a one(tblA) to many(tblB). TblB had my "workers" listed and two columns I use are "Title" and "Person". What I was trying to do in SRS was use IIF( ) and say if "Title" was "....", then give me the "Person" else "". I needed to have this show in the group footer of the field / PK in tblA. There are three expression I need to use in this footer.

In Crystal reports, I would just use the max function for the group footer since in the detail band....if the function was false, then "blank" would be returned, else a name / "Person" value was returned. I'm just not sure how to do this in SRS.

My current resolution is a subreport which looks for three certain "Title" values, and the parameter is the grouping of the table object. This is fine, but it's a little bit of a resource ding since I have the subreport.

jhermiz

3564 Posts

Posted - 2005-12-20 : 10:24:32
instead of MAX use =FIRST()




Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]

RS Blog -- [url]http://weblogs.sqlteam.com/jhermiz[/url]
Go to Top of Page

bubberz
Constraint Violating Yak Guru

289 Posts

Posted - 2005-12-20 : 13:03:28
jhermiz,

Maybe I'm missing something, but the following isn't working (I know it won't since the first record in the detail band would have to be title of "Head Honcho" to work). Should I have another grouping which looks for the titles I need else "", and hide ""?

For the expression in the group footer:

=first
(
IIF( Fields!Title.Value="Head Honcho", Fields!Person.Value,"No Head Honcho"
)
)
Go to Top of Page

bubberz
Constraint Violating Yak Guru

289 Posts

Posted - 2005-12-20 : 14:47:30
jhermiz,

I've tried to work with the group's visibility expression of:

=IIF(ReportItems!txtPerson is "No Mgr" and rownumber("table1_Group1")
> 1,true, False)

.....I'm trying to hide the group band if it's "No Mgr" in txtPerson and the count > 1

I can see the txtPerson value and the rownumber() for the group bands, but can't get the expression to work correctly.
Go to Top of Page
   

- Advertisement -