تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[كود] كود طباعة XtraReport دون عرض التقرير
#1
كود :
[C#]
MyReport report = new MyReport();

//Set the data source
report.DataSource = MyReportDataSource;

//Set any parameters in your report
report.Parameters["ParameterName"].Value = ParameterValue;
report.Parameters["ParameterName2"].Value = ParameterValue2;

//Create the report document
report.CreateDocument();

//Print the report document
report.Print();

كود :
[VB.NET]
Imports DevExpress.XtraReports.UI
Imports System.IO
Imports DevExpress.XtraPrinting
Imports System.Data
Imports System.Drawing

Partial Class TPV_Tickets
   Inherits System.Web.UI.Page
   Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
       Dim Report As New TicketTPV

      ' THIS IS TO TAKE THE DEFAULT LOCAL PRINT
       Dim instance As New Printing.PrinterSettings
       Dim DefaultPrinter As String = instance.PrinterName

       ' THIS IS TO PRINT THE REPORT
       Report.PrinterName = DefaultPrinter
       Report.CreateDocument()
       Report.PrintingSystem.ShowMarginsWarning = False
       Report.Print()

   End Sub
End Class
الرد }}}



التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم