Search code examples
c#xsdcrystal-reports

Remove login requirements for Crystal Report


We are using Crystal Report to display reports, which our customers uses. They can view them trough our C# applivation that uses a .rpt file, which uses tables from a .xsd file. I had to add some new fields to the report, which will be in the form of a table in the .xsd file. I can view the reports on my own pc, but other pcs requires to login to the database. The .rpt file and the .xsd file are the only ones that I have changed, but no other files. The .xsd file, however, was an older version in a different branch, meanwhile the new one should be a copy of the old one but with the new table.

We do not use the 'loggon' method anywhere, as I can see, so it should not be it.

One thing I know is that when I look in Database Expert, the old connections 'attributes' window top filed says 'Database DLL crdb-adoplus.dll' While the new one says 'Database type ADO.NET (XML)', otherwise it should be exactly the same.

I have tried: Remove all connections and then add the old .xsd file which the new table has been added, tried to redo the .rpt file from scratch, looked trough Crystal Reports forum for answers, tried to find any fields for which can hold any info.

I have found no solutions for my problem and I keep getting the login window on other pc's, but not on my own. Other pc's can still use the old, unedited template without getting the login window.

EDIT:

Ok, so when I remove the new table and choose to set the .xsd file as Database file instead of ADO.NET, then it works. I will try to create a new table in different ways, and see if it can solve the problem.

EDIT 2:

It seems like it is because of the new table. If I try to include it, then I get the login popup, but not if the template does not try to include it.


Solution

  • Ok, so I am guessing my problem is that I can't add tables as data source (in the report) and then not providing it trough my c# application.

    Our program, for the moment, does only provide the option to include the new datasource (we have a checkbox whetever the user wants to have the new fields as a sub report). I can probably go around this by either:

    A. Always send in a table to the data source, even if it is empty.

    B. Include the .xsd file in installment. It seems like Crystal Report is smart enough to understand how to handle when not all data tables are included in the data source, if it knows where the .xsd file is. I have tested by just renaming the .xsd file, in which my own computer also gets the login window when I do not include the optional table.

    TL;DR: Always provide all the tables in the data source, even if empty, or have the .xsd file available on the computer.