473,763 Members | 2,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.Net/Crystal Reports - CRAXDRT.Connect ionProperties not defined error

I am writing a Windows forms VB.Net/MS SQL application that utilizes
Crystal Reports. I want to be able to dynamically set the report data
source at run time. According to article
"cr_rdc9_connec tionproperties. pdf" on the Crystal support web site I
should be able to do the following:

Dim ConnectionInfo As CRAXDRT.Connect ionProperties

I get a "Type CRAXDRT.connect ionProperties is not defined" error from
the VS designer when I enter the statement.

I have put in the dll reference in the project to CRAXDRT.

Statements such as the following do work:

Dim objApp As New CRAXDRT.Applica tion
Dim objReport As CRAXDRT.Report

"ConnectionProp erties" does not show up as an item for selection in the
dropdown- Application, Report, etc. do

Any help/guidance much appreciated.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
5 12836
good luck. I gave up on Crystal and went to the free Component One reporting
control that is part of .NET Resource Kit.

Shane

"Henry" <an*******@devd ex.com> wrote in message
news:ud******** ******@tk2msftn gp13.phx.gbl...
I am writing a Windows forms VB.Net/MS SQL application that utilizes
Crystal Reports. I want to be able to dynamically set the report data
source at run time. According to article
"cr_rdc9_connec tionproperties. pdf" on the Crystal support web site I
should be able to do the following:

Dim ConnectionInfo As CRAXDRT.Connect ionProperties

I get a "Type CRAXDRT.connect ionProperties is not defined" error from
the VS designer when I enter the statement.

I have put in the dll reference in the project to CRAXDRT.

Statements such as the following do work:

Dim objApp As New CRAXDRT.Applica tion
Dim objReport As CRAXDRT.Report

"ConnectionProp erties" does not show up as an item for selection in the
dropdown- Application, Report, etc. do

Any help/guidance much appreciated.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #2
Hi Henry,

Don't give up on crystal; it's a great if not perfect report writer.

I've written apps that call on hundreds of crystal reports and they too had
to have connection info appropriate for my test server and different
connection info for the client's server. There are numerous articles on
this issue at crystal, but I will list below a sub I use to convert the
connection before a report runs. First, remember to make all of your
reports integrated security false (datasource location in the report menu),
so that the connection you are using is not hard coded into it.

Then, when you run the report, run them first against a routine such as that
below; my variables globalservernam e, globalusername, etc are set when the
app begins by accessing a simple text file that contains this info (like an
ini file) and assigning the appropriate global string with the necessary
info.

HTH - let me know if you have any questions.

Bernie Yaeger
PS - here's the code:
Public Sub connectionchang e()

'Dim crreportdocumen t As New ReportDocument

Dim crtablelogoninf os As New TableLogOnInfos

Dim crtablelogoninf o As New TableLogOnInfo

Dim crconnectioninf o As New ConnectionInfo

Dim crtables As Tables

Dim crtable As Table

Dim tablecounter As Integer

crreportdocumen t.Load(gl_brows eprintvar,
OpenReportMetho d.OpenReportByT empCopy)

With crconnectioninf o

..DatabaseName = "IMC"

..ServerName = globalservernam e

..UserID = globalusername

..Password = globalpwd

End With

crtablelogoninf o.ConnectionInf o = crconnectioninf o

crtables = crreportdocumen t.Database.Tabl es

For Each crtable In crtables

If (Mid(crtable.Na me, 1, 4) = "magt" Or Mid(crtable.Nam e, 1, 4) = "magb" Or
Mid(crtable.Nam e, 1, 4) = "magf") And gl_browseprintv ar =
"f:\imcapps\hvs um.rpt" Then

crconnectioninf o.DatabaseName = "imc_extra"

crtablelogoninf o.ConnectionInf o = crconnectioninf o

Else

crconnectioninf o.DatabaseName = "IMC"

crtablelogoninf o.ConnectionInf o = crconnectioninf o

End If

crtable.ApplyLo gOnInfo(crtable logoninfo)

crtable.Locatio n = crtable.Name

Next

Dim subRepDoc As New ReportDocument

Dim crSection As Section

Dim crReportObject As ReportObject

Dim crSubreportObje ct As SubreportObject

For Each crSection In crreportdocumen t.ReportDefinit ion.Sections

For Each crReportObject In crSection.Repor tObjects

If crReportObject. Kind = ReportObjectKin d.SubreportObje ct Then

crSubreportObje ct = CType(crReportO bject, SubreportObject )

subRepDoc = crSubreportObje ct.OpenSubrepor t(crSubreportOb ject.SubreportN ame)

For Each crtable In subRepDoc.Datab ase.Tables

crtable.ApplyLo gOnInfo(crtable logoninfo)

crtable.Locatio n = crtable.Name

Next

End If

Next

Next

