SSRS 2008 report on-load event

eis
eis used Ask the Experts™
on
I'm building a report that will compare a field from one table to a field from another table, and change the font color based on the result of the comparison.

(T = Table, F = Field)

If T1F3 does not equal T2F3 then change T1F3 font color.

Table 1 & Table 2 are from different datasets.  The report is a sub-report which receives its parameters on load.

Is there a way to have an event triggered on report load to do this comparison & action?

Thanks,
- Dan
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Hi Dan.

Are you using the SSRS 2008 or 2008R2 version? If you're on R2 then you've got access to the Lookup() function in SSRS. That function will allow you to compare two fields from different datasets and take action based on that comparison.

Lookup in SSRS 2008R2

As far as the "on report load" question goes, Lookup() will work for you in the main report or the subreport, so I think you'll be in good shape either way.
eis

Author

Commented:
Thanks for the help!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial