cancel
Showing results for 
Search instead for 
Did you mean: 

VB.Net 2017 and Crystal Report Viewer

Former Member
0 Kudos

Hi there,
I am new to VB.Net 2017 and Crystal Reports 14.

I created a report and saved it as an RPT.
I managed to get the Crystal Reports Viewer to appear on the VB.Net toolbar, created a Winform project, added the CR Viewer to a form...... So far so good.
Now I want to display/print the pre-created RPT.

I need to change the database connection string of the RPT so that it will connect to the client database and display/print the report. Can someone please provide (or point me to) some sample VB.Net code to achieve this? Examples that I have found indicate setting a ReportDocument? This "reference" does not exist in my VB.Net. If I do need it - how can I add it? I can't find any references to CrystalDecisions either - has it been replaced by something new in SAP Crystal Reports 14?

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

The .NET SDK is no longer packaged with Crystal. Instead, it's available as a free download. You can find out more about it and get to the download page from here: https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads. When you click on the link there to download the SDK, it will take you to a place where you'll enter your name and email address before it takes you to the download page.

When you get to the download page, the orange button will download the .exe that will integrate Crystal into Visual Studio. This is for installation on developer workstations where VS is installed. The blue buttons at the bottom are for downloading the various runtime install options. These are for use ONLY when deploying your application - do not install on the developer workstation. However, you'll want to download one or more of these now. The version of the runtime and the version in Visual Studio MUST match! But these buttons will always download whatever is the latest version of the SDK. There are ways to get to older versions, but it's easiest to download the runtime at the same time as you download the integration.

There's a good blog about printing using the SDK here: https://blogs.sap.com/2015/08/19/printing-crystal-reports-in-net/. It comes with sample code, including how to set the data connection for a report, that should get you started.

-Dell