473,399 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

CrystalReports Database Login problems!!!

31
Hi there!

I have a problem using CrystalReports9. My app does reporting and report generation. I have generated some reports and while trying to create some of them, I get the Database Login prompt that asks for username and pass. I read somewhere this has something to do with underlying dataset (I'm using the push model), so I tried what they suggested, that is generating manually LogOnInfo object and applying it to the dataset. Now the problem arises when I try setting the new dataset to the ReportDocument like:

_reportDocument.SetDatasource(myNewDataset)

now this line works with most of my reports, but on these particular two nothing happens and it keeps the old dataset that's pre-generated in the code and doesn't apply. I've tried passing the null dataset to it, and it still does nothing, just keeps the old data source! Why?

Any suggestions?

Maybe there's some other way around?

thanx,

Mecena
Jul 19 '07 #1
5 1318
Frinavale
9,735 Expert Mod 8TB
Hi Mecena,

I've moved your question to the .NET Forum.
The .NET Articles section is reserved for "how-to" articles and other useful information and is not meant for questions. You should post your question in the .NET Forum section in the future to receive help with your problem. (Blue Menu: Forums -> .NET)

Cheers!

-Frinny
Jul 19 '07 #2
Mecena
31
It seems that I've got it. It was in the template; some property pointing to the schema was missing and although I'm NOT using binding and schemas, I creates some xsd off my dataset and referenced it, and later just deleted it. As it happens, CrystalReports generated an ID for the (now nonexistent) schema and pretended it was there from then on!! And now it's working. Go figure!

Mecena
Jul 20 '07 #3
hi ,
Try this code

Public Sub setdata(ByRef loginfo As Object, ByRef rpt As Object)
loginfo.ConnectionInfo.DatabaseName = "your database name"
loginfo.ConnectionInfo.ServerName = "your server name"
loginfo.ConnectionInfo.Password = "your password"
loginfo.ConnectionInfo.UserID = "your userid"

Dim i As Integer
For i = 0 To rpt.Database.Tables.Count - 1
rpt.Database.Tables(i).ApplyLogOnInfo(loginfo)
Next


End Sub
Jul 20 '07 #4
Hi there!

I have a problem using CrystalReports9. My app does reporting and report generation. I have generated some reports and while trying to create some of them, I get the Database Login prompt that asks for username and pass. I read somewhere this has something to do with underlying dataset (I'm using the push model), so I tried what they suggested, that is generating manually LogOnInfo object and applying it to the dataset. Now the problem arises when I try setting the new dataset to the ReportDocument like:

_reportDocument.SetDatasource(myNewDataset)

now this line works with most of my reports, but on these particular two nothing happens and it keeps the old dataset that's pre-generated in the code and doesn't apply. I've tried passing the null dataset to it, and it still does nothing, just keeps the old data source! Why?

Any suggestions?

Maybe there's some other way around?

thanx,

Mecena
Hi Mecena
that report will have SetDatabaseLogon("username","password").
call that method before setting the reportsource property.
Jul 20 '07 #5
Frinavale
9,735 Expert Mod 8TB
It seems that I've got it. It was in the template; some property pointing to the schema was missing and although I'm NOT using binding and schemas, I creates some xsd off my dataset and referenced it, and later just deleted it. As it happens, CrystalReports generated an ID for the (now nonexistent) schema and pretended it was there from then on!! And now it's working. Go figure!

Mecena
I'm glad you figured it out!
Thanks for sharing your solution :)

-Frinny
Jul 20 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
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...
0
by: Peter | last post by:
I got a Crystal Report book, and dowloaded its sample porjects. When I opened the project, and tried to run it, the Database Login dialog showed up for information * server name : Xtreme Sample...
3
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...
0
by: Brenny | last post by:
Hi I'm developing a project and in the project, I used crystal report. Firstly my database isn't protected with password. After finishing project I determined a password for my database. Firstly...
12
by: Murali via DotNetMonster.com | last post by:
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...
1
by: Prashanth | last post by:
Hi, I am trying to connect to a database using a login. below are the statements regarding it. ............................................................... set con_to_exception_database =...
0
bartonc
by: bartonc | last post by:
#Boa:Dialog:DBConnectDialog import wx ##"""Given a set if login specs, create a dbServer instance and ## ensure that there is a valid, open connection to the database. ## If not, set the...
0
bartonc
by: bartonc | last post by:
With one small change to the view/control: self.staticText3 = wx.StaticText(id=wxID_DBCONNECTDIALOGSTATICTEXT3, label='ODBC Data Source Name', name='staticText3',...
1
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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...
0
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,...
0
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...

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.