RDLC group by multiple column in table - c#

I am using rdlc report and using table in it.I want to make following desingn in rdlc but when i drag database column in row group table properties it shows columns on left side.I want Eng Crs Name and Arabic Crs are parent group and Eng Gender and Arb Gender are child group.Where Eng is english and Arb is Arabic.Both are same columns but different language.How can i achieve this following design.
Eng CrsName EngGender Students ArabicGender ArbCrs
engname1 EngM 2 ArabicM arbn1
EngF 3 ArabicF
engname2 EngM 4 ArabicM arbn2
EngF 5 ArabicF

The most common way to have parent and children columns is by using the Matrix component. I suggest you give it try on your own first, it should be self explanatory.
If the Matrix does not meet your desires, there is another easy way to group data in an RDLC Report by using the List component.
You can add a table with just the table headers at the top, so it won't be repeated. And then drag the parent (column on which you wish to group) to a TextBox inside the Rectangle of the List. Make sure you group the List on that column.
Next you can add a Table with the children data into the rectangle. If there are multiple children, this table will generate multiple rows inside the rectangle. This rectangle will then repeat for every parent item, grouping everything nicely. You can also add lines to represent columns as you see fit.
I hope this helps you a little, if not you should describe your datasource in a bit more detail and I might be able to give a more accurate solution.
Here is a more visual representation of what i tried to explain with words:

Related

Rdlc with two "synchronized tables"

I'm using rdlc files to generate pdf files.
What I basically want to do to is to display the data of my data set on two "synchronized" tables.
The image below represents the result I would like to obtain:
The image represents one page of the pdf, on which the data is group by a certain attribute of the dataset.
Please tell me if any clarification is needed, it's hard for me to explain clearly.
How can i do that with 2 tables as a single object?
I managed to do this with a Tablix as the container. Add two lines of header and add another two Tablix to each cell of header with data. You cannot use Data row, you have to remove it. You can add a Tablix to a cell with drag and drop.
In the end, you will have something like :
Probably something alike can be achieved with subreports, but I'm not familiar with them.
EDIT:
Added screenshot
I believe this is what you want to see. 1 column, 3 rows Tablix. In Cells(1,1) and (3,1) you have other Tablix objects that you can customize.

rdlc - Concatenate 2 tablix - same dataset - synchronization lost..,

Since i haven't find a way to merge colunms cells in rdlc, I've tried to concatenate 2 tablixes horizontaly- one is "standard" table, and the other is one field (those were my needs).
Running my sp on my rdlc, it works fine where there is one record to display.
However, when the result is multiple records, and I'm saving results in .pdf file, the 2 tables are not "synchronized" together any more - the gaps between results of each records are different.
I've tried to surrender the tablixes in rectangle and define a page break after rectangle - table still not synchronized...
Please advice..... ☺
Combine your two tablix into one. You can create the appearance of having two by putting an empty column between the two "sides" with no borders on top or bottom of the cells. It will look like two tables side by side, even though it is one table, and the rows will be forced to line up horizontally.
Another possibility for you is to have a sub-report. Create a simple report of just the tablix of the second table in question of the field(s) you want to include.
Then edit your primary report to include the sub-report. I cant direct in detail now how to link-up the sub reports and parameter link them, but suggest some reading up on it. So Each detail row in the parent report would be a group by (its PKID for example), then add the sub-report to it. This way as many rows at the sub-level go if 1 or more...

Adding Details to a MS Report Viewer report without resorting to Subreports/drill down

I've worked with Crystal Rpt and the VB6 Report Designer before and I'm now moving on to Microsoft Report Viewer.
I'm actually trying to achieve something quite simple but I can't seem to find how to do it in a simple manner:
I have an orders list where each line is composed of Order Id, Customer Name and Address.
I am able to list them in Report Viewer.
Next, I want to be able to show a list of items below each order in something line this:
+ORDER 1, Customer A, Cust Address
|-- Product 1 for Order 1
|-- Product 2 for order 1
+ORDER 2, Customer B, Cust Address
|-- Product 1 for Order 2
....
I know I can link this information through subreports but this seems way of an overkill for such a simple scenario.
In the (very) old VB6 Report designer, it was possible to add sub sections to the report and link the Main section with the sub section through a parameter, without having to go through the whole Subreport feature, keeping everything in one single report.
Is there such a way to achieve this in Report Designer/Viewer (i.e. adding sub sections, avoiding the use of Sub reports)?
Thank you
Pedro
You should be able to do this all on 1 report if you use Groups and a sub-tablix.
Create the table with a header row and detail row, and change the default Row Group called "Details" to Orders, and have it Group on your Order Number:
Insert another row "Inside Group - Below" under the Order Num, and merge all of the cells across.
Insert a rectangle into the merged cell, and then insert a Table on top of the rectangle. Add your product fields there. (In image below, everything in the Parent table is grey, and the sub-table is white)
When you run this, since the Product row is inside of the same grouping as the Order row, each time that row is displayed, it will only show the Products that are associated with that Order (assuming your query has them linked correctly).
Hope this helps! Let me know!

Change Group By column order in ReportViewer

I have a rdlc where I'm building a report.
I'm using a tablix grouping by a field of the tablix dataset, like the following:
When I fill the report with data and refresh it, it comes out like this:
Now, I want the first column(wich has the group by by the field "nome_terr") appear not in first place, but by second. The first column has to be "territorio_emp". If it was a normal column, I'd just move it, but being the Group By column I don't know how to do this.
Ideas?
Thank you.
If you know that your Territorio_Emp data is 1-1 related to your Nome_Terr column, you can just group by Territorio_Emp first, then by the Nome_Terr column.
If thats not possible, you can keep it the way it is, but make the width of the group by column 0, so its basically hidden. Just drag the column header separators.

Group A Column Series with WPF Charting Toolkit

I got a Column Series that looks like this:
As you can see i got lots of columns, that I need to group somehow. A group consists out of 1 shuttle and for each shuttle there are 5 nests. My preferred form of grouping would be a, the nest written underneath each column and the shuttle again underneath. Between groups there should be a vertical line or some space to separate them. If this isn't possible I would greatly appreciate any other suggestions.
create a datatable with a column for each nest( so total five columns) , add five column series to the chart , DependentValueBinding to each column name, set ItemsSource to datatable( same for each column series).
Let me know if you want the code.

Categories

Resources