1
votes

I am using Crystal Reports for .Net Framework in Visual Studio Ultimate 2013. I am trying to use a class object as a data source. The application is ASP.Net MVC and I will populate the object before passing it to the report.

I am failing in adding the class to the report as an ADO.Net data source. I followed these steps in Database Expert:

  1. Navigate to Create New Connection > ADO.Net (XML). Click Make New Connection. The ADO.Net (XML) window appears.

  2. In the File Path field, choose the DLL that contains the class.

  3. After choosing the DLL, the Class Name field populates with the classes in the DLL. I choose the class object that I want to use.

  4. Click Finish to dismiss the ADO.Net (XML) window.

  5. Back in the Database Expert window, I now have an item underneath ADO.Net (XML) for my class. When I expand that item, there is one entry named "get_Entries." This isn't the same as data sources for other classes used by other reports. Those have an item with the same name as the class.

  6. Double click on the "get_Entries" item to add it to the report. An error message appears: "Logon failed. Details: crdb_adoplus: Common Language Runtime detected an invalid program."

  7. For info, right-click on the bad data source item and select Properties. The dialog that pops up has this information:

    • Database Type: ADO.Net (XML)
    • Internal Connection ID: a GUID.
    • Class Name: The name of the class.
    • File Path: The path to the DLL that contains the class.

For comparison, the good data source items have the same information minus the file path.

I consulted with coworkers, searched the Internet and looked at the "Similar Questions" that SO suggested. None seem to know what is going on here. Any help would be appreciated.

1

1 Answers

0
votes

Database Wizard -> project data -> .net objects.

select P.O.C.O. it should be in the namespace of the project referenced dll NO.

Then fill in the MVC controller P.O.C.O. with data and create your report after I apply it with SetDataSource