AddScriptReference from script

Posted by: radekczadek on 6 November 2017, 7:24 am EST

  • Posted 6 November 2017, 7:24 am EST

    Hi!,

    is it possible to add for example System.Net.Http reference from inside RPX script?

    thanks,
    Radek
  • Replied 7 November 2017, 10:19 am EST

    Hi Radek,

    I believe you can add the reference for external assemblies using the instructions given here:
    http://help.grapecity.com/activereports/webhelp/AR11/CustomCode.html

    You can also add dll using AddScriptReference() at run time. Using the code as follows:

    private void runReport()
    {
    SectionReport1 rpt = new SectionReport1();
    rpt.AddScriptReference("System.Data");
    rpt.Run();
    this.viewer1.Document = rpt.Document;
    }

    Thanks,
    Deepak Sharma
  • Replied 8 November 2017, 4:22 am EST

    Yes - thank you but first tip is not possible in AR6 i think.

    Code you provided is outside the report script isn't it? I think that this code is only one way to add reference to the script but doing this inside of the report script is impossible yes (I'm mean adding references)?

    thanks for help,
    Radek
  • Marked as Answer

    Replied 14 November 2017, 12:39 pm EST

    Hi Radek,

    The code I have given is outside the report. You can use this code in your code based report to add a reference for a dll at run time.


    Thanks,
    Deepak Sharma
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels