473,806 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1179
Activator.Creat eInstance.

"Gunner" <gu****@docksid esoftware.com> wrote in message
news:eM******** ******@TK2MSFTN GP09.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****@docksid esoftware.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.t o/groups?selm=Or5 f9nXBFHA.2180%4 0TK2MSFTNGP12.p hx.gbl>

--
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
5972
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; this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ApplicantName", dataset.Tables.Columns.DataType, 50,
15
6753
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 javascript or vbscript it works. I will appreciate any help. I do the following (C#):
6
1799
by: Tony Maresca | last post by:
Given: public class MyClass { private MyClass() {} static MyClass() { //.. }
3
1898
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 an overloaded constructor. I have seen a few references to people that have created mock httpcontexts but I can not seem to get it to work. This is what I have right now, it is the result of working backwards from httpcontext and trial and...
12
3180
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 restarting the application. What I did was to create an AppDomain that loaded the plugins and everything was great, until I tried to pass something else that strings between the domains...
2
1813
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: Object reference not set to an instance of an object. at System.Runtime.Remoting.MetadataServices.WsdlGenerator.RealSchemaType.PrintMessageWsdl(TextWriter
8
2219
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
1796
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
1956
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, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { switch (((Sale)e.Row.DataItem).SzPN) {
0
9718
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
10617
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10364
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9186
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
7649
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
5545
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3849
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.