473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Why is This Undefined?

I am trying to create a Sub in a VS 2005 project but the parameter being
passed comes up with an error of "Undefined" within the sub? I am including
the Sub header and the point of the error. I am lost as to why this fails?
Wayne
====================== Code Snippets ==============
Public Sub SetupRecap(ByRef recaptype As
CrystalDecisions.CrystalReports.Engine.ReportDocum ent)

.......................

crReport = New recaptype '<=== recaptype is flagged as undefined?

.......................

End Sub
Nov 21 '05 #1
6 1020
CT
Wayne,

recaptype is a variable, an instance of the type
CrystalDecisions.CrystalReports.Engine.ReportDocum ent. If recaptype is
instantiated when it is passed to SetupRecap, you can simpyl use it as is,
i.e. recaptype.xxxxProperty = ""

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:Oz**************@TK2MSFTNGP10.phx.gbl...
I am trying to create a Sub in a VS 2005 project but the parameter being
passed comes up with an error of "Undefined" within the sub? I am including
the Sub header and the point of the error. I am lost as to why this fails?
Wayne
====================== Code Snippets ==============
Public Sub SetupRecap(ByRef recaptype As
CrystalDecisions.CrystalReports.Engine.ReportDocum ent)

......................

crReport = New recaptype '<=== recaptype is flagged as
undefined?

......................

End Sub

Nov 21 '05 #2
Carsten;

Thanks for that information. You are right in that when I removed the "New"
the error msg went away. I just can't seem to get OO right!

Wayne

"CT" <ca******@spammersgoawayintegrasol.dk> wrote in message
news:eq**************@TK2MSFTNGP10.phx.gbl...
Wayne,

recaptype is a variable, an instance of the type
CrystalDecisions.CrystalReports.Engine.ReportDocum ent. If recaptype is
instantiated when it is passed to SetupRecap, you can simpyl use it as is,
i.e. recaptype.xxxxProperty = ""

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:Oz**************@TK2MSFTNGP10.phx.gbl...
I am trying to create a Sub in a VS 2005 project but the parameter being
passed comes up with an error of "Undefined" within the sub? I am
including the Sub header and the point of the error. I am lost as to why
this fails?
Wayne
====================== Code Snippets ==============
Public Sub SetupRecap(ByRef recaptype As
CrystalDecisions.CrystalReports.Engine.ReportDocum ent)

......................

crReport = New recaptype '<=== recaptype is flagged as
undefined?

......................

End Sub


Nov 21 '05 #3
CT
Wayne,

You don't even need the "crReport = recaptype", just use recaptype as you
would use crReport. You simple have two variables poiting to the same
object, if not.

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:uM**************@TK2MSFTNGP09.phx.gbl...
Carsten;

Thanks for that information. You are right in that when I removed the
"New" the error msg went away. I just can't seem to get OO right!

Wayne

"CT" <ca******@spammersgoawayintegrasol.dk> wrote in message
news:eq**************@TK2MSFTNGP10.phx.gbl...
Wayne,

recaptype is a variable, an instance of the type
CrystalDecisions.CrystalReports.Engine.ReportDocum ent. If recaptype is
instantiated when it is passed to SetupRecap, you can simpyl use it as
is, i.e. recaptype.xxxxProperty = ""

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:Oz**************@TK2MSFTNGP10.phx.gbl...
I am trying to create a Sub in a VS 2005 project but the parameter being
passed comes up with an error of "Undefined" within the sub? I am
including the Sub header and the point of the error. I am lost as to why
this fails?
Wayne
====================== Code Snippets ==============
Public Sub SetupRecap(ByRef recaptype As
CrystalDecisions.CrystalReports.Engine.ReportDocum ent)

......................

crReport = New recaptype '<=== recaptype is flagged as
undefined?

......................

End Sub



Nov 21 '05 #4
Carsten;

Thanks for the additional information. I assign that to crReport as that is
the common report name used in my preview routine. I have several processes
that populate various reports and they all end up calling the preview form
which uses a global crReport as the base.

Wayne

"CT" <ca******@spammersgoawayintegrasol.dk> wrote in message
news:OY**************@TK2MSFTNGP09.phx.gbl...
Wayne,

You don't even need the "crReport = recaptype", just use recaptype as you
would use crReport. You simple have two variables poiting to the same
object, if not.

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:uM**************@TK2MSFTNGP09.phx.gbl...
Carsten;

Thanks for that information. You are right in that when I removed the
"New" the error msg went away. I just can't seem to get OO right!

Wayne

"CT" <ca******@spammersgoawayintegrasol.dk> wrote in message
news:eq**************@TK2MSFTNGP10.phx.gbl...
Wayne,

recaptype is a variable, an instance of the type
CrystalDecisions.CrystalReports.Engine.ReportDocum ent. If recaptype is
instantiated when it is passed to SetupRecap, you can simpyl use it as
is, i.e. recaptype.xxxxProperty = ""

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:Oz**************@TK2MSFTNGP10.phx.gbl...
I am trying to create a Sub in a VS 2005 project but the parameter being
passed comes up with an error of "Undefined" within the sub? I am
including the Sub header and the point of the error. I am lost as to why
this fails?
Wayne
====================== Code Snippets ==============
Public Sub SetupRecap(ByRef recaptype As
CrystalDecisions.CrystalReports.Engine.ReportDocum ent)

