473,669 Members | 2,504 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crystal Reports Logon Problem

I have a report where in I want to display the data from a subreport as
well as a the main report. The sub report is the Company info as the
header, for all the reports. with out a sub report added, the report
works perfectly. Once the sub report is added, every time the login
information is requested and the report does not open.
The following is the code:

m_DSBankStmnt = New DataSet
objRptBnk = New rptBankStmnt '//The main report
objclsBank = New clsBank

m_iMonth = dStmntDt.Month
m_iYear = dStmntDt.Year
m_DSBankStmnt = objclsBank.GenB nkStmnt(m_iMont h, m_iYear)
'//a unction to load the data

objRptBnk.SetDa taSource(m_DTBa nkStmnt.Tables( 0))
crvwBnkStmnt.Re portSource = objRptBnk

'R&D___________ _____ done by me
Dim objCR As New CRSubReport
'The subreport object
objCR.SetDataba seLogon("sa", "", "raghavendr a",
"db_payroll ") 'Logon info for the report
objRptBnk.OpenS ubreport("CRSub Report.rpt")
'the report
name

'R&D___________ _

Any help will be deeply appreciated.

Ravi

Nov 13 '06 #1
1 1227
I think this will help (we had to do it like this to 'refresh' the
connectionstrin g of the reports)...
The SetDatabaseLogo n-method doesn't seem to have the behaviour we would want
it to have :-)
'This method must be called BEFORE the "crvwBnkStmnt.R eportSource =
objRptBnk"!!!!
'SetReportConne ctionString(obj RptBnk)...
Private Sub SetReportConnec tionString(ByRe f repEtat As ReportDocument)
Dim myConnectionInf o As ConnectionInfo = New ConnectionInfo
myConnectionInf o.ServerName =
Configuration.C onfigurationSet tings.AppSettin gs.Get("Crystal Reports\ServerN ame")
myConnectionInf o.DatabaseName =
Configuration.C onfigurationSet tings.AppSettin gs.Get("Crystal Reports\Databas eName")
myConnectionInf o.UserID =
Configuration.C onfigurationSet tings.AppSettin gs.Get("Crystal Reports\UserID" )
myConnectionInf o.Password =
Configuration.C onfigurationSet tings.AppSettin gs.Get("Crystal Reports\Passwor d")

Dim myTableLogOnInf o As New TableLogOnInfo

'Dim myTableLogOnInf os As TableLogOnInfos = crvEtats.LogOnI nfo
'For Each myTableLogOnInf o In myTableLogOnInf os
' myTableLogOnInf o.ConnectionInf o = myConnectionInf o
'Next

myTableLogOnInf o = New TableLogOnInfo
myTableLogOnInf o.ConnectionInf o.ServerName =
Configuration.C onfigurationSet tings.AppSettin gs.Get("Crystal Reports\ServerN ame")
myTableLogOnInf o.ConnectionInf o.DatabaseName =
Configuration.C onfigurationSet tings.AppSettin gs.Get("Crystal Reports\Databas eName")
myTableLogOnInf o.ConnectionInf o.UserID =
Configuration.C onfigurationSet tings.AppSettin gs.Get("Crystal Reports\UserID" )
myTableLogOnInf o.ConnectionInf o.Password =
Configuration.C onfigurationSet tings.AppSettin gs.Get("Crystal Reports\Passwor d")

Dim intX As Integer
For intX = 0 To (repEtat.Databa se.Tables.Count - 1)
repEtat.Databas e.Tables.Item(i ntX).ApplyLogOn Info(myTableLog OnInfo)
Next
End Sub
I hope this helps,

Pieter
"Ravimama" <ma**********@g mail.comwrote in message
news:11******** **************@ h54g2000cwb.goo glegroups.com.. .
>I have a report where in I want to display the data from a subreport as
well as a the main report. The sub report is the Company info as the
header, for all the reports. with out a sub report added, the report
works perfectly. Once the sub report is added, every time the login
information is requested and the report does not open.
The following is the code:

m_DSBankStmnt = New DataSet
objRptBnk = New rptBankStmnt '//The main report
objclsBank = New clsBank

m_iMonth = dStmntDt.Month
m_iYear = dStmntDt.Year
m_DSBankStmnt = objclsBank.GenB nkStmnt(m_iMont h, m_iYear)
'//a unction to load the data

