AR12->AR14 Report Designer

Posted by: erich.wessely on 3 December 2020, 11:54 am EST

  • Posted 3 December 2020, 11:54 am EST

    Hi,

    I’m using AR12 with a lot of section reports containing a script and want to move to AR14

    The script requires Json so it contains

    using Newtonsoft.Json;
    

    In AR12 Designer the preview runs fine and produces a correct report, but doing the same with the AR14 designer throws an exeption:

    GrapeCity.ActiveReports.ReportScriptException: Report Script Compile Error on line 7 Error = The type or namespace name ‘Newtonsoft’ could not be found (are you missing a using directive or an assembly reference?) …

    Where do I have to place the Newtonsoft.Json.dll? I allready tried the Tools directory without success.

    Many thanks for help.

    Erich

  • Posted 4 December 2020, 6:23 am EST

    Hello,

    Could you please try use the solution as provided here:

    https://www.grapecity.com/forums/ar-dev/using-script-references-an#hello-you-can-do-the-follo

    Thanks,

    Mohit

  • Posted 4 December 2020, 10:09 am EST

    Hello Mohit,

    thanks for the link.

    That would mean to touch about 90+ reports :frowning:

    The other “problem” is that the person, doing the designs does not have a full dev environment with VS. She only have a licensed AR and is using only the designer.

    What has changed here from AR12->AR14. I can’t find anything about this in the releasenotes. Putting the assembly to the GAC seems not beeing enough and touching all reports would be hard work…

    Adding the using for System.Collections.Generic or System.Linq seems to be ok. So for other assemblies it seems to work…

    Is there really no other way to set a reference?

    Erich

  • Posted 7 December 2020, 11:15 am EST

    Hello,

    I have asked the development team(AR-25667) for more information on this and will inform you once I get any update from them.

    Thanks,

    Mohit

  • Posted 10 December 2020, 6:26 am EST

    Hello,

    Request to please confirm that the purpose of JSON in your script. It is very helpful for us to resolve the issue if you share the use case with us.

    Thanks,

    Mohit

  • Posted 10 December 2020, 12:31 pm EST

    Hello Mohit,

    the datasource of the report is XML. But for some values I’ve to “translate” the a value (it’s a code) to a “human readable” senseful value. The translation is provided via a json file. This json file can be large an is not necessarily static. So integration in the script is not possible. So the lookup is done at runtime. Modifying the XML is unfortunatly no option.

    Erich

  • Posted 10 December 2020, 10:23 pm EST

    Hello Erich,

    Can you please share the a small sample of you report so that we can look into the report and find a suitable solution for you.

    Thanks,

    Mohit

  • Posted 11 December 2020, 6:35 am EST

    Hello Mohit,

    find attached a absolutly reduced and simplified sample.

    As outlined, data will come from an XML file and I’ve to do some lookups in a json file.

    Steps to reproduce:

    Open the report with AR12 designer works fine

    Open the report with AR14 designer throws an exception:

    GrapeCity.ActiveReports.ReportScriptException: Report Script Compile Error on line 9 Error = The type or namespace name ‘Newtonsoft’ could not be found (are you missing a using directive or an assembly reference?) , …

    Thanks for help

    Erich

  • Posted 11 December 2020, 6:37 am EST

  • Posted 14 December 2020, 1:12 am EST

    Hello,

    Could you please pre-process the data source on the application level - load XML, transform it in the code of the application that has access to any assembly you want, and then save the transformed XML. After that you can use the XML data in your report.

    Thanks,

    Mohit

  • Posted 14 December 2020, 5:14 am EST

    Hello Mohit,

    thanks for your reply.

    That means to touch 90+ reports just to upgrade to AR14!!! And this is only one of my customers. I don’t know how many other are affected.

    That’s exactly what I wanted to avoid.

    I never had such troubles with AR compatibility before (and I’m a user since AR2). But having undocumented breaking changes raises doubts whether AR is still the right report generator.

    Do you have any news from dev-team what has changed? I can’t believe I’m the only user having this problem!

    Erich

  • Posted 14 December 2020, 10:40 pm EST

    Hello,

    Do you have any news from dev-team what has changed? I can’t believe I’m the only user having this problem!

    Earlier, NewtonSoft.Json is preloaded assembly in the designer that’s why you are able to use it in Designer, In AR13, we removed the NewtonSoft.Json in preloaded assembly list due to some internal changes. Now, we can’t add the NewtonSoft.Json again as we are removing the use of “NewtonSoft.Json” in our product in all our feature.

    Hope you understand.

    Thanks,

    Mohit

  • Posted 15 December 2020, 10:44 am EST

    Hello Mohit,

    thanks for clarifying.

    Does that mean you just removed “external” assemblies (in this case newtonsoft and maybe other)?

    In other words: can I rely that I can use common microsoft assemlies like system.collection and so on in the script? Or do I have to expect similar surprises?

    Erich

  • Posted 17 December 2020, 9:40 am EST

    Hello,

    We are very sorry for the inconvenience caused to you. Ideally, using external assemblies in the script is not a common practice. Often it can be replaced with the external code that you control. you can use the all inbuilt assemblies in the script.

    Thanks,

    Mohit

Need extra support?

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

Learn More

Forum Channels