This is a migrated thread and some comments may be shown as answers.

Blank Pages - no subreports Q3 2012

2 Answers 62 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 2
Doug asked on 08 Nov 2012, 05:39 AM
I have been struggling with this problem for about a week now and have tried every trick I know and then  some.    I have looked at various articles in the forums : http://www.telerik.com/community/forums/reporting/telerik-reporting/every-other-page-is-blank.aspx with no success. 
I have a simple report  with 7 groupings where the data is coming from a SQL stored procedure.  The SP runs fine but some result sets produce the report with every other page blank and other datasets produce the report perfectly.   It runs the same sp in both cases.  One case returns about 450 rows and the other about 520.  I have set the detail line visible to false and then the report runs fine so I suspect it does have something to do with the detail.  I have also tried setting each control to visible = false 1 at a time but that did not work.  Short of sending in a project to debug, is there anything else I can do to track this down.  There is NO code behind in the report so everything being manipluated in the report is done in the designer.

The detail line as about 8 fields on it.

Any other suggestions on how to track down the issue before I bundle up the project.  (The database is well over a gig so I would have to get that down and change the DB to some stand alone db in order to make a project for you to look at.

Doug

2 Answers, 1 is accepted

Sort by
0
Doug
Top achievements
Rank 2
answered on 09 Nov 2012, 02:56 AM
Ok, after a week of frustration, I have found the problem.  Maybe this will help others along the way and Telerik can think of a way to alert to issues in dev mode when testing a report.

I was pulling my hair out because of these double pages.  I started narrowing down my result set as the more I played around with all the settings in the report, the more I started to consider maybe it was a data problem. I looked at the data and found that one of the text fields had CRLF's embedded in it.  However this should only affect the page that the record was on.  I did a replace on it anyway but no success.  Still produced 300 pages on a 150 page report.  I then started to removed detail records a client at a time until I narrowed the issue down to 1 specific client. 

As it turns out, 1 of my fields was a calculated field

= IIf( CDbl(Fields.WFee) <> 0,IIf((CDbl(Fields.Wwrupdn) + CDbl(Fields.WFee) - (CDbl(Fields.WFee) - CDbl(Fields.WBilled))) <> 0, ((CDbl(Fields.Wwrupdn) + CDbl(Fields.WFee))/CDbl(Fields.WFee)),0), 0)

The field was actually at runtime displaying a divide by zero error when I ran just that one client and the error pushed the right margin out past the width of the page causing the blank page.  When the report was rendered it must have taken this as the page width and set it for every page..  What is frustrating is that the RED ERROR BOX DID NOT SHOW up when running the report with multple clients including the one with the error.

it would be helpful that if in development mode that a error log would be created of things such as this so you can track down errors quicker.  It would have saved me a ton of time and turned a 56 hour project into a 6 hour project  (ok maybe I am exaggerating a little but still..... :) )

Oh, and one more thing.  The above expression was checking for 0 so it would not get the divide by zero error BUT I did not have the numeric fields wrapped in CDBl's so it was treating 0.00 as NOT 0.....

Duh!!g

 
0
Steve
Telerik team
answered on 12 Nov 2012, 04:28 PM
Hi Doug,

We tried to reproduce the problems you have described locally but could not. You're partly correct that the calculated field does not show the exact error thrown, but it does show a more generic one that it cannot find the calculated field (as it is broke due to the exception in the expression). So the red error rectangle is always displayed and we have not been able to identify a scenario in which it does not show. If you can isolate this issue in a sample runnable project, we would appreciate it.

About dividing to zero, both 0 and 0.00 are considered invalid attempt to divide by zero in our local tests.

All the best,
Steve
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
Doug
Top achievements
Rank 2
Answers by
Doug
Top achievements
Rank 2
Steve
Telerik team
Share this question
or