?
Solved

Database Login box when running Crystal Report

Posted on 2014-01-22
24
Medium Priority
?
2,232 Views
Last Modified: 2014-02-07
Hi,
I'm using Crystal Reports with Visual Studio 2010 and SQL Server 2008r2.

The app I'm developing allows users to select criteria and view reports in a report viewer control.  All reports work fine on my machine (of course). When I deploy using click once, to users some of the reports pop up a database login box. Some do and some don't which is perplexing.  The reports that pop up the login box are very similar to those that work fine.  The reports use stored procedures and I have granted the users connect and execute rights to the database.  
These same users use a different app that is set up almost identically and connects to the same server, but a different database and there is no prob with any of those reports.

What can I try here?
Thanks,
Dave
0
Comment
Question by:coperations07
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 13
  • 11
24 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 39800326
Did you give execute rights to the stored procedures?

Do all reports use the same database connection?

Are these run from a web server or is the application on the client?

mlmcc
0
 

Author Comment

by:coperations07
ID: 39800406
Yes to execute rights.

Yes same connection.

It is a winform application on the client.

When the login box pops up it shows the server but the database textbox is blank and not enabled for entry. Also the integrated security checkbox is not checked.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39800766
INtegrated security is controlled through the report.  Check the database connection in the report.

mlmcc
0
Stack Overflow Podcast - Developer Story

Welcome to the Stack Overflow podcast recorded Thursday July 20 at Stack Overflow Headquearters in NYC. Your hosts today are podcast regulars Jay Hanlon, David Fullerton, and Ilana Yitzhaki, plus the quite irregular Matt Sherman (Stack Overflow Engineering Manager extraordinaire)

 

Author Comment

by:coperations07
ID: 39800947
The report properties show the correct server and db and the integrated security is set to true.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39801436
Are you connecting through ODBC?

mlmcc
0
 

Author Comment

by:coperations07
ID: 39803502
Its using OLEDB(ADO) and provider SQLNCLI10. I have the connect set in the crystal report and the app just opens it up like this:

ReportDocument rpt = new ReportDocument();
string sRptName = lstReportingReports.GetItemText(lstReportingReports.SelectedItem);
            //load the selected report.
rpt.Load(Properties.Settings.Default.setRptPath + sRptName + ".rpt");
..............pass parameters............
crvRReports.ReportSource = rpt;
crvRReports.Refresh();

Open in new window


***EDIT...sorry missed the load line.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39804398
Try taking the refresh out.  It tends to throw away any changes you made to the parameters and logins.

Also SQLCLI10 is a MS access method.  I don't think it is ADO.

mlmcc
0
 

Author Comment

by:coperations07
ID: 39806797
I attached a copy of what the report's datasource properties show.  I took the refresh out, but I'm still waiting to hear back from the user whether it worked or not.
Datasource.doc
0
 

Author Comment

by:coperations07
ID: 39812144
Taking the refresh out didn't do it.  Still getting the login box.
0
 

Author Comment

by:coperations07
ID: 39836089
So I'm thinking either security issue or reference issue.  Security because it works on mine but not theirs. Reference because I had to add several references to the project to get the clickonce install to work. Is there anything else I should be looking in to?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39836983
I don't think so.  I assume this is a fat-client application and not web-based?

mlmcc
0
 

Author Comment

by:coperations07
ID: 39837050
Right its a fat-client.

I logged in to a user pc as myself and tried to run the reports. I get the same database logon message when I'm logged in on theirs. When I run from my pc the msg doesn't pop up.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39837065
How do you connect to the database?
If you are using ODBC the ODBC connection must be added to the machine using the same name.

mlmcc
0
 

Author Comment

by:coperations07
ID: 39837093
OLEDB with integrated security
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39837385
I assume the PCs are in the same domain.

mlmcc
0
 

Author Comment

by:coperations07
ID: 39837434
Yes they are in the same domain.

The rpt files are stored in a network folder where the app can access them. I upped the user security to include modify, but that didn't help.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39837702
I assume the login prompt is for the database and not the shared file system.

Have you tried changing the data source location?
Create a new OLE DB connection to the same database and change the report to use it.

mlmcc
0
 

Author Comment

by:coperations07
ID: 39838814
The prompt is for the database. It shows the server name but the database box is empty and it is not enabled for entry.

I'll try changing out the connection and see if that might do the trick. Thanks
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39838889
If they add appropriate credentials (userid and password) does it work?

mlmcc
0
 

Author Comment

by:coperations07
ID: 39838957
No. The id and pass can be entered but the database box is empty and not enabled.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 39839468
SO entering the id and password won't allow it to run?

Is the SQL client installed on that machine?

mlmcc
0
 

Author Comment

by:coperations07
ID: 39839909
Right the id/pass entry does not run.

I think you may be on to something with the sql client. It is not installed on user machine. I changed the provider to SQLOLEDB on a quick test report and it opened on the user machine. I'm going to try to change the provider of an existing report and see if it works... Is there a benefit to using one provider over the other?

Thanks,
David
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39840997
Only if one requires a costly license per user.

mlmcc
0
 

Author Closing Comment

by:coperations07
ID: 39841755
Looks like this has got me going. Thanks for the help mlmcc!
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question