473,766 Members | 2,035 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 CrystalReportVi ewer,
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 14060
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.c om" <fo***@DotNetMo nster.com> wrote in message
news:54******** ***@DotNetMonst er.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
CrystalReportVi ewer,
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.c om
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 CrystalDecision s.Shared.TableL ogOnInfo

[method call - maybe in load or cmdbutton]

crTable = objRepDoc.Datab ase.Tables(0)
crLogInfo = crTable.LogOnIn fo
With crLogInfo.Conne ctionInfo
.UserID = "username"
.Password = "password"
End With
crTable.ApplyLo gOnInfo(crLogIn fo)
frmRep.CRViewer .ReportSource = objRepDoc
frmRep.Show()

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

"Murali via DotNetMonster.c om" <u14242@uwe> wrote in message
news:54ecef9ca0 618@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.c om
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,

Unfortunatel y 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 CrystalDecision s.Shared.TableL ogOnInfo

[method call - maybe in load or cmdbutton]

crTable = objRepDoc.Datab ase.Tables(0)
crLogInfo = crTable.LogOnIn fo
With crLogInfo.Conne ctionInfo
.UserID = "username"
.Password = "password"
End With
crTable.ApplyL ogOnInfo(crLogI nfo)
frmRep.CRViewe r.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 crReportDocumen t
crReportDocumen t = New TestReport

crConnectionInf o.ServerName = databaseServer
crConnectionInf o.DatabaseName = databaseName
crConnectionInf o.UserID = databaseUser crConnectionInf o.Password =
UserPassword

crTables = crReportDocumen t.Database.Tabl es
Dim i As Integer
i = 1
For Each crTable In crTables
'crTable = crTables(i)
crTableLogOnInf o = crTable.LogOnIn fo
crTableLogOnInf o.ConnectionInf o = crConnectionInf o
crTable.ApplyLo gOnInfo(crTable LogOnInfo)
crTable.Locatio n =
crTable.Locatio n.Substring(crT able.Location.L astIndexOf(".") + 1)
Next
CRViewer.Report Source = crReportDocumen t

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**@csquareonl ine.com
ay********@gmai l.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 crReportDocumen t
crReportDocume nt = New TestReport

crConnectionIn fo.ServerName = databaseServer
crConnectionIn fo.DatabaseName = databaseName
crConnectionIn fo.UserID = databaseUser crConnectionInf o.Password =
UserPassword

crTables = crReportDocumen t.Database.Tabl es
Dim i As Integer
i = 1
For Each crTable In crTables
'crTable = crTables(i)
crTableLogOnInf o = crTable.LogOnIn fo
crTableLogOnInf o.ConnectionInf o = crConnectionInf o
crTable.ApplyLo gOnInfo(crTable LogOnInfo)
crTable.Locatio n =
crTable.Locati on.Substring(cr Table.Location. LastIndexOf("." ) + 1)
Next
CRViewer.Report Source = crReportDocumen t

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**@csquareonl ine.com
ay********@gmai l.com


--
Murali
VSM Software (P) Ltd.
Bangalore,India
Message posted via DotNetMonster.c om
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 "EnableDatabase LoginPrompt" 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**@csquareonl ine.com
ay********@gmai l.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 "EnableDatabase LoginPrompt" 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**@csquareonl ine.com
ay********@gmai l.com

--
Message posted via DotNetMonster.c om
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

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

Similar topics

1
7330
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 the problem. We keep getting prompted for a database login when we try to view reports that connect to our SQL Server database. We have tried using every combination of connection strings and methods, all with the login information saved. We...
3
22924
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 say where the database is? Have anywhere a idee how a can fix this? thank you
2
7735
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 i want to change the report to connect to 'liveserver' & 'livedb'. I'm using visual studio 2003, Crystal 10 Developer full (sp1) and c# connecting to a sql server 2000 db using OLEDB connection and integrated security. I've tried the...
1
1782
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 application. So far, we've got 2 done but we have several more to go. Anyway, we've discovered something which is pretty irritating for our users. When they go to any of the Crystal Reports for .NET and view it, they can see it just fine. ...
1
3277
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 system prompts them to login (User name and Password). If they view it in PDF format they do not get the login prompt. I do not get the login prompt at all. This problem occurs with users on the Internet and our Intranet. I checked the web site and...
7
34788
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 data from ADO.NET Datasets that are pre-populated by other modules of the application. What I need to do is to use these datasets as the datasources of my reports. Fine, I know how to do that and it works perfectly on my development box. The...
7
2208
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, if appropriate, print it 3. tries to deploy that report to the client's database, but now it calls for a different database name Yet I can't get an answer to the question: I have developed numerous reports in an app (Windows Database App) that...
3
11013
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 name and logon information. The problem which I understood from this is that the path is hardcoded in the crystal report and the database is in my bin folder. when I run my app on other machines it is looking for the database in that folder and...
1
2884
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 (this is the first one I have created from scratch) and when I run it either with the debugger or in the production version, I get a Database Login screen dialog box with the Server Name and Database fields protected and already populated with...
0
10008
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9959
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9837
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7381
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3929
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 we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.