Tabular report and highlight the rows based on the results of another query
I created a tabular report '1' by querying against a Table 'A' which is in 'XYZ' Database. The report consists of Employee ID as one of the field. I have a Table 'B' which is in '123' Database and it has Employee ID field as well. Now I have to highlight the rows in a tabular report '1' which contains the same Employee ID existed in Table 'B' with a red color. Is there a way to do this in SSRS? please help.
June 27th, 2011 6:28pm

You need to do it in your query, you need to write a query which will access both databases and tables and return a list of Employees, including a flag where the employee appears in both database.
Free Windows Admin Tool Kit Click here and download it now
June 28th, 2011 7:44am

Hi Guest389, Thanks for your question and ClareMoore’s valuable reply. As ClareMoore said, if you have the pemmision to access the two Databases’ records in one Dataset, using left join function in the T-SQL query is the easist way. I will give you the detail steps, please follow below, Supposing that table A and table B’s structures and records just like this, below one is table B: 1. Type in the Query dialog box of the Dataset like this: select emph1.emplid as emplid1,emph2.emplid as emplid2 from emph1 left join emph2 on emph1.emplid=emph2.emplid 2. Drag one table from the Toolbox window into the Design surface, bind the table’s first column with the field emplid1. 3. Right-click the textbox of emplid1, select textbox properties, click Font in the left pane, click fx button on the right of the Color drop-down list. 4. In the Expression dialog box, type in like this: =Iif(isnothing(Fields!emplid2.Value),"Black","Red"),click OK. Please preview the report, the effect just like this, Hope it helps you, if your issue still exists, please feel free to let me know. Thanks, Sharp Wang Best Regards. Sharp Wang
July 2nd, 2011 8:53pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics