473,498 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Database Login for Crystal reports

Hi All
I am new to .net, as i worked majorily on VB6.0 & Crystal reports,
I have developed an Window application in VB.net/SQL Server2000 and using
Crystal reports8.5, I have used the CRViewer in the form.
Now my problem is when i try to open Crystal report thro VB.net, it will
prompt for database login password, which i have already supplied in Crystal
report and also thro the application.(I am using DSN based connection)
Please help me to solve this problem....

Sample Code.
{
on Button click...
Dim rpt1 As New Form2 ' Here Form2 is the form with CrystalReportViewer,
ReportSource in Viewer is set to RPT file...
rpt1.Show()
}
Thanks in advance....
I apoligise if this is the wrong forum to post this question.

Regards,
Murali

--
Murali
VSM Software (P) Ltd.
Bangalore
Nov 21 '05 #1
12 13972
Hi,

You state 'it will prompt for database login password, which i have already
supplied in Crystal report'. Have you supplied this info. in the wizard for
the db connection or have you hard-coded it? If you have hard-coded it can
you provide an example.

Rgds, Phil
"Murali via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in message
news:54***********@DotNetMonster.com...
Hi All
I am new to .net, as i worked majorily on VB6.0 & Crystal reports,
I have developed an Window application in VB.net/SQL Server2000 and using
Crystal reports8.5, I have used the CRViewer in the form.
Now my problem is when i try to open Crystal report thro VB.net, it will
prompt for database login password, which i have already supplied in
Crystal
report and also thro the application.(I am using DSN based connection)
Please help me to solve this problem....

Sample Code.
{
on Button click...
Dim rpt1 As New Form2 ' Here Form2 is the form with
CrystalReportViewer,
ReportSource in Viewer is set to RPT file...
rpt1.Show()
}
Thanks in advance....
I apoligise if this is the wrong forum to post this question.

Regards,
Murali

--
Murali
VSM Software (P) Ltd.
Bangalore

Nov 21 '05 #2
HI Phil!
I had used DSN connection, during the design time i selected the required
views & fields...And through VB.net i open the Report ( I have used CRViewer
in a form and i open that form on click of a button from the main form.)

Please help....

Regards,
Murali

Phil G. wrote:
Hi,

You state 'it will prompt for database login password, which i have already
supplied in Crystal report'. Have you supplied this info. in the wizard for
the db connection or have you hard-coded it? If you have hard-coded it can
you provide an example.

Rgds, Phil
Hi All
I am new to .net, as i worked majorily on VB6.0 & Crystal reports,

[quoted text clipped - 19 lines]
Regards,
Murali


--
Murali
VSM Software (P) Ltd.
Bangalore,India
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200509/1
Nov 21 '05 #3
Hi Murali,

Unfortunately I made this 'mistake'! :-)

Although you will probably see that the pop-up login info box always
includes the login name, it still requires the password. This apparently is
the correct operation, although personally I don't see the need for
specifically coding the info. if it has already been entered through the
IDE.

However, what you need to do is use the TableLogonInfo Class of CR. Here's
an example:-

[Global Decs]

Dim objRepDoc As New ReportDocument
Dim crTable As Table
Dim crLogInfo As CrystalDecisions.Shared.TableLogOnInfo

[method call - maybe in load or cmdbutton]

crTable = objRepDoc.Database.Tables(0)
crLogInfo = crTable.LogOnInfo
With crLogInfo.ConnectionInfo
.UserID = "username"
.Password = "password"
End With
crTable.ApplyLogOnInfo(crLogInfo)
frmRep.CRViewer.ReportSource = objRepDoc
frmRep.Show()

Let me know if you have problems. Good luck. Phil

"Murali via DotNetMonster.com" <u14242@uwe> wrote in message
news:54ecef9ca0618@uwe...
HI Phil!
I had used DSN connection, during the design time i selected the required
views & fields...And through VB.net i open the Report ( I have used
CRViewer
in a form and i open that form on click of a button from the main form.)

Please help....

Regards,
Murali

Phil G. wrote:
Hi,

You state 'it will prompt for database login password, which i have
already
supplied in Crystal report'. Have you supplied this info. in the wizard
for
the db connection or have you hard-coded it? If you have hard-coded it can
you provide an example.

Rgds, Phil
Hi All
I am new to .net, as i worked majorily on VB6.0 & Crystal reports,

