ActiveReports 6 Support

Started by jpasswaters at 03-10-2010 1:22 PM. Topic has 1 replies.

Print Search Rate
Sort Posts:    
   03-10-2010, 1:22 PM
jpasswaters is not online. Last active: 11/29/2010 11:31:12 PM jpasswaters

Not Ranked
Joined on 03-02-2010
Posts 17
Create an initial generic ActiveReport to be used later as a specific report
What I would like to do is create an initial generic ActiveReport object and then based on some criteria in the application either cast that object to or make that object equal to an actual active report object and then be able to access the fields and so on.

Is this possible? If so, how would I go about doing something like this? I have like 15 or so reports that are generated from from this one exe based on certain criteria that is passed to the app.
   Report 
   03-11-2010, 7:33 AM
PrantikS is online. Last active: 2/10/2012 5:46:35 PM PrantikS

Top 25 Posts
Joined on 12-11-2008
Posts 1,550

DDStaff
Re: Create an initial generic ActiveReport to be used later as a specific report
Hello,

Thank you for your query. What you can do here is :-

1)    Save all of your 15 reports as RPX..
2)    Create a new object of ActiveReports6 (reportmain).
3)    Using loadlayout load the RPX into reportmain and access the fields.

But in order to access the controls, you will need to cast the same into their native types. For example, if reportmain has a textbox named textBox1, and you wish to access the text property of the same, you will need to write code as

 System.Xml.XmlTextReader xml = new System.Xml.XmlTextReader ("c:\\Report.rpx");
 DataDynamics.ActiveReports.ActiveReport reportmain = new DataDynamics.ActiveReports.ActiveReport ();
 reportmain. Loadlayout (xml);

         ((DataDynamics.ActiveReports.TextBox)(reportmain.Sections["detail"].Controls["textBox1"])).Text = "this is test";

reportmain.run ()

Regards,
Prantik
   Report 
GrapeCity » Product Support » ActiveReports 6... » Re: Create an initial generic ActiveReport to be used later as a specific report

Privacy Policy | Copyright © 1997-2012 — GrapeCity, inc.
All trademarks mentioned are the property of their respective owners.