Skip to Content
avatar image
Former Member

How to use an Object Data Source in .NET 4.6?


we are currently using an older version of Crystal Reports (2011) for use in an older application.

At the moment we are evaluating the 2016 version as we plan to use the reports in our new web api project, however we struggle to find important documentation in the trial.

We are planning to use Crystal Reports 2016 in an ASP.NET 4.6.2 Web API project in Visual Studio 2017 for generating PDF reports in the background and offering them as downloads through our API.

We want to build a report that uses an object graph created from various data sources and other APIs. For that we created a normal Object Data Source from the Visual Studio Data sources designer and are building this from our business logic layer.

However, we struggle to get this Object Data Source into the Crystal Report Designer in Visual Studio.

With DevExpress reports, this is as simple as following this tutorial:

however, if possible we want to avoid changing the report engine to Devexpress as we have experience with Crystal Reports and would rather like to upgrade to the current version instead of exchanging our reporting technology alltogether.

Can you please show us how we would connect our object data source to the Report designer to use the properties of the objects as fields?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 17, 2017 at 05:44 PM

    Hi Sven,

    CR for VS runtime is here, read all of the info on that page please.

    Go here for samples:

    You don't need to use that third party tool for making a WEB app.

    Create a new WEB site,

    Select a CR report web app

    Change the Page_Load to Page_Init and add these 3 lines:

    CrystalDecisions.CrystalReports.Engine.ReportDocument rd = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
    CrystalReportViewer1.ReportSource = rd;

    Now run the web app and you should see a report.


    Add comment
    10|10000 characters needed characters exceeded