In report form there are some troubles with applying printer settings
- page orientation in the first. I has try number ways to resolve:
1. both OnApplyPrinterSettings and OnGetPrinterSettings
TPrinterSettings *settings = dynamic_cast<TPrinterSettings *>
( Sender );
QReport->QRPrinter->aPrinterSettings = settings;
QReport->QRPrinter->aPrinterSettings->ApplySettings();
2. calling some "magic" method to repaint report:
//this->Update();
//this->QReport->Repaint();
//this->QReport->Refresh();
//this->QReport->Paint();
//this->QReport->Modify();
//this->QReport->Print();
//this->QReport->Free();
//this->QReport->Preview();
or
//preview->Repaint();
//preview->UpdateImage();
//preview->PreviewImage->Paint();
3. only this code help my, but result doesn't satisfy 100%
TQRPreview *preview = dynamic_cast<TQRPreview *>(this->QReport-
>QRPrinter->Client);
preview->UpdateZoom();
Have anybody the same troubles?