Hi, I'm too newer in Telerik Reporting, and I not have idea to when make a ReportViewer or Telerik.Reporting.Report, I have an example works fine, is a report with 2 parameter, and I can see it on screen or sent to printer, now I want to sent it to user mail, without interaction of user, how I can do this? I'm work in WPF with VS2013, annexed my code:
in XAML:
<tr:ReportViewer Name="ReportViewer1" Width="800" Height="500" >
<tr:ReportViewer.ReportSource>
<telerikReporting:TypeReportSource TypeName="ReportLibrary, ReportLibrary" />
</tr:ReportViewer.ReportSource>
</tr:ReportViewer>
in .cs:
var TRS = new TypeReportSource();
TRS.TypeName = typeof(pgoRelacionCobranza).AssemblyQualifiedName;
ReportViewer1.ReportSource = TRS;
FechaIni = dpFechaIni.SelectedDate.Value.Day.ToString() +"/" + dpFechaIni.SelectedDate.Value.Month.ToString() + "/" + dpFechaIni.SelectedDate.Value.Year.ToString();
FechaFin = dpFechaFin.SelectedDate.Value.Day.ToString() + "/" + dpFechaFin.SelectedDate.Value.Month.ToString() + "/" + dpFechaFin.SelectedDate.Value.Year.ToString();
var TRS = new TypeReportSource();
TRS.TypeName = typeof(pgoRelacionCobranza).AssemblyQualifiedName;
TRS.Parameters.Add(new Telerik.Reporting.Parameter("pFechaIni", FechaIni));
TRS.Parameters.Add(new Telerik.Reporting.Parameter("pFechaFin", FechaFin));
ReportViewer1.ReportSource = TRS;
if (rbPantalla.IsChecked == true)
{
ReportViewer1.RefreshReport();
stkReportView.Visibility = System.Windows.Visibility.Visible;
}
else
{
System.Windows.Forms.PrintDialog printDlg = new System.Windows.Forms.PrintDialog();
printDlg.AllowSomePages = true;
printDlg.AllowCurrentPage = false;
printDlg.UseEXDialog = true;
DialogResult result = printDlg.ShowDialog();
// If the result is OK then print the document.
if (result == DialogResult.OK)
{
ReportProcessor reportProcessor = new ReportProcessor();
reportProcessor.PrintReport(TRS, printDlg.PrinterSettings);
}
}