Saturday, February 25, 2012

Previous and Next functions

Hi,

I am tasked with duplicating many Oracle report in SRS. One uses a stored proc to get a list of people and sorts them by name. It then prints in red those names that are duplicates. It uses this bit of code to do it:

If {PlayerName} =
Previous ({PlayerName})
or
{PlayerName} =
Next ({PlayerName})
then Red
else Black

I don't find any quite so simple functions to do this.

I'm at the moment using VS2003 against SQL Server 2005.

Thanks,

Fairfield

We do have a Previous function http://msdn2.microsoft.com/en-us/library/ms156372.aspx

Next is not currently supported. An alternative way of doing this is to use custom code. You'd pass in all the names into the custom code and detect duplicates there (by using a hashtable for example). And then in the color style property call a custom function that looks in the hashtable and returns the desired color based on whether the specific name is a dup.

|||Thanks, I'll give it a go.

No comments:

Post a Comment