Rows into column conversion
Hello, I have a report which includes a SP and this SP returns manyrows. I want to view these rows horizontally. Does anyone know how this can be done. I am very new to reporting services. Thanks in advance. Thanks, Narayan
March 28th, 2008 5:59pm

Use the report wizard and design a matrix report. You may have to create a report stagingtable prior. In such a table, you have the dimensions such as CountryName (instead of countryid) and the measures such as sales. You can put the dimension columns over the rows, across the columns or on page tops. You put the measure(s) into details.
Free Windows Admin Tool Kit Click here and download it now
March 28th, 2008 6:22pm

Hello, Thanks for your ans. But I am not so much comfortable with Reporting services. IS it possible whenever you have time to explain this in detail. Thanks, Narayan
March 28th, 2008 7:08pm

Do you mean:You want to return the data horizontally (horizontal table)ORYou want to return the data horizontally and aggregate it at the same time (matrix)
Free Windows Admin Tool Kit Click here and download it now
March 28th, 2008 7:22pm

Adolf, Thanks for replying. What i want is I have 3 columns returing in the query and out of these 1 col has 40 rows and other 2 can be empty or can be filled which depends. Now let me know what can be done. If you want more info let me know. Thanks in advance. Narayan
March 28th, 2008 7:36pm

Hi Narayan, There is no native "horizontal table" report item, but simple horizontal tables can be simulated using Matrix. Step 1: Add a matrix to your report Step 2: Add static rows to the matrixRight-click in the Data cell and select "Add Row". Repeat for the number of fixed rows you want. Step 3: Drag fields into the Data cellsYou'll notice that the design tool automatically wraps your field reference in the "First" aggregate (e.g. =First(Fields!City.Value)). Since you're doing this in the context of a matrix, the design tool is ensuring that the expression is meaningful even in the context of a subtotal or if the matrix is showing aggregated data rather than detail data. Since you're going to show detail data without subtotals, you technically could remove the aggregate expression (but don't, since then you'll start getting warnings which you'll need to ignore). Step 4: Add a column groupingRight-click on the column header and select "Edit Group". Enter this for the group expression: =RowNumber(Nothing). This will cause the matrix to give you one column per row of data. Since horizontal tables can end up rather wide, you probably want your table wrap around to the next "line" after a specific number of columns. Step 5: Put the table into a listAdd a list to your report and drag the table into it Step 6: Group by a number of rowsRight-click on the list and select Properties. Then click on Edit Details Group.Enter this for the group expression: =Ceiling(RowNumber(Nothing)/3)This will cause the list to group on every three rows. So you'll get a separate table for every three rows. Step 7: Adjust the group expression in the matrixEdit the column group expression in your matrix and change the RowNumber argument to be the list group name.For example: =RowNumber("list1_Details_Group") Hopefully this helps.
Free Windows Admin Tool Kit Click here and download it now
March 31st, 2008 1:15pm

Hi Sir, I have a requirement that is I have to show Stored procedure result set column data horizontally in RDLC file. Here is example. Below is the result set when I execute my stored procedure. Based on condition no.of rows will change. I am using typed dataset to store result set. NSV QTY MONTH/YEAR 264.95 31248 APR/07 273.23 34044 MAY/07 230.96 22232 JUN/07 711.93 81992 JUL/07 427.23 50345 AUG/07 297.90 36961 SEP/07 495.37 43079 OCT/07 648.48 52428 NOV/07 622.06 46364 DEC/07 407.02 46461 JAN/08 605.45 73439 FEB/08 224.81 28121 MAR/08 308.12 33356 APR/08 328.22 35605 MAY/08 372.41 34107 JUN/08 I have to show above result in RDLC file Like below. APR/07 MAY/07 JUN/07................JUN/08 264.95 273.23 230.96.................372.41 31248 34044 22232 ...............34107 Please suggest me how to this requirement. Which control I have to use display data on RDLC report? If I use table control, is there any way to insert group on column like insert row group? Regards, N.SRIRAM
January 12th, 2011 1:15am

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

Other recent topics Other recent topics