SandyB Posted November 13, 2003 Posted November 13, 2003 I'm trying to develop crystal reports for a VB.NET app. I created a report and added a crystal report viewer to my form in my app. When I run the app and open the form to display the report, a login screen appears to enter a password. Is there a way to by-pass this - i.e. code the user name and password in the viewer? Quote
Moderators Robby Posted November 13, 2003 Moderators Posted November 13, 2003 Where is the prompt coming from, Crystal or a database connection? Quote Visit...Bassic Software
SandyB Posted November 13, 2003 Author Posted November 13, 2003 I'm not sure. I think it's coming from Crystal because on the top of the login screen it says - Main report. I have another form that retrieves data from the database, but the connect string has all the info so the data is automatically retrieved when the form opens. Quote
pcPirate Posted November 14, 2003 Posted November 14, 2003 can you show the code of your crystal viewer form ? pcPirate Quote Be you his eunuch, and your mute I'll be: When my tongue blabs, then let mine eyes not see.
hog Posted November 14, 2003 Posted November 14, 2003 I vaguely remeber this happening to me once? I think there is a post on this site regarding it if you have a search... Quote My website
SandyB Posted November 14, 2003 Author Posted November 14, 2003 Thanks, hog - I did find some other postings on this issue. I will try the suggestions there. Quote
Moderators Robby Posted November 14, 2003 Moderators Posted November 14, 2003 I've had a prompt from Crystal when the connection to the DB was invalid, it asked for Server name and username/password, is this what you get? Quote Visit...Bassic Software
SandyB Posted November 14, 2003 Author Posted November 14, 2003 No - the prompt has the correct database name and userid and it is prompting for a password. Quote
SandyB Posted November 14, 2003 Author Posted November 14, 2003 In case anyone is interested, it was pretty simple: VB: Dim myReport As New CrystalReport1 myReport.SetDatabaseLogon("userid", "password") CrystalReportViewer1.ReportSource = myReport Quote
pcPirate Posted November 15, 2003 Posted November 15, 2003 is that mean your problem is solved? Quote Be you his eunuch, and your mute I'll be: When my tongue blabs, then let mine eyes not see.
SandyB Posted November 17, 2003 Author Posted November 17, 2003 Yes - but I do remember seeing a question about how to get rid of the logon screen when you have an embedded report. Not sure if that was solved. So far, I haven't needed to do that. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.