Page header on two subreports of different length side by side (ActiveReports) - subreport

I have a report that contains two main subreports, each taking a vertical half of the page, so they go side by side. Each has their own page header which I emulate by using a groupheader and seting the RepeatStyle property to OnPageIncludeNoDetail. However, both may have a different length, and I want the rightmost subreports to show the page header even if the report has no more data to show. In other words, if the right subreport takes less pages than the left report, I need for it to keep printing the header data on each page until the leftmost report ends. This is failing right now because once the subreport on the right is finished, it assumes the header needs not to be printed anymore.
I've tried adding a page break at the bottom of the subreport on the right, but as I don't know how many pages either of the subreports have, I don't know whether I should enable it or not until too late (or at least I didn't find a way to do so).
BTW, I'm using AR3 but upgrading to AR7 is supposed to occur at some point of the future...

Once a subreport ends and is no longer being put on each page it won't be possible to get it's page header rendered on the next page. I think your best option here is to use a parent report to include the pageheader information as only a parent report will continue to render as long as either one of the subreports render.
Note: It doesn't need to be the same parent report you're using now, but you could be another in between the current parent report and the two subreports to deal with the page headers.

I would suggest that you use groupheader/footer in the subreports instead of pageheader/footer and set the repeatstyle property of groupheader to OnPage.. Pageheader/footer in subreports are not supported because Subreports are not page aware.
The pageheader/pagefooter of the main report with render fine as scott mentioned.

I found a way to do this although it is not flawless. But the problem may be only on AR3 and hopefully fixed on AR7.
What I did was move the right subreport's header on a separate header of the master report. So now the master report has a page header, then the new group header (let's call it ghPage), and lastly the group header that originally contained both subreports.
Then, I set ghPage's property UnderlayNext to true, taking care to leave the necessary blank space to let ghPage fit in.
That's it, and it seems to work, but... when the left side subreport takes less than the right's page header high, this last section appears cropped to the left's height.

Related

SSRS : Passing parameters to a subreport

I have a report containing 3 different subreports (each accepting a different set of parameters), and only displaying one of them depending on the value of a parameter.
When I choose to display any one of them, it gives me the following error:
Error: Subreport could not be shown
I need to have this visibility parameter let me decide which subreport I wanna see, then have the ability to pass the right parameters to that chosen subreport. Is there any way of doing this ?
Here are some screenshots:
https://imgur.com/a/n8bKny8
OK, I understand how you have structured the report now. I think the approach is a little wrong. It's like you are mixing two appraoches.
If you are trying to make this like a "Wizard", step-by-step approach, then you could simply change your main report to have 3 text boxes, one for each report, with a "Go to Report" action set. This will simply open the 'subreport' (it won't technically be a sub-report now) and then you can select parameters as normal. Optionally, format the textbox and make it look more like a button.
The other approach if you want to do this all in a single step would be to change the main report have all the parameters that are required across all subreports and allow the user to set them there (in the main report). These parameters can then be passed to the subreport via the subreport properties (parameters tab).
It really depends on the user experience you want to achieve but the simplest option would be the first option.
If this does not help, I'll try to post an example later tonight.

SSRS report objects rendering

I have a SSRS report which contain two Tablix objects with different format, one for horizontal and another one is vertical. Both are using the same procedure. The objects are hiding based on one report parameter what the user selecting "Horizontal/Vertical".
My question is that when the user selecting one format and viewing the report, both the objects will render the same time or only one based on the selection ?
Some processing occurs, but not all.
I believe any report processing (calculations) will still be executed even when an element is invisible - see Adriaan Stander's answer here
If you inspect the HTML that is generated you will see that the HTML from the invisible elements is not there. From my experience with .Net and the visible/invisible setting I believe this would avoid the HTML processing both on the server side (the HTML is never generated) and on the browser side (there isn't any extra HTML to display).
Basically, any caluclations (SUM, AVG, etc) will still be executed, but the actual HTML rendering will not happen.

Conditionally setting visibility-toggling in SSRS

I have a report in SSRS 2008 R2 that lists medications and prescriptions. The prescriptions are hidden unless you click on the medication + box to show them.
Now, in some cases, we don't have any prescriptions listed for a given medication -- they're managed by an external provider, but we want to track their existence anyway. This leaves me with the case where we still have the + box, but clicking on it shows an empty line. Is there any way to conditionalize the ability to toggle the line's visibility? Thanks.
ETA: Ok, I just figured out a partial answer to this. I had a spare textbox available, so I added the text "Show scrips" to it and made that the controlling box for the toggle, and then swapped its own visibility depending on whether there were actually scrips to show. However, this makes the borders go away, as well as the contents. Short of removing all the borders (which might be the proper solution, actually), any suggestions?
Here's a thread that discusses this issue: you basically put the +/- into another column and show/hide that based on whether there's data.

flowdocument pagination - forcing elements to appear on a new page

when i print a flow document, I want certain elements - paragraphs, tables - probably marked with some attached property to:
be transferred to a new page if they do not fit entirely on the previous one
or
always appear on a new page.
Has anybody done it already or has an idea how to do it?
Cheers
Seems like you are on the right track for the permanent page break.
The 'Paragraph' object has a property called 'KeepTogether' which would achieve your first bullet point. If the blocks within the 'Paragraph' do not all fit on one page, all of the blocks will be moved to the next page. There is also the similar property 'KeepWithNext' which allows provides the same behavior, but groups 'Paragaph' siblings together.

WPF FlowDocument Table of Contents

I've got an application that generates a fairly long FlowDocument. It uses a "custom" paginator to wrap a header and footer around each page when printed. In addition, each page contains one or more "subheadings".
I would like to have it also automatically create a table of contents for this document, showing what subheadings appeared on each page.
Here's the trouble. I don't know what subheadings appear on each page until I print the document and it passes through the paginator, which breaks the document into pages. But by that time, everything has been reduced to Visuals and seems to no longer contain any relevant information about the actual objects that I put in the document (so I can't read any Tag properties or even the content).
Does anyone have any clever ways that I could determine during/before printing what items appear on each page?
The way I've done this is to create a FixedDocument instead of a FlowDocument, with my helper class. Leave room for the TOC or you can re-flow the whole thing afterwards. As I add each item I know which page it's on, so I can generate a TOC afterwards. FixedDocuments are very easy to generate and print.

Resources