......................

crReport = New recaptype '<=== recaptype is flagged as
undefined?

......................

End Sub



Nov 21 '05 #5
CT
Ah... ;-)

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:e4*************@TK2MSFTNGP15.phx.gbl...
Carsten;

Thanks for the additional information. I assign that to crReport as that
is the common report name used in my preview routine. I have several
processes that populate various reports and they all end up calling the
preview form which uses a global crReport as the base.

Wayne

"CT" <ca******@spammersgoawayintegrasol.dk> wrote in message
news:OY**************@TK2MSFTNGP09.phx.gbl...
Wayne,

You don't even need the "crReport = recaptype", just use recaptype as you
would use crReport. You simple have two variables poiting to the same
object, if not.

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:uM**************@TK2MSFTNGP09.phx.gbl...
Carsten;

Thanks for that information. You are right in that when I removed the
"New" the error msg went away. I just can't seem to get OO right!

Wayne

"CT" <ca******@spammersgoawayintegrasol.dk> wrote in message
news:eq**************@TK2MSFTNGP10.phx.gbl...
Wayne,

recaptype is a variable, an instance of the type
CrystalDecisions.CrystalReports.Engine.ReportDocum ent. If recaptype is
instantiated when it is passed to SetupRecap, you can simpyl use it as
is, i.e. recaptype.xxxxProperty = ""

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:Oz**************@TK2MSFTNGP10.phx.gbl...
>I am trying to create a Sub in a VS 2005 project but the parameter
>being passed comes up with an error of "Undefined" within the sub? I am
>including the Sub header and the point of the error. I am lost as to
>why this fails?
>
>
> Wayne
>
>
> ====================== Code Snippets ==============
> Public Sub SetupRecap(ByRef recaptype As
> CrystalDecisions.CrystalReports.Engine.ReportDocum ent)
>
> ......................
>
> crReport = New recaptype '<=== recaptype is flagged as
> undefined?
>
> ......................
>
> End Sub
>
>



Nov 21 '05 #6
"Wayne Wengert" <wa***********@wengert.org> schrieb:
I am trying to create a Sub in a VS 2005 project but the parameter being
passed comes up with an error of "Undefined" within the sub? I am including
the Sub header and the point of the error. I am lost as to why this fails?

====================== Code Snippets ==============
Public Sub SetupRecap(ByRef recaptype As
CrystalDecisions.CrystalReports.Engine.ReportDocum ent)

......................

crReport = New recaptype '<=== recaptype is flagged as
undefined?


If you want to make 'crReport' reference the same object as 'recaptype':

\\\
crReport = recaptype
///

'recaptype' is a variable and thus cannot be used as a type in the scenario
you describe above.

If you want to create a new instance of 'ReportDocument':

\\\
crRepoirt = New CrystalDecisions.CrystalReports.Engine.ReportDocum ent(...)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #7

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

Similar topics

1
by: Stu | last post by:
I am trying to build the xerces shared library with 2.3.0 version of their source code on an AIX 5.1 32 bit machine with the following version of the g++ compiler /usr/local/bin/g++ -v Reading...
13
by: david | last post by:
Hi, I have some problems to link a simple hello world program using g++ (version 3.2.3 or 3.3) and dinkumware 402. //hallo world... #include <iostream> main () { std::cout << "bla" <<...
0
by: pervinder | last post by:
Hi, I have a c++ application which depends on some other libs which uses stlport When i build the application, it works fine on sun/linux/hp platform. (provided the .a for the dependency libs) ...
1
by: Foolster41 | last post by:
I'm rather new to C++ programing. I'm using the dev-C++ program on a windows XP OS. I'm trying to compile the code for a multi user dungeon (MUD) called circle-mud. When I compile I get the...
49
by: matty | last post by:
Hi, I recently got very confused (well that's my life) about the "undefined" value. I looked in the FAQ and didn't see anything about it. On...
4
by: John Oliver | last post by:
PHP Notice: Undefined index: name in /home/www/reformcagunlaws.com/new.php on line 6 PHP Notice: Undefined index: address in /home/www/reformcagunlaws.com/new.php on line 7 PHP Notice: ...
3
by: Michael Sgier | last post by:
Hi i get thousands of messages like below. How shall i resolve that? Thanks Mcihael Release/src/Utility/RawImage.o: In function `CMaskImage::CMaskImage(int, int, char const*)':...
1
by: yamitmehta | last post by:
When I compile to code using g++arm of VxWorks 5.5 and put it on my board i get the follwing undefined symbols:- Cpool and Csingleton are template classes. CPool has the static member...
2
by: zqiang320 | last post by:
Hello: I execute make ,then get error: $ make Making all in libsbml/src make: Entering directory `/home/internet/mydoc/test_pj/libsbml/src' ........ /bin/sh ./libtool --tag=CC --mode=link...
3
by: tvnaidu | last post by:
I compiled tinyxml files (.cpp files) and when I am linking to create final exe in Linux, I am getting lot of errors saying "undefiend reference" to "operator new" and "delete", any idea?. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
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...
0
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
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...

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.