Groups | Blog | Home
all groups > sql server reporting services > july 2006 >

sql server reporting services : displaying records in two tables


venkat.oar NO[at]SPAM gmail.com
7/28/2006 6:12:04 AM
HI,

Need some help in displaying the records in two table( from a single
dataset).

To be precise i have a dataset which returns say 10 rows, i want to
display the odd numbered rows( i mean the alternate rows) in the first
table and then the even rows in the second table. I'm using RS 2K.

This is a do or die situation with RS reports, else i might have to all
my reports using crystal reports. Appreciate if some one can quickly
fill my hope.

Thanks in advance,
--Venkat
toolman
7/31/2006 7:48:23 AM
Simple enough.
First create your initial table. Set the Visibility/Hidden property of
the detail row to =IIF(RowNumber(Nothing) mod 2 = 1, True,False). This
will give you your odd numbered rows.
Copy that table and paste the copy into the report body. Edit the
Visibility/Hidden property of the copy's detail row to
=IIF(RowNumber(Nothing) mod 2 = 0, True,False). This will give you
your even numbered rows.
Make sure you set the property for the row and not individual cells or
you'll end up with weird white spaces showing up.
It's probably also possible to set up filters for the dataset that
would accomplish this but you would have to find an alternative to the
RowNumber() function as it can't be used in filters. If your datset
includes an incrementally numbered field that could work.
Best regards
toolman

[quoted text, click to view]
toolman
7/31/2006 7:54:42 AM
Please note my editting below:
[quoted text, click to view]
EDITTING: The above should be reversed.
=IIF(RowNumber(Nothing) mod 2 = 0, True,False) will HIDE the even
numbered rows so the odd numbered ones show. =IIF(RowNumber(Nothing)
mod 2 = 1, True,False) will HIDE the odd numbers.
Sorry for the mix-up.
[quoted text, click to view]
venkat.oar NO[at]SPAM gmail.com
8/1/2006 7:21:52 AM
Thank you for your response, i will implement it to see if every thing
works fine, mean while can you tell me how to restrict the # of columns
displayed per table

Appreciate your help.

--Venkat
[quoted text, click to view]
AddThis Social Bookmark Button