Skip to Content
0

How do you get around an object ref error using 9+ page on-demand subreports in SP 18 and SP 19?

Mar 25, 2017 at 01:49 AM

47

avatar image

We get an object ref error when running reports with an on-demand subreport that goes over 9 pages, after the first page of the on-demand subreport. We are using the Winforms Crystal Reports Viewer. No error is received running through preview in the Crystal Reports 2016 designer. We build our reports using an ADO.NET (XML) connection to an XSD file.

SP17 DOES NOT HAVE THIS BUG, but SP18 and 19 do. We need to go to SP19 for other fixes. This is reproducible at will.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Judy Tosten Mar 31, 2017 at 03:29 PM
0
More info: Our particular environment is a VB.net Windows application written in Visual Studio 2015 Update 3 running SP18 or 19 of CR for VS and Crystal Reports 2016. We use an offline dataset that is set by the app at runtime through the ReportDocument.SetDataSource method. We set this for the main report and each of the subreports. We use the Crystal Report Viewer for display of the report in the application. When a report with on-demand subreports is run, that report will take an object reference error after the report has displayed 10 pages AFTER the first on-demand subreport. So if the first sub is on page 1, we'll take the error paging from page 10 to 11. If it's on page 2, then the error occurs paging from 11 to 12. The same report with all on-demand subs suppressed will not take this error and the error will occur whether the report has 1 or multiple on-demand subs. If the report is less than 10 pages in total, we won't see the error. So it's definitely pages and not # of subs displayed that causes the error. We aren't using SQL Expressions or Business One, nor does the report use an ODBC datasource. At runtime all of the data is passed to the report through the SetDatasource Method.
Share
10 |10000 characters needed characters left characters exceeded
Harag Harag May 24, 2017 at 03:11 PM
0

I'm having the exact same issue but with version:

13.0.2000.0 - SP 20

We've just upgraded from CR 2008 (big jump) to 13.0.2000.0 SP18 - and had the issue, tried SP20, same issue. I've noticed that it's exactly after 10 pages - Using the group tree view on the left, if I randomly click them and load them up in random orders, the same issue happens after 10 pages. As well as starting from the beginning and just clicking the "next page" button.

Disappointing that you don't have any answers to this or that it's not been fixed in 3 versions... Think I'll try SP17 just in case.

Share
10 |10000 characters needed characters left characters exceeded
Harag Harag May 25, 2017 at 07:38 AM
0

Strange - I've now uninstalled all of the CR VS stuff and installed SP 17, I still get the same error - as soon as I move to the 11th page (either clicking Next, or randomly clicking ones on the tree) I get the same issue.

Share
10 |10000 characters needed characters left characters exceeded