hi,
' 1. Create Report object
Dim reportObj As New Report()
' aplly header template
'reportObj.PageHeaderTemplate = TryCast(Me.Resources("PagePresenterHeaderTemplate"), DataTemplate)
reportObj.PageHeaderTemplate = m_HeaderTemplate
'apply footer template
reportObj.PageFooterTemplate = m_FooterTemplate
' apply header content. In our case palin text
'reportObj.PageHeader = txtHeader
'' apply footer content. In our case palin text
'reportObj.PageFooter = txtFooter1
reportObj.ReportSettings.Margin = New Thickness(50, 0, 50, 0)
reportObj.ReportSettings.PageOrientation = Infragistics.Windows.Reporting.PageOrientation.Landscape
reportObj.ReportSettings.FileName = m_ReportTitle
' 2. Create EmbeddedVisualReportSection section.
' Put the grid you want to print as a parameter of section's constructor
Dim section As New EmbeddedVisualReportSection(m_Grid)
' set scale mode
reportObj.ReportSettings.HorizontalPaginationMode = HorizontalPaginationMode.Scale
reportObj.ReportSettings.PagePrintOrder = PagePrintOrder.Horizontal
'' 3. Add created section to report's section collection
reportObj.Sections.Add(section)
'' 4. Call print method
'reportObj.Print(True, False)
Dim pt As New PrintTicket
pt.PageOrientation = Printing.PageOrientation.Landscape
Dim pq As PrintQueue = LocalPrintServer.GetDefaultPrintQueue()
pq.UserPrintTicket = pt
Dim pd As New PrintDialog()
pd.PrintTicket = pt
pd.PrintQueue = pq
pd.PrintQueue.UserPrintTicket = pd.PrintTicket
reportObj.ReportSettings.PrintQueue = pd.PrintQueue
reportObj.Print(True, False)
please tell me why it always print in portrait
thanx
I know there was a bug fixed relating to this. As part of that fix we added a public read-only property to Report named PageSizeResolved. If the version you are using doesn't have this property then I would recommend downloading the latest service release.
If you are still having the problem I would submit a request to support here: http://es.infragistics.com/support/submitrequest.aspx