Domanda

I am attempting to create a simple Crystal Reports Viewer so we can view already built reports on multiple machines without needing crystal installed.

We are using Sage 100 Contractor which utilizes the .dbf format for its database.

I understand the basics of loading a report in the viewer, however the issues I am running into come from the fact that the data isn't always embedded in the reports. For certain ones I need to allow the users to select the database to run the report off of.

Example database location

C:\MB7\Sample Company

I have tried multiple different things, but I am sadly just not correctly understanding how to properly set the DataSource location before I load the report in the crystalReportViewer module.

I can give snip-its of my code, but that won't really show anything as nothing I've tried has correctly set the DataSource.

È stato utile?

Soluzione

My guess is that your code didn't succeed to set the database connection. Are you able to run the report on your development machine ? If yes then, the problem is related to the ODBC DSN on the other machines. If you are not able to run it even on your machine then check if you are able to run the report form the designer. It will help if you share the code, which is setting the connection.

There are cheap tools on the market , which will be able to do what you are looking for a fraction of the development price. Here is a link to a tool , which you can use for free: http://www.r-tag.com/Pages/FreeCrystalReportsViewer.aspx

Even if you decide to continue with the development of your tool you can check if the one above is able to handle the report. This will be an easy way to find if the problem is in your code or it is related to the DSN.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top