Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Frage

Wie kann ich für einen Report den Druckerschacht bestimmen?

Antwort

Die Schachtsteuerung kann im Report Manager über Scripts gesteuert werden. Das folgende Script ist eine Vorlage und muss entsprechend angepasst werden:

Code Block
languagec#
linenumberstrue
using System;
using System.Windows.Forms;
using System.Drawing.Printing;
using DevExpress.XtraPrinting;
using DevExpress.Utils;

private void reportControlDX1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
  var report = (XtraReport) sender;
  report.PrintingSystem.StartPrint += new DevExpress.XtraPrinting.PrintDocumentEventHandler(PrintingSystem_StartPrint);
}

private void PrintingSystem_StartPrint(object sender, PrintDocumentEventArgs e) {
  // MessageBox.Show(e.PrintDocument.PrinterSettings.PaperSources[1].SourceName);
  e.PrintDocument.DefaultPageSettings.PaperSource = e.PrintDocument.PrinterSettings.PaperSources[1];
}
 

Verwandte Artikel

Filter by label (Content by label)
showLabelsfalse
max5100
spacesDaylightDoc
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-reporting" and type = "page" and space = "DaylightDoc"
labelsreport

...