Use report components several times during report generation? - visual-studio

I'm maintaining a project which uses a pretty hefty Crystal Report and, during moving from VS2008 to VS2010, the report just stopped working at runtime (but it still Previews just fine. Go figure.), so I'm having to reconstruct it from the ground up.
During report creation, several parts of the report are used more than once. The following section shows the basic layout of the main report page (each bullet point represents a different section of the Main Report form), along with the behaviour of each section.
On Page 1
The first section of the main report form is empty, but the empty space in it appears not to print
The second section of the main report is printed
The third section of the main report is not printed
The fourth section of the main report is printed
Subreport A may be printed, depending on a data element
Subreport B is printed
SubReport C is not printed
Main report footer is printed
On Page 2
The first section of the main report form is empty, but the empty space in it appears not to print
The second section of the main report is printed
The third section of the main report is printed
The fourth section of the main report is not printed
Subreport A is not printed
Subreport B is not printed
SubReport C is printed several times, according to the number of rows returned by a query, one printing for each query
Main report footer is printed
If SubReport C is printed enough times, another copy of Page 2 will be printed, with the two main report sections (2 and 3) reprinted on each page.
What I want to know is where I can program these things to happen. I can't seem to see any code that's actually giving these instructions. The only code that's used to generate the report at runtime is, reportObject.ExportToDisk(), so it's not being done there.

Go to Report->Section Expert and you'll see all the options you're talking about. For each section & subsection, this is where you can suppress sections, move content to new pages , etc. (Once you're in there, you can F11 for help.)
To activate an option only on certain conditions (like the value of a field), use the X-2 button to enter the Formula Editor. In most cases, you'll have to make a formula that results in a boolean value.

Related

Printing issue with SSRS report

I have run into a problem with an SSRS report..... The report will generate around 20 pages, with unique data on each page. I have used a page break to do this.
At the top of each page is some data referring to each page.... a vehicle reg number, a driver name etc. This data is coming from an expression. reportitems!.columnName.Value & reportitems!.columnName.ValueWhen the report is run, in design mode, or viewed in Chrome after being deployed, each page has the correct data at the top of the page.... the driver name changes etc.
However, when the report is printed from the browser, or exported to a PDF, the data at the top of each page is now the same. Basically page 1 info is repeated on each page. The report data is still unique on each page, but the reference at the top has now repeated.
Has anyone ever encountered a similar problem, or any idea what may be causing this? I am very confused, as before printing, the report is showing all data as expected.
The 2 images show page 1 and 2 of the report, both numbers in the expression are different.
This image shows page 1 and 2 in the PDF, both numbers are now the same.

Crystal Reports: Suppress entire report including blank page when no records

I have multiple reports that are automatically printed through another program, and often times the there is no records for that specific report, but since it is automatically triggered it attempts to generate and print the report.
Using suppression formulas, all sections now appear blank and I only have a clean white page remaining (this includes all subreports, page headers, footers, etc. I have tested to ensure that each section is actually suppressed and not just blank).
However, this blank page is still being 'printed' as program printing it still views the blank page as a report.
How do I essentially suppress the entire report so that not even a blank page appears?
A little more info:
The program printing the report generates very basic input parameters for the report, which is a link to a table in the database that is used to gather all the information for the report (basically the printing program always has data to send even if the report is blank).
I am using crystal reports v12.

Print SubReport is in next page using IReport 5.5.0

I have use one sub-report in main report with use of jasper Reports. sub-report is print half of is in one page and other half in next page. but i want to print it is in single page. Please help me.
You can set SplitType to equal Prevent in the detail band properties, but that only prevents a band from splitting from page to page, forcing it to begin on the following page of your report. If the output of your sub-report is naturally longer than the page height you have set, then this will just force the sub-report to begin on the following page. I do not think this would be a desirable outcome since in that case the subreport would still populate two separate pages (actually 3 if you include the resulting blank first page).
All that said one solution would be to check off "Ignore Pagination" in your main reports properties. This will ensure that your entire report is viewed as one single page, but this causes problems when printing or PDF'ing.
You are a bit vague in your question, but its also possible that the detail band height is too high. IReport is "pixel perfect" so if the subreport element begins in the middle of the band then that is where it will start. Also if you have title, page header, or column header bands that are not being used, these will result in unwanted white space.
Hope this helps!
There is a property called "isSplitAllowed" in the band tag that should help you.
http://jasperreports.sourceforge.net/schema.reference.html#band

sub report always coming second page of crystal report in visual studio project

I designed crystal report like this:
in this i have a sub report named
TransactionDetailed
that i given in ReportFooter part. while coming records am getting two problems
1->sub report heading not coming all pages,,i want to show sub report heading where ever i am getting subreport
2->in first page of my crystal report only showing main report...not getting sub report,,sub report alwayes showing 2 nd page of my crystal reports onwards,,
how i can resolve these two issues?
The way your report is structured is the reason you are not getting correct results. Report Header and Footer should only contain information you want to show ONCE. Page Header and Footer should contain information you want to see on every page (i.e. a logo, legal info in the footer, etc.). Group Header and Footer will show data for the items you have grouped by. The detail section will show all data that pertains to the group. So either group your data and then put the subreport in the Detail section or create a second detail section and put your subreport in there.

Birt hyperlinked reports in single page

Is it possible to have 3 reports all linked to each other on a single page.
Suppose I have 3 reports. First one drills down to second and second drills down to third i.e. on clicking on first report the second opens and on clicking on second the third opens. Also the second report needs parameters which are passed down from the first report.
Now these reports open up in a new page on clicking. I want the second report to open below second report and third below second. Is this possible??
Short answer:
Yes
Longer answer:
There are a number of different ways of combining reports and linking them to each other in BIRT. Reports can be delivered as web pages, PDF, Excel, etc. Obviously differing deliveries would want different solutions.
If your are delivering to PDF where the report would be printed, you can essentially put three reports (tables) on the same document which all show the results based on the same parameters
If you are delivering as web pages you can have links in pretty much any place on the report that will jump to another report using a value as a parameter (i.e. Report1 = everything for a week; click on "Monday" see Report2 with just everything from Monday; click on "Noon" and see Report3 with just everything from Noon.

Resources