¿Cómo configurar la vista previa de impresión de la plantilla existente en un formulario?

Am displaying 3 reports in lookup edit (drop down) now how if he select any one report I need to display the preview in that same form how to show ?

preguntado el 12 de febrero de 14 a las 08:02

2 Respuestas

Prueba esto:

Use PrintControl to show your report in the form as i am doing..:

PrintControl control = new PrintControl();
SomeForm.Controls.Add(control);

/// Put this code to show report in Printcontrol at SomeForm
public void SetReport(XtraReport report)
{
            if (report != null)
            {
                control.PrintingSystem = report.PrintingSystem;
                SetupButtonVisability();
                report.CreateDocument();
                report.RecreateDocumentMap();                
                control.PrintingSystem = report.PrintingSystem;              
            }
}

Another way you can populate print view using the below documentation link too:
How to: Invoke a Report's Print Preview

   XtraReport1 report = new XtraReport1();

    using (ReportPrintTool printTool = new ReportPrintTool(report)) {
        // Invoke the Print Preview form modally, 
        // and load the report document into it.
        printTool.ShowPreviewDialog();

        // Invoke the Print Preview form
        // with the specified look and feel setting.
        printTool.ShowPreview(UserLookAndFeel.Default);
    }

Respondido 12 Feb 14, 14:02

How to remove or hide main menu and tool bar from that preview ? - Srihari

You need to use documentviewer control of devexpress for same.

Pass selected report object to document viewer.

Follow below tutorial

http://documentation.devexpress.com/#xtrareports/CustomDocument2668

Respondido 12 Feb 14, 09:02

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.