Try getting the ReportViewer from the visual tree as follows:
sender, RoutedEventArgs e)
var layoutRoot = (FrameworkElement)System.Windows.Media.VisualTreeHelper.GetChild(
var reportViewerModel = (ReportViewerModel)(layoutRoot.DataContext);
Then you need to check for the state of the viewer in order the command to be executed.
I hope this helps you.
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.