1,105,450 Community Members

Crystal Reports asks for Username and Password while loading

Member Avatar
potatochips
Newbie Poster
15 posts since Jul 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hi,

My Crystal Report is using VB.NET and Sql server 2005.
The report can be displayed but everytime it will prompt me to key in the Username n Password..


is there anyway to automatically pass the login information to reports?

thanks
=)

Member Avatar
iamthwee
Posting Sage
7,066 posts since Aug 2005
Reputation Points: 1,307 [?]
Q&As Helped to Solve: 595 [?]
Skill Endorsements: 74 [?]
Featured
 
0
 

An idea but not necessarily the best,

you could write it to the registry.

Member Avatar
potatochips
Newbie Poster
15 posts since Jul 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

hi
thanks for your reply, but could u guide me to how to achieve that?
=D
cos im kinda new to all this
=/

thanks lots!

Member Avatar
potatochips
Newbie Poster
15 posts since Jul 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

ok i solved the problem myself..
i shall paste the code here if somebody met the same problem as me..
=)

just need a simple code :

report.SetDatabaseLogon(user, pwd)

u need to declare the "report" and the user, pwd before this line of code..
=D

Member Avatar
bruce2424
Newbie Poster
23 posts since Jun 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

You can pass login parameter to crystal reports dyanmically .

http://vb.net-informations.com/crystal-report/vb.net_crystal_report_load_dynamically.htm

bruce.

Member Avatar
ChrisDubai
Newbie Poster
1 post since Dec 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hi have tried this but no luck can anybody help with this

ok i solved the problem myself..
i shall paste the code here if somebody met the same problem as me..
=)

just need a simple code :

report.SetDatabaseLogon(user, pwd)

u need to declare the "report" and the user, pwd before this line of code..
=D

Member Avatar
sirfan_2002
Newbie Poster
1 post since May 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Thanks potatochips
command " report.SetDatabaseLogon(user, pwd)"
works for me.
Thanks & regards.

Member Avatar
longstrd
Newbie Poster
5 posts since Jun 2011
Reputation Points: -3 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
-1
 

report.SetDatabaseLogon(user, pwd)report.SetDatabaseLogon(user, pwd)

u need to declare the "report" and the user, pwd before this line of code..

what does the dim statment look like?

Member Avatar
Polongo
Newbie Poster
13 posts since Dec 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

i a encountering this problem too
in my ms access databse in vb.net


I used report.SetDatabaseLogon(user, pwd)
but i dont know what to set in my user and pwd because i didnt set a username and password.

i declare report as
Dim report As New ReportDocument
is that correct?
help me.

Member Avatar
longstrd
Newbie Poster
5 posts since Jun 2011
Reputation Points: -3 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I am not sure how this occured, I did not reply to this thread.
I use the report viewer and I feed the report parameters. I am building a web page that will have a dynamic menu and dynamic report viewer.
I gave up on attempting to send a user's credentials from the IIS server hosting a web page to the Report server. ( try that one on the fourm world. so many items where a person says Dynamic and people answer with a static solution or the one where someone suggests using Bacis Auth. no! )
However I realized all I needed to do was pass the user id to the report parameters and that works fine.
I do not need to log on to the data base, since that issue is taken care on the Report Server side.
I hope you resolve your issue.
P.S. I still use Crystal reports for Incident reporting. Crystal is used by Heat ( FrontRange ) and LanDesk.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article