This is a migrated thread and some comments may be shown as answers.

After export Save is pressed.

6 Answers 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 19 Nov 2014, 02:20 PM
Is there a way to execute a c# method after the save button is pressed when exporting a report from the Telerik report viewer?

6 Answers, 1 is accepted

Sort by
0
Hinata
Top achievements
Rank 1
answered on 24 Nov 2014, 08:09 AM
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?
0
Jim
Top achievements
Rank 1
answered on 24 Nov 2014, 01:17 PM
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.
0
Jim
Top achievements
Rank 1
answered on 24 Nov 2014, 03:04 PM
For more information on the Telerik Report Viewer used: Description = Q3 2013 SP!, Version = 7.2.14.127
0
Stef
Telerik team
answered on 27 Nov 2014, 09:27 AM
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.

 
0
Chetan
Top achievements
Rank 1
answered on 04 Aug 2016, 09:20 AM

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.

0
Stef
Telerik team
answered on 08 Aug 2016, 12:35 PM
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
Tags
General Discussions
Asked by
Jim
Top achievements
Rank 1
Answers by
Hinata
Top achievements
Rank 1
Jim
Top achievements
Rank 1
Stef
Telerik team
Chetan
Top achievements
Rank 1
Share this question
or