[quoted text clipped - 19 lines]
Regards,
Murali


--
Murali
VSM Software (P) Ltd.
Bangalore,India
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200509/1

Nov 21 '05 #4
Hi Phil !
This code does not helped me.....
I got similar code from the website, It works in my system and does not in my
clients system...
Both have VS2003 and .net Framework1.1, Crystal report 8.5...
I found an alternative solution for this i have created a user with blank
password in the SQL Server and this login i am using for opening the crystal
reports..
Anyway please suggest an alternative option....

Regards,
Murali
Phil G. wrote:
Hi Murali,

Unfortunately I made this 'mistake'! :-)

Although you will probably see that the pop-up login info box always
includes the login name, it still requires the password. This apparently is
the correct operation, although personally I don't see the need for
specifically coding the info. if it has already been entered through the
IDE.

However, what you need to do is use the TableLogonInfo Class of CR. Here's
an example:-

[Global Decs]

Dim objRepDoc As New ReportDocument
Dim crTable As Table
Dim crLogInfo As CrystalDecisions.Shared.TableLogOnInfo

[method call - maybe in load or cmdbutton]

crTable = objRepDoc.Database.Tables(0)
crLogInfo = crTable.LogOnInfo
With crLogInfo.ConnectionInfo
.UserID = "username"
.Password = "password"
End With
crTable.ApplyLogOnInfo(crLogInfo)
frmRep.CRViewer.ReportSource = objRepDoc
frmRep.Show()

Let me know if you have problems. Good luck. Phil
HI Phil!
I had used DSN connection, during the design time i selected the required

[quoted text clipped - 23 lines]
Regards,
Murali


--
Murali
VSM Software (P) Ltd.
Bangalore,India
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #5
Hello,

Use This code

Dim crReportDocument
crReportDocument = New TestReport

crConnectionInfo.ServerName = databaseServer
crConnectionInfo.DatabaseName = databaseName
crConnectionInfo.UserID = databaseUser crConnectionInfo.Password =
UserPassword

crTables = crReportDocument.Database.Tables
Dim i As Integer
i = 1
For Each crTable In crTables
'crTable = crTables(i)
crTableLogOnInfo = crTable.LogOnInfo
crTableLogOnInfo.ConnectionInfo = crConnectionInfo
crTable.ApplyLogOnInfo(crTableLogOnInfo)
crTable.Location =
crTable.Location.Substring(crTable.Location.LastIn dexOf(".") + 1)
Next
CRViewer.ReportSource = crReportDocument

Thanks,
Regards,

Ayaz Ahmed
Project Manager
Creative Chaos (Pvt.) Ltd.
"Managing Your Digital Risk"
http://www.csquareonline.com
Mobile +92 300 2280950
Office +92 21 455 2414
Email: ay**@csquareonline.com
ay********@gmail.com

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #6
Hi !
I am using the same code, but it still displays the database login screen..
I hav changed the report connetion to DSN to OLEDB type.
But i the problem still persists...
As i mentioned already, i found the temporary solution with blank password
login name...
Anyways plz let me know any other methods to avoid database login prompt..

Thanks & Regards,
Murali M
Ayaz Ahmed wrote:
Hello,

Use This code

Dim crReportDocument
crReportDocument = New TestReport

crConnectionInfo.ServerName = databaseServer
crConnectionInfo.DatabaseName = databaseName
crConnectionInfo.UserID = databaseUser crConnectionInfo.Password =
UserPassword

crTables = crReportDocument.Database.Tables
Dim i As Integer
i = 1
For Each crTable In crTables
'crTable = crTables(i)
crTableLogOnInfo = crTable.LogOnInfo
crTableLogOnInfo.ConnectionInfo = crConnectionInfo
crTable.ApplyLogOnInfo(crTableLogOnInfo)
crTable.Location =
crTable.Location.Substring(crTable.Location.LastI ndexOf(".") + 1)
Next
CRViewer.ReportSource = crReportDocument

Thanks,

Regards,

Ayaz Ahmed
Project Manager
Creative Chaos (Pvt.) Ltd.
"Managing Your Digital Risk"
http://www.csquareonline.com
Mobile +92 300 2280950
Office +92 21 455 2414
Email: ay**@csquareonline.com
ay********@gmail.com


--
Murali
VSM Software (P) Ltd.
Bangalore,India
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200509/1
Nov 21 '05 #7
Hello,

