473,772 Members | 2,292 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crystal Reports exception

I am receiving the following exception randomly when printing crystal reports
via a print server application. The server will successfully print a random
number of an identical reports (report.rpt) and then for some reason, the
following exception is logged.

System.InvalidO perationExcepti on: Stack empty.
at System.Collecti ons.Stack.Pop()
at SCRStartup.Leav e()
at CrystalDecision s.CrystalReport s.Engine.Report Objects..ctor(S CRPrintJob
printJob, Int32 sectionCode)
at CrystalDecision s.CrystalReport s.Engine.Report Objects.GetEnum erator()
clsReports.LogI nReport()

The code for LogInReport is as follows

Dim ret As Boolean = False
Dim repDoc As New ReportDocument
Dim subRepDoc As New ReportDocument
Dim crSections As Sections
Dim crSection As Section
Dim crReportObjects As ReportObjects
Dim crReportObject As ReportObject
Dim crSubReportObje ct As SubreportObject
Dim crDatabase As Database
Dim crTables As Tables
Dim crTable As Table
Dim crConnInfo As New ConnectionInfo
Dim crLogOnInfo As New TableLogOnInfo
Try
repDoc.Load(mst rFile, OpenReportMetho d.OpenReportByD efault)

With crConnInfo
.ServerName = mstrServer
.DatabaseName = mstrDatabase
.UserID = mstrUserName
.Password = mstrPassWord
End With

'we iterate through the report database tables and log the user in
crDatabase = repDoc.Database
crTables = crDatabase.Tabl es
For Each crTable In crTables
crLogOnInfo = crTable.LogOnIn fo
crLogOnInfo.Con nectionInfo = crConnInfo
crTable.ApplyLo gOnInfo(crLogOn Info)
Next

crSections = repDoc.ReportDe finition.Sectio ns
For Each crSection In crSections
crReportObjects = crSection.Repor tObjects
For Each crReportObject In crReportObjects
If crReportObject. Kind =
ReportObjectKin d.SubreportObje ct Then
crSubReportObje ct = CType(crReportO bject,
SubreportObject )
subRepDoc =
crSubReportObje ct.OpenSubrepor t(crSubReportOb ject.SubreportN ame)
crDatabase = subRepDoc.Datab ase
crTables = crDatabase.Tabl es
For Each crTable In crTables
crLogOnInfo = crTable.LogOnIn fo
crTable.LogOnIn fo.ConnectionIn fo = crConnInfo
crTable.ApplyLo gOnInfo(crTable .LogOnInfo)
Next
End If
Next
Next
ret = True
Catch ex As Exception
EventLog.WriteE ntry(AppName, ex.ToString, EventLogEntryTy pe.Error)
End Try
Return ret

Any ideas?

TIA
Jul 21 '05 #1
2 2624
This is an issue with Crystal running on dual processor machines. To resolve
the issue you have to bring up Task Manager, select your application, right
click and set affinity. Set your application up to run only on one CPU.

"OzSoft" wrote:
I am receiving the following exception randomly when printing crystal reports
via a print server application. The server will successfully print a random
number of an identical reports (report.rpt) and then for some reason, the
following exception is logged.

System.InvalidO perationExcepti on: Stack empty.
at System.Collecti ons.Stack.Pop()
at SCRStartup.Leav e()
at CrystalDecision s.CrystalReport s.Engine.Report Objects..ctor(S CRPrintJob
printJob, Int32 sectionCode)
at CrystalDecision s.CrystalReport s.Engine.Report Objects.GetEnum erator()
clsReports.LogI nReport()

The code for LogInReport is as follows

Dim ret As Boolean = False
Dim repDoc As New ReportDocument
Dim subRepDoc As New ReportDocument
Dim crSections As Sections
Dim crSection As Section
Dim crReportObjects As ReportObjects
Dim crReportObject As ReportObject
Dim crSubReportObje ct As SubreportObject
Dim crDatabase As Database
Dim crTables As Tables
Dim crTable As Table
Dim crConnInfo As New ConnectionInfo
Dim crLogOnInfo As New TableLogOnInfo
Try
repDoc.Load(mst rFile, OpenReportMetho d.OpenReportByD efault)

With crConnInfo
.ServerName = mstrServer
.DatabaseName = mstrDatabase
.UserID = mstrUserName
.Password = mstrPassWord
End With

'we iterate through the report database tables and log the user in
crDatabase = repDoc.Database
crTables = crDatabase.Tabl es
For Each crTable In crTables
crLogOnInfo = crTable.LogOnIn fo
crLogOnInfo.Con nectionInfo = crConnInfo
crTable.ApplyLo gOnInfo(crLogOn Info)
Next

