Skip to Content
0

SAPBusinessObject.WPF.Viewer.dll

Oct 16, 2017 at 03:22 PM

241

avatar image
Former Member

I get an error when loading data on the crystal report. I am using WPF to display the crystal report and want to load data on the report based on the treeview selection. A new report will be loaded based on the selection.sap-crystal-reports-error.png

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

1 Answer

Best Answer
Dell Stinnett-Christy Oct 17, 2017 at 03:10 PM
0

I would update the code where you're assigning the viewer to the tab to be something like this:

if (crystalReportViewer4 == null)
{
crystalReportViewer4 = new CrystalReportsViewer();
}
newTabItem.Content = crystalReportViewer4;

-Dell

Show 11 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks for the answer but I am still getting the same error. The crystal report doesn't get displayed still.

0

Have you tried debugging through the code to determine exactly which line the error occurs on? If so, which line is it?

-Dell

0
Former Member

Yes I have, on the line crystalReportViewer4.ViewerCore.RefreshReport, if I remove the line I get the error still.The crystal report is however added to the tab but it's empty, I want to load it with data from the database

0

Are you ever setting the ReportSource of the viewer? Would you please post the code around where you are calling .RefreshReport? It's not in the image you posted.

Thanks!

-Dell

0
Former Member

Hi, here's my code.

crystal-report.txt

0

From looking at the code, it appears that you are loading a dataset from your application. After the call to getAllEquipments(), is dt defined and does it have data in it?

Also, which version of the Crystal for VS SDK are you using? See item 5 here - https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads - for in formation about using ADO.NET datasets in your Crystal application.

-Dell

0
Former Member
Dell Stinnett-Christy
Hi, yes dt is defined and has data. I am using CRforVS_13_0_18, I am using Visual Studio 2015
0

Please look at the link I posted above for links to information about using ADO.NET data sets in your reports.

-Dell

0
Former Member
Dell Stinnett-Christy

Hi, looks like the web page is unavailable

0

I'm able to get to it with no problems. Here's the part that's relevant to your situation:

5. For reports using the ADO.Net DB connection, in previous SP's, you could only work under .Net Framework 2.0/3.5, so using in app.config is required. Now in SP21, ADO.Net is only supported on .Net Framework 4.0 or above.

-Dell

0
Former Member
Dell Stinnett-Christy

Ok. I am using .Net Framework 4.0 but will look more at ADO.Net

0