Last post Jun 25, 2013 09:55 AM by sridhar_rs
Jun 21, 2013 06:01 AM|nipddatabase|LINK
I am working on a database using SQL Server 2012 and C# on Visual Studio.NET 2010.
I am using Reportviewer to create various reports with no problems so far. I have a specific problem that has been puzzling me for some time and I can't find a satisfactory solution.
I have a table which represents a box of sample tubes that contains 100 tubes which are aranged in a 10x10 gridlike this:
My table has the following fields:
Example Data Rows:
and so on until
Now I want to be able to print the contents of this table similar to the grid figure, in a 10x10 grid. Something like this
1 SAmple 1 |2 Sample 2 |3 Sample 3 |4...|10 Sample 10|
11 Sample 11| 12 Empty |13 Sample 13 |...|
21 Sample 21|...|
How can I display data rows from my table in Rportviewer in one row and after 10 columns go to the next line to print the next 10 etc, in order to create a grid that looks like the real box of samples?
I tried creating a data list and a multicolumn Report after following this tutorial:"Creating Mailing Labels in SQL Server Reporting Services" but the data gets printed sequentially all in the first column, then goes to the second column to continue from
where its left off and the grid is somehow inverted from what i want it to look like.
Has anyone tried to prinf a report using a grid and print data in rows instead of columns?
I appreciate any input you might have.
Jun 21, 2013 08:26 AM|Abhi.ssrs|LINK
For this you might need to add some kind of counters to your dataset like RowNumver, Column Number and Pagenumber. You can do that by some sql calculations. Once you have that , you can folloow these steps :
1.Add a table with one column only and row group on "Sample".
2.Now add another table with 1 row and 1 column only. Delete the default group. Add a parent column group on it for your ColumnNumber/RowNumber parameter.
3. Now cut and paste the previous table in this table. This should help in getting desired result.
Jun 21, 2013 04:40 PM|FrumRoll|LINK
This seems like it could be done by simply creating a row group on your horizontal field and a column group on your vertical field and using your value field for your detailed data.
Jun 25, 2013 02:03 AM|nipddatabase|LINK
Can you elaborate please? Row group will be applied on a specific value of the table? WIll I be able to go to the next row after 10 values with the rowgroup? Thank you for your answers.
Jun 25, 2013 09:55 AM|sridhar_rs|LINK
You could use DataList control with RepeatColumns=10 to show 10 X n rows grid format.
Container.DataItem("position") + " " + Container.DataItem("value") %>'