onSave event

Posted by: junghoon.kim on 7 September 2021, 3:42 pm EST

  • Posted 7 September 2021, 3:42 pm EST

    hi.

    When i try to trigger the onSaveReport event like that image,
    always OnSaveAsReport event called not the onSaveReport event.
  • Replied 7 September 2021, 3:46 pm EST

    How to trigger an onSaveReport event when you press the save button?
  • Replied 7 September 2021, 7:48 pm EST

    if a report was not saved before, the onSaveAs handler is invoked, the subsequent savings will invoke the onSave handler, this is by design.
  • Replied 9 September 2021, 1:29 pm EST

    So how can we recognize that this report is a saved report?

    There are no saved files because json definition is being used. not a rdlx-json file.
    I want to call the save event and save as event both in this state.

    Is there a way to do that?
  • Marked as Answer

    Replied 9 September 2021, 7:40 pm EST

    you can implement a custom save button.
  • Replied 17 December 2021, 12:22 pm EST

    After much trial and error, it appears the requirement for it to think it has been 'saved before' is that you MUST return a
    Promise.resolve({ id: reportId });
    at a minimum to the onSave event handler. This would've been a much more helpful answer.

    You mention a custom save button. Are we able to override the designer toolbar button? I don't see anything that hints at that in the designer definition file like the viewer definition file has.
  • Replied 19 December 2021, 9:02 pm EST

    what do you mean by "override the designer toolbar button"?
  • Replied 21 December 2021, 1:53 am EST

    I mean is there a way to implement designer toolbar buttons like there is in the Viewer?
    IE
    this.$refs.reportViewer.Viewer().toolbar.addItem

    this.$refs.reportViewer.Viewer().toolbar.updateLayout

    From the examples and some trial & error I'm not seeing anything.
  • Replied 2 January 2022, 10:31 pm EST

    Hello,
    Unfortunately, the designer component does not expose the API that allows altering the toolbar.
Need extra support?

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

Learn More

Forum Channels