directly print .rdlc Report (without Preview)


F

Frank Uray

Hi all

I have problems printing a .rdlc report directly to the printer.
I have created such a report without Datasource, I just
fill some parameters in this report.
With the ReportViewer I am able to print, but now I need to
print it directly without any preview.
I have found some articles, but this dont work and they are quite
complicated (for me ... :))

Microsoft.Reporting.WinForms.LocalReport local_Report = new
Microsoft.Reporting.WinForms.LocalReport();
local_Report.ReportPath = "_reports.rptImage.rdlc";
//local_Report.ReportEmbeddedResource = "_reports.rptImage.rdlc";

// Parameter
Microsoft.Reporting.WinForms.ReportParameter[] local_Parameter = { new
Microsoft.Reporting.WinForms.ReportParameter("Report_Parameter_Name",
symmetric.clsMessages.GetInput("Enter Name", "")),

new
Microsoft.Reporting.WinForms.ReportParameter("Report_Parameter_Date",
System.DateTime.Now.ToLongDateString()),

new
Microsoft.Reporting.WinForms.ReportParameter("Report_Parameter_Image",
"file:" + this.ctlListView_Files.SelectedItem.Key)};
local_Report.SetParameters(local_Parameter);

local_Report.EnableExternalImages = true;


Is there a easy way to print this ??
Thanks for any comments

Best regards
Frank
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top