If I need the report to always show the most current data, do I have to use RDC to connect to the database. Right now I can only view data that has been saved with the report and cannot seem to get it to retrieve the data as it is being viewed.
I've tried doing the same but when I do, I get the error "An Error has occured on the server in attempting to access the data source". I am using the sample code provided by seagate along with a report that I created to get an idea of how it works and thus far have had no luck trying to get it to connect to the database from the web. I was told that it depends on how you connect to the database when creating the report but this doesn't seem to make a difference either as I've tried various different ways.
Are you using a DSN on the web server?
I've been trying to get this working for some time now and I'm close but it seems that something is missing. I'm beginning to get very frustrated with this.....
Some of my clients use a DSN for the web server. When they do, I have an exact DSN name on my computer so that there will be no problems with the dsn information. Are you using Crystal Enterprise on your server or an in house package?
We're using the developer's edition and have Crystal reports installed on the server. We no longer use dsn's on the server and when developing an asp application, we instead use a dsnless connection. I was just unsure if this would make a difference.
Unfortunately, neither I, nor any of my colleagues, have any experience using reporting tools on the web. This limits my resources somewhat. I do have a book but it doesn't give very much information on this topic.
Sounds like your connection string is incorrect. Below is code I use in my own DLL to change location to the proper database location:
Private CrystalReport As CRPEAuto.Report
Private CrystalDatabase As CRPEAuto.Database
Private CrystalTables As CRPEAuto.DatabaseTables
Private CrystalTable As CRPEAuto.DatabaseTable
Public Sub RunCrystalReportRSPreview(DataFileLocation As String)
Set CrystalDatabase = CrystalReport.Database
Set CrystalTables = CrystalDatabase.Tables
For YCount = 1 To CrystalTables.Count
Set CrystalTable = CrystalTables.Item(YCount)
CrystalTable.Location = DataFileLocation
Next YCount
CrystalReport.Preview
End Sub
Please realize, there is a lot more to my DLL which I didn't add here, which starts (OpenReport), works with Parameters. That is another issue. Hope you find this useful.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.