After export Save is pressed.

7 posts, 0 answers
  1. Jim
    Jim avatar
    3 posts
    Member since:
    Dec 2013

    Posted 19 Nov 2014 Link to this post

    Is there a way to execute a c# method after the save button is pressed when exporting a report from the Telerik report viewer?
  2. Hinata
    Hinata avatar
    146 posts
    Member since:
    Dec 2013

    Posted 24 Nov 2014 Link to this post

    Hi Jim,

    I guess different report viewers will need different approaches or it may not be even possible for some of the viewers due to the used technology differences. Can you tell us what viewer you are using and also why do you need to execute a c# method?
  3. DevCraft banner
  4. Jim
    Jim avatar
    3 posts
    Member since:
    Dec 2013

    Posted 24 Nov 2014 in reply to Hinata Link to this post

    Hi Hardik,

    The report viewer use is the Visual Studio 2013 Telerik Report Viewer for Silverlight.  The reason why I need this is to set a record flag true once the record(s) have been exported so they are not exported twice.
  5. Jim
    Jim avatar
    3 posts
    Member since:
    Dec 2013

    Posted 24 Nov 2014 in reply to Jim Link to this post

    For more information on the Telerik Report Viewer used: Description = Q3 2013 SP!, Version = 7.2.14.127
  6. Stef
    Admin
    Stef avatar
    3047 posts

    Posted 27 Nov 2014 Link to this post

    Hi Jim,

    With the specified version of Telerik Reporting you will need to extract the viewer's template and modify it with custom UI through which the export is handled programmatically - Exporting Report in Silverlight. This will allow you to detect the beginning and the end of the export, and execute custom logic for recording the user's action and disabling the custom UI.

    I hope the above information is helpful.

    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  7. Chetan
    Chetan avatar
    2 posts
    Member since:
    Feb 2016

    Posted 04 Aug Link to this post

    Its quite late, but I have similar query

    I have to use telerik silverlight report viewer default save button.

    When user click on save button  ExportBegin  event called.

    I want some event which can call after user clicks on Save &/or Cancel button on Confirm dialog box (which appear after click save button on silverlight report viewer menu)

    I have checked to the style file it contains one 

    telerikReporting:DialogBox x:Name="ExportDialog

    with one save button having command as  SaveExportCommand

    I want to override this SaveExportCommand command. so that custom filter controls on same silverlight control can be kept disable till user not click on save /cancel button.

    please help.

  8. Stef
    Admin
    Stef avatar
    3047 posts

    Posted 08 Aug Link to this post

    Hello Chetan,

    Such event is not exposed. The ExportBeging and Exportend events indicate when the reporting engine is done with the export. The user selection to save or not the document are not registered by the viewer.

    An event that will fire during and after the ExportEnd event is UpdateUI. A custom solution will be to count the UI elements displayed by the viewer and to detect when the viewer is done with the export e.g.:
    bool _isExportFinished = false;
    int _numberOfUIElements = 0;
    public MainPage()
    {
        InitializeComponent();
        ReportViewer1.ExportBegin += ReportViewer1_ExportBegin;
        ReportViewer1.ExportEnd += ReportViewer1_ExportEnd;
        ReportViewer1.UpdateUI += ReportViewer1_UpdateUI;        
    }
     
    void ReportViewer1_UpdateUI(object sender, EventArgs e)
    {
        if (_isExportFinished)
            if (_numberOfUIElements == 1)
            {
                MyControl.IsEnabled = true;
                _isExportFinished = false;
                _numberOfUIElements--;
            }
            else
                _numberOfUIElements++;
    }
     
    void ReportViewer1_ExportEnd(object sender, EventArgs e)
    {
        _isExportFinished = true;
    }
     
    void ReportViewer1_ExportBegin(object sender, Telerik.ReportViewer.Silverlight.ExportBeginEventArgs args)
    {
        MyControl.IsEnabled = false;
    }


    More reliable approach will be to use custom UI and to export tha report programmatically, where the save operation can be implemented by you - Exporting Report in Silverlight.


    Regards,
    Stef
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
DevCraft banner