Click here to Skip to main content
16,021,169 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
private void button1_Click(object sender, EventArgs e) {
XtraReport1 report = new XtraReport1();

using (ReportPrintTool printTool = new ReportPrintTool(report)) {
// Invoke the Print dialog.
printTool.PrintDialog();

// Send the report to the default printer.
printTool.Print();

// Send the report to the specified printer.
printTool.Print("myPrinter");
}

In the above code Error 6 The type or namespace name 'ReportPrintTool' could not be found (are you missing a using directive or an assembly reference?)

what i have to do in this?

Anyone rectify it.
Posted
Comments
[no name] 3-Jul-14 7:00am    
Add the assembly reference and/or add a using statement for whatever assembly the ReportPrintTool is contained in..
Member 10918392 3-Jul-14 8:29am    
Thanks a lot
I solved it.

Your class ReportPrintTool that you are using is belong to an assembly and/or namespace that you forgot to added into your project references and/or into your code with using directive.
 
Share this answer
 
Comments
Member 10918392 3-Jul-14 8:29am    
Thanks a lot.
I solved it.
Use "Add Reference" in Visual Studio to add a reference to DevExpress.XtraPrinting.v14.1.dll (or whatever version you have)

Add these lines to the top of your module
C#
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
using DevExpress.XtraPrinting.Preview;
 
Share this answer
 
Comments
Member 10918392 3-Jul-14 8:30am    
Thanks a lot.
I solved this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900