I am creating a report using SSRS 2008 consisting of a page with a single tablix, a header, and a footer. As far as I'm concern, the report itself isn't that complex. But when I tried to export it to PDF format for printing, several issues ensue:
When using the expression ="Page " & Globals!PageNumber & " of " & Globals!TotalPages in a textbox in the header, the displayed TotalPage number is not equal to the actual total pages in the report.
The pages after the printed TotalPages in the report does not display the page header and footer anymore. For example the actual total page number of the report is 50 but whats printed in the header is Page x of 42; after page 42, the pages does not display the Header and Footer anymore
The tablix applies pagebreaks at random pages eventhough there is no pagebreak condition to any group in the tablix nor on the tablix itself causing half of the page to be blank and the continuation is on the next page.
Does anyone know any fix or workaround on these issues? I've searched high and low on the internet on how to fix these issues but I always arrive at dead end. Please leave comments that you think can help, it will be greatly appreciated. Thanks!
I've helped solve a similar problem a few weeks ago.
Sometimes, any errors in expressions or custom code has side-effects that cascades into the report layout (sometimes causing pagination anomalies, layout issues, etc.). Just check if your expressions are error free, or if there are any scenarios that can cause some expressions or custom code to have errors (like null references, etc).
Also, check if you are calling custom code in a hidden control. From experience with SSRS 2008, custom code inside a hidden control or table row produces side-effects on total page counts, although I've yet to verify if these side effects still happen on newer versions of SSRS (like SSRS 2008 R2).
Related
I have a tablix that contains a fair bit of verbiage. There are other tablix that contain a user defined amount of information. The tablix that contains the large amount of verbiage comes afterwards. Upon printing the report, the row of the tablix that contains the large amount of verbiage will push to the next page every time. I am looking to prevent this from happening.
I am not using Row Groups.
I have set the Page break options to Keep together on one possible checked and unchecked.
I found putting the tablix inside a text box helps control this. See below:
Another thing that helps is applying filters to the row to handle how many results are displayed. See below:
This should prevent the page over flowing onto the next. To fit as much data as possible on the page you can always change font size or squeeze everything closer together.
Hope this helps.
Thanks
Gav
I'm running into an extremely strange issue that a user of mine is reporting:
A Crystal Reports report is printing blank pages past a certain point. My troubleshooting has sort of narrowed down the culprit, but at the same time, has displayed some inconsistent results.
Here's the lowdown:
The application is a VB.NET application, using .NET 4.
There are multiple Crystal Report reports embedded in the solution, and a single form is used to display and print any report.
Which report to display is handled through the code backend, and assigned to the form's CrystalReportViewer object before showing the form.
For the problem report, the datasource comes from a SQL query run in the code, and then assigned as the report's datasource, and then the report is assigned as the reportsource for the CRV object in the form.
The label printer is attached via USB to the computer in question, with the installer used to provide the drivers.
If it matters, it's a Citizen CLP-7201e label printer.
The code that assigns the datasource to the report is as follow:
myCommand = New SqlClient.SqlCommand(strSQL, conPlanning)
myCommand.ExecuteNonQuery()
Da = New SqlClient.SqlDataAdapter(myCommand)
Da.Fill(dsData, "TempPrintLabels")
rptPrintLabels.SetDataSource(dsData.Tables(0))
rptPrintLabels.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait
frmReports.rptViewer.ReportSource = rptPrintLabels
frmReports.Show()
strSQL is a basic SQL statement, based on which report is selected from this particular form. The report's SQL query is, SELECT * FROM TempPrintLabels.
There's the basic info. The report generates fine, and for reports with ~100 labels, it prints fine. The strangeness happens when the report exceeds that limit; it's somewhere in the 95-120 label range. It doesn't seem to be consistent. The report will print, up until it hits that certain point. At that time, it will print nothing but blanks for the rest of the report. There will be as many blanks as there are supposed to be remaining pages. If you start the job again at the point where the blanks started, though, it prints fine.
When I look at this report in the CrystalReportViewer, it looks fine; all the labels render properly. When I print it to a PDF or text file printer, all the pages are there. So the report and print generation seems to be working to me.
I thought it was the printer. To test that, I printed a 185 page job to PDF, and then printed that to the printer. That printed absolutely fine.
I'm at a loss to explain this, or even diagnose this further. There is no code in the form for printing; it uses the CrystalReportViewer object to handle everything. If it was this CRV object, the printing to PDF should've given me blank pages. It didn't. If it was the printer, it should have started printing blanks from the PDF right around the same point as printing directly from the CRV object did. It didn't.
What else can I look for?
For this question, I have some thoughts which causes this behavior while printing.
It may the width issue of your all label's length exceeds from the page size. So you can check all the labels and pages are not blank when you shrink the width of labels (even labels not show properly, we can handle separately). If it shows not (as currently you getting), then you just handle labels width by "Can grow" option to true for all labels.
If everything fine, then I think you can check your printer's page setting / margin.
If above is not work, then either create new report or existing report with just adding static labels and values and then first preview and then call from code. Something you find with this.
As per my experience(I may be wrong in this case), whenever blank page comes in crystal report when your columns will increase, the report's width create an issue. So either set report width to decrease or set printer page bigger. So it print, other wise it not throw error, but give blank pages.
I have a bill application in winforms using reportviewer and showing rdlc report in it, I have a main report and a subreport in it
now the problem is that when i have less than 40 items it shows the report fine, but if its more than that the data comes from next page, please see the reports and ourput
Main Report
SubReport
Normal display when 25 records
When it is 40 records pg1
Second page
any help will be appriciated
try Unchecking Keep together on one page if possible option in Page break options.
I'm using vs2010, and it looks like you're in 08? so it might be a little different but I'll give it a try (mostly because I am looking for some help as well and I know how frustrating it is using this when there's not a lot of "quality" answers out there for specific problems).
In the subreport rdlc file, make sure that the "PageBreak" property (on the table containing your columns) isn't set to "start." I would just set it to "none."
What I believe that is happening is that it's moving it to the next page because it won't fit on the first page. what you can do to try to get around that is include everything on the main report in a rectangle (in the rectangle, set pagebreak = none, and keeptogether=true [I'm not sure if you actually want keeptogether=true... if it squeezes everything onto one page by resizing it set it to false]).
Hope I helped
I have a SSRS 2005 report that I'm rendering in SSRS 2008 as a .pdf. The report contains (among other things) a table that's very simple: header row, details, no footer, no aggregation, no grouping, keep together = false, pageBreakAtStart = false, pageBreakAtEnd = false, repeatHeaderOnNewPage = true. I resized the table to be much narrower than the body of the report just to be sure it wasn't extending beyond the bounds of the report, pushing everything down. But, no matter what I try, if some of the detail rows in that table would need to be pushed to the next page, then the ENTIRE TABLE is pushed to the next page, not just the extra rows.
So my question is: Is there a workaround for this problem, is this a known issue, or is it even possible to get this 2005 report to render properly in 2008?
NOTE: this is related to a question that I previously asked here, and is based on this MSDN forum post started by a coworker. This question is not the same as my previous question, as I'd like to see things work properly in with a 2005 report. If it's not possible, that would be good to know, as it would indicate that we need to upgrade one of our servers to SQL 2008.
Have you tried putting the table inside a rectangle (and check indeed that the table is a child of the rectangle using the Document Outline pane)
Actually, I did exactly the opposite of what is suggested in the other answers here...My table was already inside the rectangle, and it was still shifting to next page. So I removed the rectangle, and it seems to be working without any issues now!
Weird..But may be it all depends on the over all layout of the report or something.
Thanks!
I have faced a few problems in PDF Export and most of them were solved when I placed the Table within a Rectangle. That would be worth trying !
I'm using VS 2005 Report Viewer WinForms control (ver. 8.0.50727.42)
I got similar problem.
The problem occur when I try to put some text before Table (to display as Report header).
By adding this report header, the first page available height is less than others page height.
When the rows of table exceed to fit on the first page but can fit on the second page, the whole table move to second page and the first page leave blank with report header only.
But when the rows of table exceed to fit on first page and also exceed to fit on second page, the table display on the first page as normal.
If first page and other pages have the same available height, the problem not occur.
I think this is effect of KeepTogether option. But I already set it to False.
I try both True/False KeepTogether option, same result. May be KeepTogether option of Table control is not working at all.
I'm using Visual Studio 2005 and writing in VB.NET.
I have a subreport in a Crystal Reports report consisting of a list of log entries. Sometimes the list of log entries is long enough that it would extend onto the next page. What I see happening is that the list appears on the next page, leaving a big blank space at the bottom of the first page.
I've tried unchecking the "Keep Together" boxes in the "Experts" in a number of different places (sections, groups, etc.) but see no change in the output.
I'm guessing that this isn't the right way to go, but do you know what is?
(I'll be glad to provide more information if I haven't given enough.)
Thanks as always!
remove the subreport's 'keep object together' option.