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:
1. Use the Record Selection Formula property:
crReportDocumen t.DataDefinitio n.RecordSelecti onFormula = "{qryTest.I D} = 54"
2. Use the Crystal Parameters collection(s)
crParameterFiel dDefinitions =
crReportDocumen t.DataDefinitio n.ParameterFiel ds
crParameterFiel dDefinition = crParameterFiel dDefinitions.It em("[@TestID]")
crParameterValu es = crParameterFiel dDefinition.Cur rentValues
crParameterDisc reteValue = New
CrystalDecision s.Shared.Parame terDiscreteValu e()
crParameterDisc reteValue.Value = 54
crParameterValu es.Add(crParame terDiscreteValu e)
crParameterFiel dDefinition.App lyCurrentValues (crParameterVal ues)
Both of the methods above work fine on my development machine but the
testing server gives these errors.
I also set the record selection formula in the report to automatically set
the TestID parameter = 54 and then tested that report on the testing server
and everything worked.
So the issue seems to be with populating the crystal report's parameters at
runtime. The error that comes back with a logon failure at the .Export line.
I have tried two methods to logon to the reports:
############### #####
Basic:
With tliTableLogonIn fo.ConnectionIn fo
.ServerName = m_strDSNName
.DatabaseName = m_strDatabase
.UserID = m_strUserId
.Password = m_strPassword
End With
'setup each connection in the report
For Each tTable In crReportDocumen t.Database.Tabl es
tTable.ApplyLog OnInfo(tliTable LogonInfo)
Next tTable
############### #####
and Complex (loops through sub-reports):
Dim mySection As Section
Dim mySections As Sections
Dim myReportObject As ReportObject
Dim myReportObjects As ReportObjects
Dim mySubReportObje ct As SubreportObject
Dim mySubRepDoc As New ReportDocument( )
'Declare all of the sections of the main report
mySections = crReportDocumen t.ReportDefinit ion.Sections
'Loop through the sections in the main report to find the subreport objects
'then set the logon information to the subreport
Dim myLogin As CrystalDecision s.Shared.TableL ogOnInfo
For Each mySection In mySections
myReportObjects = mySection.Repor tObjects
For Each myReportObject In myReportObjects
If myReportObject. Kind = ReportObjectKin d.SubreportObje ct Then
'Subreport Found - convert the report object to a sub report type
mySubReportObje ct = CType(myReportO bject, SubreportObject )
'Set the specific instance of this subreport
mySubRepDoc =
mySubReportObje ct.OpenSubrepor t(mySubReportOb ject.SubreportN ame)
'Set the login information for the current subreport(found )
For Each crTable In mySubRepDoc.Dat abase.Tables
myLogin = crTable.LogOnIn fo
myLogin.Connect ionInfo.ServerN ame = m_strDSNName
myLogin.Connect ionInfo.Databas eName = m_strDatabase
myLogin.Connect ionInfo.UserID = m_strUserId
myLogin.Connect ionInfo.Passwor d = m_strPassword
crTable.ApplyLo gOnInfo(myLogin )
Next
End If
Next
Next
############### #####
Does anyone know of other methods to filter a report at runtime? Or is there
a Crystal DLL that I need to move from my dev machine to the server to allow
for the record selection properties to be set at runtime?
OR ANY OTHER INFO WOULD BE GREAT!!!
Thanks,
TJ 0 1724 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: DeeCay |
last post by:
Dear folks,
I was trying to write a .Net web application (using C#) that loads a
Crystal
Report on server side, export the report in PDF format as a file in
the web
server, and then serves up the file for clients to download. My code
was
working so far so good until I added ONE line.
|
by: Stephanie Stowe |
last post by:
I am doing a support rotation for our massive ASP app. We use Crystal
Reports / Enterprise. By some magic which I am unfamiliar with Crystal
Enterprise allows the creation of a report on the server, then the report
containing the data can be viewed within the browser using a Crystal Viewer.
My experience with Crystal is limited to VB client apps, so this is the
limit of my understanding of precisely how this works in the ASP world.
Once...
|
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:
|
by: Colin Graham |
last post by:
Error when attempting to export Crystal Report as PDF document
asp.net.
I get the following error.
Error in File C:\DOCUME~1\W2K-AD~1\ASPNET\LOCALS~1\Temp\temp_512d88ae-f721-4860-a57f-2eae219dc1c4.rpt:
Invalid export DLL or export format.
I have recently created an asp.net deployment application. When i ran
the deployment on the server i have had numerous issues but manged to
|
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...
| |
by: Russ |
last post by:
I have a page that uses crystal reports to generate reports from a SQl
server database. As of a week ago everything was working fine, but now I am
all of the sudden getting errors. To the best of my knowledge nothing was
changed on the server.
Here is the error:
Error in File C:\DOCUME~1\WEBSERVER\ASPNET\Local
Settings\Temp\temp_57908cf8-dba0-4327-b785-95de5cf6e523.rpt: Invalid export
DLL or export format.
|
by: Deasun |
last post by:
I need some help please!
Crystal is driving me nuts.
Heres my code so far, see below.
Problem:
On the .export() line it comes back with error #5 Login failed!
I know the login info is good so why is the bloody thing doing this.
The paths have been checked and are correct.
The crystal Report is a .rpt file. Not one created in the VS.net IDE but in
crystal itself.
|
by: LP |
last post by:
I am using (trying to) CR version XI, cascading parameters feature works it
asks user to enter params. But if page is resubmitted. It prompts for params
again. I did set ReuseParameterValuesOnRefresh="True" in a viewer, but it
still doesn't work. Did anyone run into this problem. What's the solution?
Please help.
Thank you
|
by: drisso |
last post by:
Hello,
I have searched that error on these message boards, msdn and
crystaldecisions.com. I found tutorials that showed how to export a
crystal report to pdf, but like many others I am getting an error when
I actually do the oRpt.Export() command. The error is "Missing
parameter field current value." I looked this error up on
crystaldecisions.com and they had a patch which I downloaded, installed
and rebooted the machine, but still...
|
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...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |