Cannot find file specified error

  • Thread starter Thread starter Brad
  • Start date Start date
B

Brad

I will also post this in the CR group but because I program in VB maybe
somebody here might be able to help.

I am working on a new project that incorporates a few forms. I just created
my first form and I am assigning a variable to it here:

Dim anrpt As New ArmbandNumbers

When this line executes I get the error that "The System cannot find the
file specified." and highlights MyBase.New in the report's vb language.

I am doing the exact same thing as I have in another project and that one
works fine.

What might I be missing?

Thanks for the information.

Brad
 
Brad,

It has to be armbandnummers or braceletnumber (or is it SA)

However that can in my opinion not be the error, therefore you should tell
something more
Dim anrpt As New ArmbandNumbers
This means create a new object anrpt from the class ArmbandNumbers

That ArmbandNumbers class can be in a referenced dll what maybe is lost,
however now it becomes to much guessing .

I am guessing that you are not using Visual Studio Net now.


Cor
 
Brad said:
Dim anrpt As New ArmbandNumbers

When this line executes I get the error that "The System cannot find the
file specified." and highlights MyBase.New in the report's vb language.

Is this the /complete/ error message?
 
Herfried and Cor,

I created a new Crystal Report using Project | Add New Item | Crystal Report. I then set the dataset and designed the form. I named this form ArmbandNumbers.rpt.

In my main program I:

DIM anrpt as New ArmbandNumbers

When the program hits this line, this is the exact exception that is returned:

"A first chance exception of type 'System.IO.FileNotFoundException' occured in CrystalDecisions.CrystalReports.Engine.dll'

Additional information: The System cannot find the file specified."

And in the debug, it highlights The MyBase.New():

'------------------------------------------------------------------------------

' <autogenerated>

' This code was generated by a tool.

' Runtime Version: 1.1.4322.573

'

' Changes to this file may cause incorrect behavior and will be lost if

' the code is regenerated.

' </autogenerated>

'------------------------------------------------------------------------------

Option Strict Off

Option Explicit On

Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.ReportSource

Imports CrystalDecisions.Shared

Imports System

Imports System.ComponentModel



Public Class ArmbandNumbers

Inherits ReportClass


Public Sub New()

MyBase.New

End Sub



Thanks for any help you can give. I have several other apps that uses Crystal Reports where everything is working fine and I structured the syntax just like the other programs. And yes, Cor, I am using VB .Net.

Brad
 
And some more information, if I do just this:

Dim anrpt As ArmbandNumbers
daArmNums.SelectCommand.Parameters(0).Value = selClassic
daArmNums.Fill(DsArmNums1)
anrpt.Database.Tables(0).SetDataSource(DsArmNums1.Tables(0))
crvPrep.ReportSource = anrpt

I get this exception:

A first chance exception of type 'System.NullReferenceException' occurred in
ClassicEntry.exe

Additional information: Object reference not set to an instance of an
object.

Brad
 
Brad,

I tried it, no problems, did you try it yourself already with a new project doing nothing more than you said, even not the dataset.

Cor
 
Brad,

You wrote in your previous message something else because this is what you
get when you do not instance an object with New.
Dim anrpt As ArmbandNumbers

Cor
 
Cor,

I did just create a new project just to test building a report just as I did with the main project, using the same dataset and it works.

So now what should I do, delete the report and all references from the main project and try to recreate it?

Brad
Brad,

I tried it, no problems, did you try it yourself already with a new project doing nothing more than you said, even not the dataset.

Cor
 
Brad,

So now what should I do, delete the report and all references from the main
project and try to recreate it?

That was what I would do, however if you do it is your own choose.

Cor
 
Cor,

I tried deleting all references to Crystal, the report, everything and then
rebuilt the report and it does the same thing.

This is driving me nutty today.

Brad
 
Brad,

Did you open your designer part and looked if there are some orphaned parts,
it will not be the first time that that happens.

Cor
 
Cor,

Can you help me with that, because I am not familiar with orphaned parts. I
did go through the code of the report to see if there was anything strange.

I am also now dealing with Business Objects (creator of CR) to see if they
know.

Brad
 
Brad,

Now I see you wrote "I deleted all the references to the report". Did you
try it with another report because I get more and more the idea that it is
in the report.

And to overcome orphaned parts, would I just use other names.

I hope this helps,

Cor
 
The Crystal Report people thought the same thing - that I named the report
the same as a class, however I didn't. And I did try to recreate the report
using a totally unique name. When I deleted all references to Crystal
Reports, they were added back in when I recreated the report as they should
be.

I zipped the whole file and e-mailed the support person at Crystal Reports.
I am hoping this problem is something simple and I will let you know what
they say.

Brad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top