473,473 Members | 2,015 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

No exception object

Jon
I don't know what's going on...but I have a function within a class that
loads a crystal report. The report fails to load for some reason, but the
odd thing is that when the debugger goes into the catch statement, ex =
Nothing...what could be happening? This is in VS 2005 with crystal XI R2.

Here's the function:

Public Sub LoadReport(ByVal FilePathAndName As String)
Try
rptActive = New ReportDocument
rptActive.Load(FilePathAndName)
Catch ex As Exception
Throw New Exception("Report load failed" + Environment.NewLine +
ex.Message)
End Try
End Sub
Dec 14 '05 #1
3 984
Jon
Here's a screenshot of it:
http://www.columbusinteractive.com/vsex.jpg
"Jon" <ru******@msn.com> wrote in message
news:uc**************@TK2MSFTNGP12.phx.gbl...
I don't know what's going on...but I have a function within a class that
loads a crystal report. The report fails to load for some reason, but the
odd thing is that when the debugger goes into the catch statement, ex =
Nothing...what could be happening? This is in VS 2005 with crystal XI R2.

Here's the function:

Public Sub LoadReport(ByVal FilePathAndName As String)
Try
rptActive = New ReportDocument
rptActive.Load(FilePathAndName)
Catch ex As Exception
Throw New Exception("Report load failed" + Environment.NewLine +
ex.Message)
End Try
End Sub

Dec 14 '05 #2
Jon,
Interesting, it sounds like a bug in Crystal XI R2!

It sounds like Crystal XI R2 is throwing Nothing, however I don't think that
is even allowed by the CLR!

In VB, the following results in a NullReferenceException:

Dim anException As Exception = Nothing
Throw anException

Are you using the released version of VS 2005 or one of the betas? If your
using a beta, does the same thing happen in the released version?

Unfortunately you may need to contact MS and/or Crystal support directly.

--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Jon" <ru******@msn.com> wrote in message
news:uc**************@TK2MSFTNGP12.phx.gbl...
|I don't know what's going on...but I have a function within a class that
| loads a crystal report. The report fails to load for some reason, but the
| odd thing is that when the debugger goes into the catch statement, ex =
| Nothing...what could be happening? This is in VS 2005 with crystal XI R2.
|
| Here's the function:
|
| Public Sub LoadReport(ByVal FilePathAndName As String)
| Try
| rptActive = New ReportDocument
| rptActive.Load(FilePathAndName)
| Catch ex As Exception
| Throw New Exception("Report load failed" + Environment.NewLine +
| ex.Message)
| End Try
| End Sub
|
|
Dec 14 '05 #3
Jon
This is the released version of VS 2005 and XI R2. If I put "Throw New
Exception("gg")" line in the same procedure, it catches that just fine.
"Jay B. Harlow [MVP - Outlook]" <Ja************@tsbradley.net> wrote in
message news:OM**************@TK2MSFTNGP15.phx.gbl...
Jon,
Interesting, it sounds like a bug in Crystal XI R2!

It sounds like Crystal XI R2 is throwing Nothing, however I don't think
that
is even allowed by the CLR!

In VB, the following results in a NullReferenceException:

Dim anException As Exception = Nothing
Throw anException

Are you using the released version of VS 2005 or one of the betas? If your
using a beta, does the same thing happen in the released version?

Unfortunately you may need to contact MS and/or Crystal support directly.

--
Hope this helps
Jay [MVP - Outlook]
.NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Jon" <ru******@msn.com> wrote in message
news:uc**************@TK2MSFTNGP12.phx.gbl...
|I don't know what's going on...but I have a function within a class that
| loads a crystal report. The report fails to load for some reason, but
the
| odd thing is that when the debugger goes into the catch statement, ex =
| Nothing...what could be happening? This is in VS 2005 with crystal XI
R2.
|
| Here's the function:
|
| Public Sub LoadReport(ByVal FilePathAndName As String)
| Try
| rptActive = New ReportDocument
| rptActive.Load(FilePathAndName)
| Catch ex As Exception
| Throw New Exception("Report load failed" + Environment.NewLine +
| ex.Message)
| End Try
| End Sub
|
|

Dec 14 '05 #4

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

Similar topics

3
by: Tony Johansson | last post by:
Hello! When you allocate object dynamically which mean on the heap I find that a problem when using exception. What is the prefer method to handle this kind of problem. //Tony
0
by: guy | last post by:
i have a method which throws an exception. the thing i dont understand is that the only change between the two versions is a line of code AFTER the one that throws the exception - see code below...
5
by: Vitling | last post by:
For no apparent reason, a NullReference exception is thrown in system.dll (System.Net.Sockets.OverlappedAsyncResult.CompletionPortCallback). Since I only get a disassembly from Visual Studio, it...
3
by: Lekyan | last post by:
I have problem setting the password for an ADAM user using C#. I used the SetPassword code given in the Microsoft page, changed several parameters, but ran into an exception. I wonder if other...
16
by: ChInKPoInt [No MCSD] | last post by:
I am using Visual Studio 2K3 writing a ASP.NET web application. Is there a way to force the C# compiler to catch possible exception? In Java, all exceptions thrown MUST BE caught, otherwise...
44
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level...
4
by: Aren Cambre | last post by:
Why does SmtpMail.Send throw an exception if the MailMessage's BodyFormat = MailFormat.Html? I've searched all over the place and cannot find a solution anywhere. I am running this on Windows XP...
7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
3
by: Richard | last post by:
I have created a Windows service which performs various functions including setting variables in other application objects. When the service runs under Local System account the functionality all...
5
by: Vijay | last post by:
Hi All, I am not able to figure out what exactly happening in below code. what is control flow. Can anyone clear my confusion? Code: class A { public: A(){cout<<"In Constructor\n";}
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
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...
0
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,...
0
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...
0
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...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.