Posted 17 June 2019, 1:14 pm EST
Hi,
I’m wondering if it’s possible to use the ```
AddScriptReference
Thanks,
Ben
Forums Home / ActiveReports / ActiveReports v7+
Posted by: bplante on 17 June 2019, 1:14 pm EST
Posted 17 June 2019, 1:14 pm EST
Hi,
I’m wondering if it’s possible to use the ```
AddScriptReference
Thanks,
Ben
Posted 18 June 2019, 5:11 am EST
Hello,
You can do the following steps;
1: Create the custom assembly with strong name and register it to GAC
2: Create a new sample with section report(XML based)
3: Add report designer to form
4:Add your code in Script section of the report like as follow:
public void detail_Format()
{
ClassLibrary1.Class1 test = new ClassLibrary1.Class1();
this.textBox1.Text = test.s;
}
5:Add the following code in “Form_Load” event
SectionReport rpt = new SectionReport();
```
System.Xml.XmlTextReader xtr = new System.Xml.XmlTextReader(@“…..\SectionReport2.rpx”);
rpt.LoadLayout(xtr);
xtr.Close();
rpt.AddScriptReference(@“C:\Users\mohitg\Documents\Visual Studio 2017\Projects\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll”);
designer1.Report = rpt;
6: Run the sample
Hope it helps.
Thanks.