Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal 9: Reports viewed using runtime don't ask for DB ID & password

Status
Not open for further replies.

cummina

Programmer
Feb 25, 2005
7
0
0
US
Hi there-

I designed a report in Crystal Reports 9, database in SQL Server 2000. Very straightforward - nothing more complicated than a parameter and a couple of formula fields.

What I'd like to do is save the report to a shared network drive and then have my user run the report from her desk. She has the runtime version of Crystal.

When I try to open the report on a computer that has the Crystal runtime only, I'm prompted for my parameters (a range of invoice numbers), but once I enter the parameters, I get the following error message:

"Unable to connect: incorrect logon parameters".

I got the same message when I tried removing the invoice range parameters from the report. The only time I don't get this message is when I save the data with the report during design time.

This leads me to believe that the report hasn't saved the user ID and password for the database I'm basing the report on, which is fine - but I never get a chance to enter a password to connect to the database. The error message just closes and that's it.

Is it possible to get the report to prompt for a database user ID & password when it's opened using the Crystal runtime? Is there any way that I can do this without having to distribute the report using RAS? Am I misinterpreting this error message entirely?

Thanks in advance for any help-
Anne
 
Did you write the Report Viewer application? If so, what language was it written in?

For VB 6, you can use the TestConnectivity method to see if the connection information stored within the report file is valid. If not, then you can display a logon screen (of your own design), then use the values entered by the user to attempt to set the login info for the report:
Code:
If Not Report.Database.Tables(1).TestConnectivity Then
   'Display a dialog for the user to enter a UserID and Password
   'After you get the info back from the user, you can set _
     the login info for the report like this
    Report.Database.Tables(1).SetLogOnInfo ServerOrDSN, DbName, UserID, Password
End If
If for .Net, have a look at this kb article:

-dave
 
Thanks Dave -

I didn't write the Report Viewer at all. It's called Crystal Reports 9.0 Runtime Files, which I assumed came with our purchase of Crystal Reports 9.

Now I'm wondering if it's something that one of our vendors wrote and included for their customers - unfortunately, if that's the case I might be out of luck, since I was hoping to use this runtime to distribute reports for a different application.

Although a Google search of "Crystal Reports 9.0 Runtime Files" does turn up a bunch of hits not related to our vendor... but they all look like 3rd-party software... Argh...

Now I'm confused. Are the Crystal Reports 9.0 Runtime Files something that come packaged with Crystal Reports itself? Am I asking for something that's so specific to us and our vendor that no one's going to be able to help?

Can you tell I'm frustrated? ;) If RAS was an option for us, I'd just go with that - but we don't have the resources available.

Thanks-
Anne
 
Sounds like something that was installed during an installation, likely from the vendor. The runtime files cannot run a report. They're used by an application developed using the Crystal RDC (Report Designer Component). If you have a Viewer application of some sort, the runtime files are what allows you to view Crystal reports without have the Crystal Designer installed.

Does the application from the Vendor allow you to view reports (like its own set of 'canned' reports)? If so, you might want to contact them to see if you can add your own custom reports, and what, if any, guidelines you need to follow so your reports will run within their application.

If that's no good, you can invest in a Report Viewer. A partial list of some of the more popular avaiable ones can be found here:

-dave
 
Thanks for the clarification, Dave - the app from the vendor does let us view its own set of Crystal reports, and we can even pass parameters to it - but since it's not the app I'm trying to use these runtime files for, I don't think the vendor can help us much.

I'll look into getting a report viewer instead. I appreciate the help!

Anne
 
If you put a \ after your command and or your "tables" it will pass the user's permissions on to the tables. IF you have deeper permissions that require security on the IAL level then it must be \\ following the tables.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top