crSections = repDoc.ReportDe finition.Sectio ns
For Each crSection In crSections
crReportObjects = crSection.Repor tObjects
For Each crReportObject In crReportObjects
If crReportObject. Kind =
ReportObjectKin d.SubreportObje ct Then
crSubReportObje ct = CType(crReportO bject,
SubreportObject )
subRepDoc =
crSubReportObje ct.OpenSubrepor t(crSubReportOb ject.SubreportN ame)
crDatabase = subRepDoc.Datab ase
crTables = crDatabase.Tabl es
For Each crTable In crTables
crLogOnInfo = crTable.LogOnIn fo
crTable.LogOnIn fo.ConnectionIn fo = crConnInfo
crTable.ApplyLo gOnInfo(crTable .LogOnInfo)
Next
End If
Next
Next
ret = True
Catch ex As Exception
EventLog.WriteE ntry(AppName, ex.ToString, EventLogEntryTy pe.Error)
End Try
Return ret

Any ideas?

TIA

Jul 21 '05 #2
Hi OzSoft,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you're having a CR exception randomly.
If there is any misunderstandin g, please feel free to let me know.

As far as I can see, this is a Crystal Report issue. I'm sorry but this
product is currently not supported by Microsoft. Besides posting here, you
can also check the Crystal Report technical support website for more
information. Please check the following KB article which will give you the
link for them.

http://support.microsoft.com/default...b;en-us;317789

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #3

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

Similar topics

3
1578
by: Richard Hallgren | last post by:
Hi, I have a project that uses Crystal Reports (VS .Net included) and the System.Data namespace. I've managed to deploy the project and to get Crystal Report working on my clients XP based machines. However, once I try the install the solution on their Win 2000 machines I run into some problems. On some machines the application works but the Crystal Report engine throws an error, on other machines the applications crashes (with the...
2
4934
by: Mythran | last post by:
In .Net, how can I go about and set a Crystal Reports namespace? Right now they use the Root Namespace (VB) from the project. How can I extend the namespace for a single report (which will be set on all reports)? Thanks for any and all help, in advance :) Mythran
0
8778
by: stephan | last post by:
I know that this has been beaten to death but I can't seem to resolve my issues (I have 2 of them). I have created a class that exposes a public method which returns a datatable as a datasource for a Crystal Report. The method has a single argument which represents a parameter required by the Stored Procedure. When I generate the report in Crystal and run it using the class I built, it works fine. I've tried it with parameters and...
1
1009
by: Islam Elkhayat | last post by:
I have problems with crystal Report... i use SQL query to fill dataGrid, i use checkboxs to select the column to return and build my query.. I want to create a report with the data of the datagrid (Use the same Query) 1-How can i bind it to the report?? 2- i need more information about working with crystal report in VS.2003.. may i ask 4 good site??
3
15039
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,...
7
4428
by: John | last post by:
I am using Crystal Reports in my application I made using Visual Studio.NET. I installed my application on the client machine, with all the DLLs required(added the merge modules), the engine and the rest. When I start my application and, from it, try to open up a report I get an exception "Query engine error: C:\WINDOWS\Temp\temp_*******.rpt" with some wierd numbers instead of *******. Can anyone tell me what the problem is here and how to...
2
6822
by: Diogo Alves - Software Developer | last post by:
Hi, I'm desesperate, for long 4 days that I am trying to deploy an application with crystal reports, and it fails... I checked the documentation and it says the merge modules necessary to implement on the installer.. I already put them there and every time I call a crystal report I have and exception and the log. I will post it here:
1
2321
by: Tim_Mac | last post by:
hi, i am encountering a sporadic exception using crystal reports that is causing me grief, I can't 'handle' it... my code is loading a typed report, and loading a DataSet to it. unfortunately crystal reports customer support is very poor and their 'case management' tool refuses to function. i'm posting here in the hope that someone may have seen it before and worked around it. first of all, here is the exception:
2
8689
by: matt | last post by:
hello, i have an .RPT file that i am using to load a report via the ASP.NET CrystalReportViewer control. i dont include my .RPTs as embedded resources...instead i load the absolute path of the .rpt (on the file system) to the control's ".ReportSource" property. i do this because i like to move new versions of the reports w/o having to rebuild the site. then i pass in filter criteria to the control's ".SelectionFormula"
1
2311
by: appandairajc | last post by:
Hi Friends, I have a problem in Crystal Reports. I have a web application and it was published in machine. I am running that application through a virtual path. All the pages are working fine, but some pages which contains CrystalReportViewer are not working and i got an Exception which is given below. "An error has occurred while attempting to load the Crystal Reports runtime. Either the Crystal Reports registry key...
0
9621
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
9454
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,...
1
10039
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
9914
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
8937
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
7461
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
6716
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();...
1
4009
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
3610
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.