How to group in cross-tab report - c#

I created a cross tab that shows the number of hours that employees worked each week. but I want to group them by their team leaders.

Add a group for the team leader. Move the crosstab into the new group's header. It's going to be difficult to get the group-name field to be positioned where you want it reliably. I would recommend creating a second group-header section (insert section below) and moving the crosstab to it. So, GHXa would have the group-name field and GHXb would have the crosstab.

Related

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!

C# Replacement String

Hi To All Good Programmers,
I am developing a web-based app in which I need to generate some kind of reports. To do that, I prefer to use .rdlc embedded in VS 2010. There is a report named 'AccountReport' in which table rows are grouped according to some field of the table and it works fine.
The Problem: I need to add the Sum of a column as the last record of each group, the Sum is not a field of database table.. So How can I group it?
Here is a snap shot of what I need as the result. I have it already except the last record(row).
How Can I rich the 'Total' Record? It is grouped by the 'Current Asset'. This image is prepared using MS Word of course.
Any Idea pleas?
You need to use the Sum Function of Visual Studio Report Designer. Add a row in your report to show the total. Use the SUM function with your desired columnn name to set the expression. Check this answer for step by step pictorial details Sum of Column Values in rdlc report.
See similar question here

ReportViewer asp.net webform, sales report. Click to expand row detail. C#

I'm trying to do a sales report that lists each order with a little plus icon beside it, once clicked the order row should expand to show the order details. I'm using the reportviewer for the first time and having it working to show the basic order info.
What I'd like to have now is each row expand when clicked to show the order details. So row 1 might list the buyers name, address etc and when clicked you see what they bought.
Given that I'm totally new at this kind of reporting (never heard of Tablix before using this reportviewer) is there a relatively easy way of displaying this data?
did you check http://www.gotreportviewer.com/?

RDLC reports: Show textbox value if first row on page

I have an old report written by someone else and don't want to change it too much. Each data row has a field at the beginning that is populated with the Category name if it is the first record for that Category and is left blank for all the others. A total line follows at the end of a Category section.
I works fine except when there is a page break between the first record and the last. In this case it is hard to tell what the category is since it is on the previous page.
My question is if there is a way to tell if a row is the first on a page? I tried
=IIf( (RowNumber(Nothing) = 1), Fields!DepartmentDescription.Value, "")
but that only shows the category for the first record in the category (which is already done using).
RowNumber("tblMain_DepartmentGroup") = 1
Not the first record on the page.
Thanks for any help.
You could have easily used the First() function. It literally receives and uses the first value it gets from the data collection.
Yes, it's possible. No, it's not easy. It would require some custom VBscript code (to be found in Report Properties). You might be trying a wrong approach.
In this case I would recommend to repeat some of the heading on new pages. Select 'Advanced Mode' at the little arrow next to Column Groups. In your row groups, a couple of extra (Static) items appear. Select the correct ones, and set 'RepeatOnNewPage' to true.
To give us some more context, it might be useful to know what you want to achieve with this.

How to add Summary Field in RDLC report?

I am using RDLC report in Win-form. I want to add the Below Page as Summary. That's mean, I want to add this page as separate page in Report.
My Friends Working in Fox pro. He said it possible in Summary Field, Its Like a Footer. But Can't able to Find That. Pls Help Me.
The Committee has considered the following aspects before finalizing the attendance%
for the B.Sc H&HA I year I semester Students,
1.    Students involved in attending ODC, Exhibitions and other functions
deputed by the college.
2.    Students who had shortage of attendance were instructed to attend the classes in
the weekend / Holidays. Classes were conducted by the staff who
were stationed at the Institute.
As directed by the principal, in the interest of the students and due to the semester pattern,
It has been decided to consider overall attendance % for the eligibility to write
the NCHM semester examination 2011.
(Mr.Elangovan) (Mr.Mathew) (Mr. Senthil Kumar) (Ms. Sharmila) ( Ms. Parimala) (Mr. Thirulogchander)
(PRINCIPAL)
Sounds like you just need to add a page break before your summary text:
http://msdn.microsoft.com/en-us/library/ms251701(v=vs.80).aspx
Yeah, Foxpro makes things like that very easy... Not knowing your data source, and if you could adjust by adding a column/field to the output per row. I would add a column of a blob (or Memo from FoxPro) where you can just dump a bunch of text to it. Then on the last record of the data to be printed, have this column printed. Since it won't exist for any previous records, it wont otherwise cause a conflict with any other content. Then, as Daniel mentioned, you can throw a force page break so this content shows on its own page.
I agree that it will probably be easier to add a page break to your report and add your info page above to that page. I don't know what you are using to create your report Visual Studio 2005/2008 but here are some instructions on adding a page break in VS 2005.
How to Set Page Breaks
Defining Page Size and Page Breaks
I am not sure of how your report is set up but if you instructions do specify the following:
To add a page break to a report item
Right-click the report item and then click Properties.
**Note**
Item page breaks apply only to the report items rectangle, table, matrix, list, and chart.
On the General tab, for Page breaks, select Insert a page break before this list (rectangle, table, or matrix) or Insert a page break after this list (rectangle, table, or matrix).
So keep in mind that applying the page break to an item it has to be a rectangle, table, etc. I just did a test in VS2005 and added a rectangle, then placed a text box inside with the data from above and it placed it on a separate page in the report.
Hope this helps.

Categories

Resources