Print Page | Close Window

Running report authorisation box

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2576
Printed Date: 19 May 2024 at 10:55am


Topic: Running report authorisation box
Posted By: jono1970
Subject: Running report authorisation box
Date Posted: 11 Mar 2008 at 4:52am
Hi,
 
I have designed a report using VS 2005 and dropped a viewer control on a webform. When I launch the webpage it keeps asking me for username and password to SQL DB. Is it possible to pass these credentials silently?
 
Also, when I run the report i notice that my dates are shown with time details. Is there a way to format the date so the time portion does not appear?
 
Cheers,
 
jono
 



Replies:
Posted By: jkwrpc
Date Posted: 22 Mar 2008 at 8:36am

I am thinking you likely have the answer. If not here are a couple of thoughts.  You should be able to pass the user id and password through your connection string. You can set your connection string in the web.config file and read it from there.  This assumes you are loading the report data from a dataset.

If you are using an odbc connection and pulling the data that way; then I believe under the advanced tab on the odbc configuration setup window password and user id.

Regards,

John W.
http://www.CustomReportWriters.net - www.CustomReportWriters.net



Posted By: jono1970
Date Posted: 01 Apr 2008 at 12:41am
Hi,
 
I never did resolve this problem.
 
I do have my connection string and credentials in web config, but I do I point Crystal reports there?
 
I have configured my report and set up the DB connection during design time. In field explorer I add an OLE DB(ADO) and add the SQL server IP, password and query I want to populate the report with. Finally, I drop the fields from the query on to the form and when I click on main report preview I can see my report with populated fields.
When I select 'view in browser' a authentication box appears asking for a password to the SQL server.
 
being very new to VS2005 or programming for that matter I am not sure how to tell Crystal Reports to use the password from my web config file or pass the password via vb code.
 
Can you help me further?
 
Thanks in advance
 



Print Page | Close Window