AR13 WebDesigner Custom Report Item

Posted by: kevin.gunn on 9 September 2019, 5:56 am EST

    • Post Options:
    • Link

    Posted 9 September 2019, 5:56 am EST

    Evening,

    Is it possible to create a custom report item for the web designer? Or can I default the name of a subreport in the web designer.

    We have a requirement for a report, which contains one of a number of subreports, of which is injected via code at run time, based on some conditional logic.

    The best way we have come up with, is to have a subreport report item, with a predefined name, then our code can inject the relevant subreport at this location.

    Thanks

    Kev

  • Posted 9 September 2019, 8:42 pm EST

    Hello Kevin,

    As per my understanding, you want to load the subreport from database via code at runtime on the basis of some conditional logic.

    I think this is the same requirement which is asked in the following case:

    https://www.grapecity.com/forums/ar-dev/webdesignerjsviewer-set-da

    ResourceLocator class gives you to inject the reportdata into subreport control over some conditional logic.

    Please correct me, if I am wrong.

    Thanks,

    Mohit

  • Posted 9 September 2019, 8:48 pm EST

  • Posted 9 September 2019, 10:48 pm EST

    Hi Mohit,

    Partly correct, the selection of the sub report is conditional, based on some calculations, the end user has the ability to customise\create their own main report that uses the conditions to inject one of many sub reports.

    We will need to know where to inject this sub report, as they may have added many sub reports to the report itself, but the conditional sub report, only should be injected into one of them. Hence my question about if we can create a Custom Report Item using the Web Designer, that the end user can drop onto the report, this Report Item, has the name already set i.e “ConditionalSubReport”, and is read only in the properties, so therefore our code when generating the report can find the report item named “ConditionalSubReport”, and inject the sub report at this location.

    I hope this makes more sense.

    Thanks

    Kev

  • Posted 10 September 2019, 6:15 pm EST

    Hello Kevin,

    I think it is not possible to add the Custom ReportItem in toolbox of the Web Designer. However, I escalated to the development team(275608) for the same and will inform you once I get any information from them.

    Also, If you have only one conditional subreport will be present in the report then you can template feature of the web designer.

    You can do the following thing:

    1: Create a report template with a single subreport having name “ConditionalSubReport”

    2: Give the template to the user to so that they can embed the template in their report if they want to use conditional subreport.

    However, following are the drawback of the above approach:

    1: Customer can change the name of SubReport name present in the Tempalte

    2: Customer can’t add the two conditional subreport.

    Thanks,

    Mohit

  • Posted 10 September 2019, 9:39 pm EST

    Hi Mohit,

    Thanks for the response, I eagerly await the response from the Dev Team.

    Thanks

    Kev

  • Posted 12 September 2019, 3:39 pm EST

    Hello Kevin,

    Currently, It is not possible to add the custom report item in the Web Designer. Could you please share your business use case so that we can help you in achieving your requirement.

    Thanks,

  • Posted 27 September 2019, 9:22 pm EST

    I have managed to achieve this using MutationObserver and jQuery. It listens for the adding of a subreport reportItem to the dom and then sets the Name to the value we require, and then hides subreport item from the toolbox, and shows it again if it is removed.

    I have also used it when the report contents is loaded to check if a sub report is already added.

  • Posted 29 September 2019, 3:54 pm EST

    Hello Kevin,

    I am glad your issue has been solved. Please revert if you any face any issue further.

    Thanks,

    Mohit

Need extra support?

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

Learn More

Forum Channels