XtraReport - View report but do not print

0

I'm using the report builder XtraReport , and using ReportPrintTool to view and then print.

However, I had to, just visualize, blocking the impression. Is it possible?

View button:

private void button8_Click(object sender, EventArgs e) // botao imprimir
    {
        // Create a report. 
        imp_orcamento report = new imp_orcamento(Convert.ToInt32(textBox1.Text));

        // Show the report's preview. 
        ReportPrintTool tool = new ReportPrintTool(report);
        tool.ShowRibbonPreviewDialog(); 
    }
    
asked by anonymous 19.08.2016 / 19:35

1 answer

0

Solution:

private void button8_Click(object sender, EventArgs e) // botao imprimir
    {
        // Create a report. 
        imp_orcamento report = new imp_orcamento(Convert.ToInt32(textBox1.Text));

        // Show the report's preview. 
        ReportPrintTool tool = new ReportPrintTool(report);

        tool.Report.PrintingSystem.SetCommandVisibility(PrintingSystemCommand.File, false);
        tool.Report.PrintingSystem.SetCommandVisibility(PrintingSystemCommand.ExportFile, false);
        tool.Report.PrintingSystem.SetCommandVisibility(PrintingSystemCommand.Print, false);
        tool.Report.PrintingSystem.SetCommandVisibility(PrintingSystemCommand.Save, false);
        tool.Report.PrintingSystem.SetCommandVisibility(PrintingSystemCommand.Open, false);
        tool.Report.PrintingSystem.SetCommandVisibility(PrintingSystemCommand.SendFile, false);
        tool.Report.PrintingSystem.SetCommandVisibility(PrintingSystemCommand.PageSetup, false);
        tool.Report.PrintingSystem.SetCommandVisibility(PrintingSystemCommand.PrintDirect, false);


        tool.ShowRibbonPreviewDialog();
    }
    
19.08.2016 / 21:23