Page 1 of 1
Printersettings
Posted: Tue May 22, 2012 8:51 am
by vorauler
Hi
I create my report's with this code to view it in the preview window.
Code: Select all
StiReport report = new StiReport();
report.Load(printOptions.ReportFile);
report.PrinterSettings.ShowDialog = true;
report.Compile();
StiOptions.Dictionary.BusinessObjects.MaxLevel = 3;
report.RegData(printOptions.DataSourceName, printOptions.DataSource);
report.Render();
report.ShowWithRibbonGUI();
When I now change some properties of the printer settings like color / black-white or tray, these changes will not affected by the report.
The report is always printed with the default printer settings.
What do I wrong?
TIA
Ralf
Printersettings
Posted: Tue May 22, 2012 10:56 am
by HighAley
Hello.
vorauler wrote:I create my report's with this code to view it in the preview window.
Code: Select all
StiReport report = new StiReport();
report.Load(printOptions.ReportFile);
report.PrinterSettings.ShowDialog = true;
report.Compile();
StiOptions.Dictionary.BusinessObjects.MaxLevel = 3;
report.RegData(printOptions.DataSourceName, printOptions.DataSource);
report.Render();
report.ShowWithRibbonGUI();
When I now change some properties of the printer settings like color / black-white or tray, these changes will not affected by the report.
The report is always printed with the default printer settings.
What do I wrong?
Please, try to use RegData method before Compile method.
Thank you.
Printersettings
Posted: Thu May 24, 2012 8:21 am
by vorauler
Hello
I think I have explained my problem not correctly. Take a look at this picture:
http://sdrv.ms/JLhZ7M
My steps are:
- Create the report and preview it
- Click the Print-Button in the preview dialog
- Then click printer settings
- Change for example the color from color to black/white
And now these changes are not affected by the report, the report is always printed with the default printer settings.
TIA Ralf
Printersettings
Posted: Fri May 25, 2012 3:29 am
by HighAley
Hello.
vorauler wrote:I think I have explained my problem not correctly. Take a look at this picture:
http://sdrv.ms/JLhZ7M
My steps are:
- Create the report and preview it
- Click the Print-Button in the preview dialog
- Then click printer settings
- Change for example the color from color to black/white
And now these changes are not affected by the report, the report is always printed with the default printer settings.
PaperSize and PaperSource could be set for each page, so they are set in the report parameters.
If you want to use settings from printer dialog then you should set one of next properties:
Code: Select all
StiOptions.Print.UsePaperSizeAndSourceFromPrintDialogIfTheyChanged = true;
StiOptions.Print.UsePaperSizeAndSourceFromPrintDialogAlways = true;
If you use any specific printer setttings then try to set next property:
Code: Select all
StiOptions.Print.UsePrinterSettingsEntirely = true;
Thank you.