473,387 Members | 1,492 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,387 software developers and data experts.

Creating an Instance of a Class at Runtime

I am trying to create a generic form driven the database. I want to be able
to run create Crystal reports from this genric page and only want to have to
enter some info in the database and drop the .RPT and .VB file of the report
into a certain directory.

My problem is how do I create an instance of a certain report at runtime. I
will know the Class name from the VB file, but I do not know how or if I can
create an instance of that class at runtime only having its name as a
string.

Any help would be appreciated.
Nov 21 '05 #1
2 1168
Activator.CreateInstance.

"Gunner" <gu****@docksidesoftware.com> wrote in message
news:eM**************@TK2MSFTNGP09.phx.gbl...
I am trying to create a generic form driven the database. I want to be able
to run create Crystal reports from this genric page and only want to have
to
enter some info in the database and drop the .RPT and .VB file of the
report
into a certain directory.

My problem is how do I create an instance of a certain report at runtime.
I
will know the Class name from the VB file, but I do not know how or if I
can
create an instance of that class at runtime only having its name as a
string.

Any help would be appreciated.

Nov 21 '05 #2
"Gunner" <gu****@docksidesoftware.com> schrieb:
My problem is how do I create an instance of a certain report at runtime.
I
will know the Class name from the VB file, but I do not know how or if I
can
create an instance of that class at runtime only having its name as a
string.


<URL:http://groups.google.to/groups?selm=Or5f9nXBFHA.2180%40TK2MSFTNGP12.phx.gb l>

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

Nov 21 '05 #3

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

Similar topics

8
by: Nanda | last post by:
hi, I am trying to generate parameters for the updatecommand at runtime. this.oleDbDeleteCommand1.CommandText=cmdtext; this.oleDbDeleteCommand1.Connection =this.oleDbConnection1;...
15
by: Carlos Lozano | last post by:
Hi, What is the right way to create an OCX COM component. The component is already registerred, but can't create an instance. I am using the reference to the interop module created. If I use...
6
by: Tony Maresca | last post by:
Given: public class MyClass { private MyClass() {} static MyClass() { //.. }
3
by: Seth | last post by:
I have been trying to create a mock httpcontext for the purpose of unit testing. I have a class, Customer, that uses cookies. I have set it up to be able to take a httpcontext as a parameter in...
12
by: Mats Lycken | last post by:
Hi, I'm creating a CMS that I would like to be plug-in based with different plugins handling different kinds of content. What I really want is to be able to load/unload plugins on the fly without...
2
by: Thorsten Viel | last post by:
Hi @all, this is not my first webservice and everytime it worked that way, by now i got following exception when trying to call http://<url>?wsdl in my browser: System.NullReferenceException:...
8
by: julia_beresford | last post by:
Hi I need to create the following class at runtime: public class MyCollection : CollectionBase { public void Add(MyItem item) { List.Add(item); }
4
by: Peter Smithson | last post by:
Hi, I'm new to .net so please forgive me if I've been stupid. I've got this - BaseCommand obj = null; String convClassName; .... System.Runtime.Remoting.ObjectHandle handle =
19
by: =?Utf-8?B?WWFua2VlIEltcGVyaWFsaXN0IERvZw==?= | last post by:
I'm doing my c# more and more like i used to code c++, meaning i'm casting more often than creating an instance of objects. like : protected void gvOrderDetailsRowDataBound(object sender,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.