Please go crystal report viewer proporties and go to the behaviour
category "EnableDatabaseLoginPrompt" set to false

Thanks,
Regards,

Ayaz Ahmed
Project Manager
Creative Chaos (Pvt.) Ltd.
"Managing Your Digital Risk"
http://www.csquareonline.com
Mobile +92 300 2280950
Office +92 21 455 2414
Email: ay**@csquareonline.com
ay********@gmail.com

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #8
Hi Ayaz Ahmed!
Sorry i could'nt find that property in my VS.net 2003 for CrystalReport
Viewer.

Regards,
Murali

Ayaz Ahmed wrote:
Hello,

Please go crystal report viewer proporties and go to the behaviour
category "EnableDatabaseLoginPrompt" set to false

Thanks,

Regards,

Ayaz Ahmed
Project Manager
Creative Chaos (Pvt.) Ltd.
"Managing Your Digital Risk"
http://www.csquareonline.com
Mobile +92 300 2280950
Office +92 21 455 2414
Email: ay**@csquareonline.com
ay********@gmail.com

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200509/1
Nov 21 '05 #9
hi i have the same problem and i tryed to find the property in vs2003
and it is not there

help please:)

Nov 21 '05 #10
Try this Code,
ITs working for me...

DIm crreportdocument As New CrystalReport1
crreportdocument.SetDatabaseLogon("murali", "sa")

YAR-X wrote:
hi i have the same problem and i tryed to find the property in vs2003
and it is not there

help please:)


--
Murali
VSM Software (P) Ltd.
Bangalore,India
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200510/1
Nov 21 '05 #11
thatd does'nt work either. any other suggestions from anybody?
Murali via DotNetMonster.com wrote:
Try this Code,
ITs working for me...

DIm crreportdocument As New CrystalReport1
crreportdocument.SetDatabaseLogon("murali", "sa")

YAR-X wrote:
hi i have the same problem and i tryed to find the property in vs2003
and it is not there

help please:)


--
Murali
VSM Software (P) Ltd.
Bangalore,India
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200510/1


Nov 21 '05 #12
Hi Mike..
Otherwise, If previlages are available in MSSQL Server, then u can create a
user with blank password and use that details for connection in Crystal
reports..
Try this...

Regards,
Murali
mike wrote:
thatd does'nt work either. any other suggestions from anybody?
Try this Code,
ITs working for me...

[quoted text clipped - 11 lines]
VSM Software (P) Ltd.
Bangalore,India


--
Murali
VSM Software (P) Ltd.
Bangalore,India
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200510/1
Nov 21 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7317
by: Kevin | last post by:
I'm at the end of my rope. We have been trying to deploy Crystal Reports over our website. We have tried every report configuration we can think of and cannot seem to resolve this issue. Here is...
3
22908
by: Michael S | last post by:
only my server get the report whitout the dialogue database login. I think it is where the database is localhost and the crystal report know not the connection string. how I can crystal reports...
2
7697
by: fatboy | last post by:
I'm trying to change the database and server on a report that was created using integrated security e.g. report was created pointing to the server 'testserver' and database 'testdb' and at runtime...
1
1768
by: Rod | last post by:
We've implemented forms authentication with Active Directory. We're slowly working on converting our Crystal Reports' reports from a VB6 application into Crystal Reports for .NET in our ASP.NET...
1
3256
by: CBKowitz | last post by:
I have an intermittent problem, when viewing a crystal report. This problem only happens to some users and some report formats. When they try to view the report in Microsoft Word format the...
7
34750
by: TJoker .NET | last post by:
I'm developing an VB.NET Windows Forms application that uses CR for VS.NET (original version shipped with VS.NET 2002 - my VS.NET has the latest SP installed, no SPs for CR). My reports get their...
7
2172
by: Bernie Yaeger | last post by:
I can't believe that there aren't lots of developers who: 1. create a crystal report that connects to sql server 2. calls the report using the crystalreportviewer control to view it and then,...
3
10989
by: route_coder | last post by:
I am using access database to create a crystal report in VB.NET Everything works fine when I run on my machine. But when I am deploying it other windows machines. It is asking for database server...
1
2834
by: estanton | last post by:
I am updating a C# Windows Application that has two reports created with Crystal Reports in VS 2005. The two exisitng reports work correctly with no problems. However, I have created a third report...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7203
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4908
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
290
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.