CrystalReportVi ewer1.ReportSou rce = crreportdocumen t

End Sub
"Henry" <an*******@devd ex.com> wrote in message
news:ud******** ******@tk2msftn gp13.phx.gbl...
I am writing a Windows forms VB.Net/MS SQL application that utilizes
Crystal Reports. I want to be able to dynamically set the report data
source at run time. According to article
"cr_rdc9_connec tionproperties. pdf" on the Crystal support web site I
should be able to do the following:

Dim ConnectionInfo As CRAXDRT.Connect ionProperties

I get a "Type CRAXDRT.connect ionProperties is not defined" error from
the VS designer when I enter the statement.

I have put in the dll reference in the project to CRAXDRT.

Statements such as the following do work:

Dim objApp As New CRAXDRT.Applica tion
Dim objReport As CRAXDRT.Report

"ConnectionProp erties" does not show up as an item for selection in the
dropdown- Application, Report, etc. do

Any help/guidance much appreciated.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #3
Henry <an*******@devd ex.com> wrote in news:udxXx4PdEH A.1048
@tk2msftngp13.p hx.gbl:
Any help/guidance much appreciated.


Why don't you pass the report an ADO Dataset instead?

--
Lucas Tam (RE********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 20 '05 #4
Hi Bernie,

Tks for the quick response and sample code. I will work on it today.

.....Henry
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #5

Bernie,

I'm trying to change the the reports "integrated security" from TRUE to
FALSE with no success. It is not intuitive ( at least not to me.)

How do I go about doing the change?

....Henry
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #6

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

Similar topics

0
1366
by: jeremylim2000 | last post by:
Hi! I try to preview a crystal report using asp, it prompt 'CRAXDRT error Occured on server. -2147189176 : login failed Details : IM002: Data sourcename no found and no default driver specified'. I use below syntax, For Each mnTable in mainReportTableCollection With mnTable.ConnectionProperties .Item("user ID") = "sa"
2
6644
by: jeremylim2000 | last post by:
Hi! I try to preview a crystal report using asp, it prompt 'CRAXDRT error Occured on server. -2147189176 : login failed Details : IM002 : Data sourcename not found and n default driver speci fied'. I use below syntax, For Each mnTable in mainReportTableCollection
1
5839
by: Ron Holmes | last post by:
I posted this question on the Crystal Reports Support site and I am still waiting for an answer. Using Crystal Reports 9.0 Developer Full edition: My Crystal report .RPT file has a Picture box which is an OLE Object located in the Page Header section of my .RPT file. This is the call which works perfectly in VB6 to format the crystal reports Page Header section of my report file EquipLst.rpt.
6
13142
by: Robin Cushman | last post by:
Hi all, I need some help -- I'm working with an A2K database, using DAO, and am trying to read records into a Crystal Report and then export it to a folder on our network as an Excel spreadsheet. I'm having trouble with my code at the point at which it hits ".ReadRecords" -- the module just runs and runs without generating anything. I've gotten this code to correctly save .rpt files without any data, but not with data, nor have I been...
3
12916
by: kenneth xg | last post by:
Hi, I have problem on passing parameters to subreports' stored procedures which require parameters, from an asp.net web form. I ve tried to use the stored procedures on the main report it works fine, however once the stored procedures were put into a subreport, it cause an exception: "Missing parameter field current value"
1
2310
by: Peri | last post by:
Dear All, Can any one help me out to call a crystal reports designed in 8.0 version in ASP.NET ? Crystal reports has given an asp page called rptserver.asp from which we can call the crystal reports in ASP and it is working fine in ASP. After converting this to ASP.NET it is not working. I am getting an error "CRAXDRT Error Occured on Server 13 - Type Mismatch".
2
1811
by: Yammy | last post by:
What is the meaning of the following error : Exception Details: System.Runtime.InteropServices.COMException: COM object with CLSID {3C9CFE1E-389F-4118-9FAD-365385190329} is either not valid or not registered. ThX.
3
15052
by: Mudcat | last post by:
I am not that familiar with Crystal Reports, but having read some other posts I know that the way to integrate the API with Python is through the COM interface provide by win32all. However, I have been unable to find any other information on how to get started. I've used the COM interface before in integrating Excel and a couple of other things. So I am familiar with how that works. But there are at least 40 options dealing with Crystal...
3
7678
by: raaman rai | last post by:
Guys, i have created reports in crystal report 10 for my VB application. Now how sud i open the report from my application. Infact i have tried opening the report but i get the following error: Logon failed. Details: ADO Error Code: 0x80040e4d Source: Microsoft OLE DB Provider for SQL Server Description: Login failed for user 'sa' SQL State: 42000 Native Error: 18456 My code was: Dim Appl As New CRAXDRT.Application
0
9563
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...
0
9386
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9998
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...
0
9822
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
8822
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
7366
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
6642
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
5270
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...
3
3523
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.