Skip to Content
0
Former Member
Mar 24, 2009 at 03:11 PM

Conditionally display data based on specific field contents

25 Views

Let's see if I can explain this well.

I have a report that shows the data from a specific "case id", but the data for each section resides in a bunch of different tables. I cannot simply join these tables and return the result because each has different fields.

I could create a whole lot of subreports, but am trying to avoid that if at all possible.

So, I created a SP that outputs a result set which contains all the fields I need for each section, but to help me differentiate them, I created a "datatype" field. So, a sample of the stored procedure output would be:

datatype    field1    field2     field3    ....
S1         (bunch of data...)
S1         (bunch of data...)
S1         (bunch of data...)
S2         (bunch of data...)
S2         (bunch of data...)
.
.
.

Now, I want to put all rows with datatype "S1" in one section, and rows with datatype "S2" in another section.