473,288 Members | 2,725 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,288 software developers and data experts.

Crystal Reports Problem: Please reply ASAP.

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
2) Crystal_Database_Access2003.msm
3)Crystal_Database_Access2003_enu.msm
4)Crystal_RegWiz2003.msm
5)VC_User_CRT71_RTL_X86.msm
6)VC_User_STL71_RTL_X86.msm

The problem we are facing is like this: Whenever the user tries to pull up
the reports, a database logon screen pops up for the report. I am unable to
figure out as to why this is happening only for Crystal Reports. All the
other functionality in the application is working fine without having to
specify the database connection information interactively. The database
server is not in the same network as this Client WinXP machine. We specify
the IP address of the DB server in the DB connection string. Could this be a
problem?
If someone has faced this problem earlier or has any solution to this
problem, do let me know. I need to resolve this problem ASAP.

Thanks in advance
Mithun

Jul 21 '05 #1
1 3425
This was a fun problem to solve :). The issue that I came across with this
error was that the database connection/password needed to be set for each
table in the main report as well as any subreports. If there were tables
with the connection information not set, the database login would be
displayed for each table with the missing information.

The code that I used to correct this problem is as follows:

If File.Exists(strReport) Then

Dim crlogInfo As New CrystalDecisions.Shared.TableLogOnInfo()

Dim crConnInfo As New CrystalDecisions.Shared.ConnectionInfo()

Dim intCount As Integer, intRecCount As Integer

Dim strTmp As String

m_crdocReport = New ReportDocument()

m_crdocReport.Load(strReport,
CrystalDecisions.Shared.OpenReportMethod.OpenRepor tByTempCopy)

'Set database for main tables

With crConnInfo

..ServerName = ""

..UserID = ""

..DatabaseName = strDataBasePath

..Password = "mypassword"

End With

crlogInfo.ConnectionInfo = crConnInfo

intRecCount = m_crdocReport.Database.Tables.Count - 1

For intCount = 0 To intRecCount

With m_crdocReport.Database.Tables(intCount)

..Location = strDataBasePath

..ApplyLogOnInfo(crlogInfo)

strTmp &= .Name & " - " & .Location & " : " &
..LogOnInfo.ConnectionInfo.Password & " : " &
crlogInfo.ConnectionInfo.Password & vbCrLf

End With

Next

'MsgBox(strTmp)

strTmp = ""

'Set database for any subreports

Dim crSection As Section

Dim crObject As ReportObject

Dim crSubReport As SubreportObject

Dim astrSubReports() As String

Dim intSubReports As Integer = -1, intSubReportCount As Integer

Dim crSubReportDocument As New ReportDocument()

For Each crSection In m_crdocReport.ReportDefinition.Sections

For Each crObject In crSection.ReportObjects

If crObject.Kind = ReportObjectKind.SubreportObject Then

crSubReport = CType(crObject, SubreportObject)

intSubReports += 1

ReDim Preserve astrSubReports(intSubReports)

astrSubReports(intSubReports) = crSubReport.SubreportName

End If

Next

Next

For intSubReportCount = 0 To intSubReports

crSubReportDocument =
m_crdocReport.OpenSubreport(astrSubReports(intSubR eportCount))

intRecCount = crSubReportDocument.Database.Tables.Count - 1

For intCount = 0 To intRecCount

With crSubReportDocument.Database.Tables(intCount)

..Location = strDataBasePath

..ApplyLogOnInfo(crlogInfo)

strTmp &= .Name & " - " & .Location & " : " &
..LogOnInfo.ConnectionInfo.Password & " : " &
crlogInfo.ConnectionInfo.Password & vbCrLf

End With

Next

'MsgBox(strTmp)

strTmp = ""

Next

Jody


"Mithun Verma" <mi*****@MAQSoftware.com> wrote in message
news:Oi*************@tk2msftngp13.phx.gbl...
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
2) Crystal_Database_Access2003.msm
3)Crystal_Database_Access2003_enu.msm
4)Crystal_RegWiz2003.msm
5)VC_User_CRT71_RTL_X86.msm
6)VC_User_STL71_RTL_X86.msm

The problem we are facing is like this: Whenever the user tries to pull up
the reports, a database logon screen pops up for the report. I am unable to figure out as to why this is happening only for Crystal Reports. All the
other functionality in the application is working fine without having to
specify the database connection information interactively. The database
server is not in the same network as this Client WinXP machine. We specify
the IP address of the DB server in the DB connection string. Could this be a problem?
If someone has faced this problem earlier or has any solution to this
problem, do let me know. I need to resolve this problem ASAP.

Thanks in advance
Mithun

Jul 21 '05 #2

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

Similar topics

14
by: LP | last post by:
Hi, I will be taking on a new project developing a web-based "reporting system". The first requirement I got from BI group is "we just want to look at the data". Basically, there is a huge...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
17
by: Peter Proost | last post by:
Hi Group, I've got an interesting problem, I don't know if this is the right group but I think so because everything I've read about it so far says it's a .net problem. Here's the problem, we're...
1
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...
1
by: Gurunadh | last post by:
Hi friends, we have developed a windows desktop application in vb.net 2005 with MS-Access as backend ,our problem is we have to display data from a datagridview to a crystal report,we have...
1
by: Gurunadh | last post by:
Hi friends, we have developed a windows desktop application in vb.net 2005 with MS-Access as backend ,our problem is we have to display data from a datagridview to a crystal report,we have...
1
by: san2007 | last post by:
Hi, I have to display the crystal report 11 from asp page. Problem is , Crystal reports 11 is not installed in the web server where the asp application is hosted. However there is another m/c...
6
by: Miro | last post by:
I can run an exe ( and its install ) i have created on my machine. The exe has a button that populates a dataset and then shoots it to a crystal report. But... Installing the setup.exe on my...
4
by: Miro | last post by:
<i have also added this reply to the other newsgroup - now that I have realizd ( and assuming ) it is not a localized error directly to vb.> I have found this link on the website:...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...

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.