objRptBnk.SetDa taSource(m_DTBa nkStmnt.Tables( 0))
crvwBnkStmnt.Re portSource = objRptBnk

'R&D___________ _____ done by me
Dim objCR As New CRSubReport
'The subreport object
objCR.SetDataba seLogon("sa", "", "raghavendr a",
"db_payroll ") 'Logon info for the report
objRptBnk.OpenS ubreport("CRSub Report.rpt")
'the report
name

'R&D___________ _

Any help will be deeply appreciated.

Ravi

Nov 13 '06 #2

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

Similar topics

0
1697
by: Tim Jones | last post by:
Hey all, I am trying to try get a crytal report running properly. A "Hello World" report that does not add criteria to the record selection formula of the report (either in the development tool, or in the code) works fine. However, when I try to add any parameter through the record selection formula and/or the report parameters method, the report crashes. I have tried each of the methods:
0
2598
by: Max | last post by:
Hi wise people, Has anyone encountered the Crystal Reports problem I describe below? If so, how did you solve it? It seems that every article posted on google regarding CR and logon problems is still unanswered. I think I'm cursed. I originally created a crystal report which connects to a sql server server db on the same dev machine and it worked just fine. I tried to move it to another computer, but now I have to connect to an Oracle...
1
3455
by: Mithun Verma | last post by:
Hello All, I have a Windows application that uses Crystal Reports 9 (bundled Version) developed using VS.NET 2003 on a windows server 2003 m/c. The application has to be deployed on the client machine that has Windows XP installed. Before deploying we make sure that .NET framework 1.1 is installed on the XP machine. In the setup project, for support for Crystal Reports, we have added the following merge modules: 1)Crystal_Managed2003.msm...
0
2690
by: google | last post by:
My Crystal reports are being supplied the logon credentials via a C# code class that recursively loops through all the tables present in the reports and applies the login credentials (Servername, databasename, userid and password). This setup is working fine when i have it working within my domain (office network) where the server is another box (SQL svr 2000). The login credentials are being read from a web.config file and everthing seems to...
2
3888
by: Karun Karunakaran | last post by:
Hi, I am using the Crystal Enterprise .NET assemblies to generate and display a crystal report in a webform. This report connects to an SQL server (running locally) using a specific username and password. I use the InfoStore object to query for the report from the CE server (also running locally) and bind it to the CrystalReportViewer control in the webform. I am getting an "SQL Server logon failed" when I try to generate this
1
2026
by: andy lim | last post by:
Hello all, I'm developing a web application using ASP.NET/VB. I have problem in viewing my CR reports. It returns following exception when I tried to view any CR report. CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed I found many similar problem in several .NET forums, and no working solution.
3
15030
by: Milan Todorovic | last post by:
Hello, I need help. I have experience in ASP.NET programming, but this is my first dealing with Crystal Reports. I'm trying to make the most basic report purely for testing purposes: connect to the remote SQL DB and create a report on one of the tables. Every time I do it, I get the Logon Failed error (CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed) The internet search shows that this is a common problem,...
3
2866
by: Shawn H. Mesiatowsky | last post by:
I have come across lots of information regarding this, but nothing seems to work. I have created a Crystal Report that access's a SQL server backend for the data, and I want to display the report via a webform and the CrystalViewer Web Component. First of all, I have been using Trusted Connections so far (for data access) and really do not want to have some static login information in my web app. but most of the documents so far have...
19
4371
by: Michael O'Donnell | last post by:
Hi All Am having major problem with crystal reports...Have designed my report no problem, its when I try to run and display ther report that I am getting a "Login Failed" message. At first I thought it might have to do with the regristration key, but that ok, when I right click on Servers in the server explorer and then expand the Crystal Server, there is a red x beside the Crystal Enterprise. When I click on log in, I am asked for a
0
1123
by: Peter Proost | last post by:
Hi, I've got the following very strange problem. I've got a crystal reports report (cr9) which is called from my app. The app is installed on about 140 pc's and runs fine on 139 of them. On the one pc which is giving me trouble, windows xp home is installed and bitdefender as a firewall/virusscanner. The problem is I keep getting the crystal reports logon pop-up when I call the report, in my code I pass on the correct credentials (it works...
0
8465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8588
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
8658
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
7407
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...
0
5682
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();...
0
4206
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2797
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
2032
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1788
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.