Report Header depending on the current record with a comple report
Hello, I want to print a complex report. Here is how my report is done : 1) There are some tables like that - Project : informations about a project . A project contains one or more sub parts - Positions : a part of a project (you can say for example one door, one window...). Every position has a name (chosen by the customer). A position can take from one page to 10-15 pages depending on the size. - Different parts of a position : for example profiles, accessories, glass... (there can be 10-15 different sub tables for a position). My report is done like that : One main report with all the informations from the project. Inside there is a table (tablix ) with the list of positions and the main record is a sub report. Inside the sub report there are 10-15 different tables (one for every part) so one that shows profiles, one that shows glasses... My report is working perfectly for everything but one thing : When a position takes more than one page, I want every new page so start by the name of the current position and I can(t manage to do it. For example I have the following Page 1 Project : Header = project name, the header for the current position must be empty Page 2 Startof Position 1 (position name...) Header = Position name Page 3 other part of the position (glasses for example) and I want to start by the name of the positionHeader = Position name (same as page 2) Page 4 : Start of position 2 (Position name...) Header = Position mame for position 2 Page 5 = Start of project 2 : the header of the current position must be empty. The software is made in VB2010. Thanks a lot Marc
May 16th, 2012 6:48am

Hi Marc, From your description, do you mean that all the tablix that display detail data for each position are placed in one sbureport? However, the subreport control has an implicit KeepTogether property. By design, the KeepTogether property tries to keep content of a subreport on one page. If it is one subreport indeed, I am a little confused about why there are page breaks generated in one position instance. At this time, I suggest that you drag the Position name field and the tablix/subreports in one table that only contains static rows, and then place the table in a list. The list should group on the Position name filed and add page breaks to the group. The report design structure looks like: References: Adding a List If I have something misunderstood, please feel free to correct me and post a screenshot of the issue for further analysis. Regards, Mike Yin TechNet Subscriber Support If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2012 2:48am

Hello, In fact I didn't explain myself correctly. The report jumps to a new page in a position simply because there is not enough room in one page to print the content. That is correct for me, but I want to see in the second page of a report the current position so when the customer sees one page (3rd page of a position for example) he knows what position he sees. Actually he doesn't see the position. Marc
May 21st, 2012 1:26am

Hi Marc, Thanks for your posting. According to your feedback, you want the current position value to be repeated on each page when exporting the report to PDF format. To work around the issue, you can add a page footer or header to the report, and then reference the PositionID field in page footer. The following steps are for your reference: Drag a Table control to the design surface, delete the detail row and the third column.Drag the subreport to the first column, and drag the PositionID to the second column. Add a List control to the report, set the proper dataset name and group the list on PositionID field. Drag the table to the list, add a textbox to the list above the table, and place PositionID in the textbox.Add page footer, drag a textbox to the page footer and set the expression to: =ReportItems!PositionID.Value Note: The PositionID in the expression represents the textbox that is to the right of the subreport in the table. Set the textbox that contains [PositionID] in the table to No Border, and then minimize the width of the second column. In this way, the value of the current PostionID will display in the page footer on each page. The report design structure looks like: If the issue persists, I suggest that you post a screenshot of the report structure so that we can reproduce the issue and help you out. Regards, Mike Yin TechNet Subscriber Support If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.
Free Windows Admin Tool Kit Click here and download it now
May 22nd, 2012 1:03am

Hi Marc, Thanks for your posting. According to your feedback, you want the current position value to be repeated on each page when exporting the report to PDF format. To work around the issue, you can add a page footer or header to the report, and then reference the PositionID field in page footer. The following steps are for your reference: Drag a Table control to the design surface, delete the detail row and the third column.Drag the subreport to the first column, and drag the PositionID to the second column. Add a List control to the report, set the proper dataset name and group the list on PositionID field. Drag the table to the list, add a textbox to the list above the table, and place PositionID in the textbox.Add page footer, drag a textbox to the page footer and set the expression to: =ReportItems!PositionID.Value Note: The PositionID in the expression represents the textbox that is on the report of the subreport in the table. Set the textbox that contains [PositionID] in the table to No Border, and then minimize the width of the second column. In this way, the value of the current PostionID will display in the page footer on each page. The report design structure looks like: If the issue persists, I suggest that you post a screenshot of the report structure so that we can reproduce the issue and help you out. Regards, Mike Yin TechNet Subscriber Support If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.
May 22nd, 2012 1:06am

Thank you very much, it was exactly what I needed to do! EDIT : If you want to minimize le column, you can open the XML file and you can put a size of 0. (without doing it I had a page jump because the list was already filling the page. Marc
Free Windows Admin Tool Kit Click here and download it now
May 22nd, 2012 8:09am

Hi Marc, Thank you for your feedback. I am glad to hear that the issue has been resolved. Also thank you for sharing the method to minimize one column in the XML code. In addition, I have modify the "Note" information in my last post from "Note: The PositionID in the expression represents the textbox that is on the report of the subreport in the table." to "Note: The PositionID in the expression represents the textbox that is to the right of the subreport in the table." Sorry for the mistake. Regards, Mike Yin
May 22nd, 2012 9:17am

Hello, I have made some tests and I don't need to do the step with the PositionID on top of the subreport. I only need the one on the right. Marc
Free Windows Admin Tool Kit Click here and download it now
May 22nd, 2012 9:30am

Hi Marc, Thanks for your posting. Yes, you are right. Actually, the PostionID field in the textbox above the table is used to display the Position name like a common group field. To display the current PositionID on each page in PDF format, we need to add a textbox adjacent to the sbureport. As I mentioned above, the report item referenced in the page footer is the textbox that is to the right of the subreport control. Regards, Mike Yin
May 22nd, 2012 10:11am

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

Other recent topics Other recent topics