RB 11 contains a new PaintBox component and enhancemts to most of the existing report components - driven by customer feedback.
Use the new HyperLink and HyperLinkColor properties to display hyperlinked text in the Viewer, PDF, and Web Viewer. Hyperlink items are hot clickable - web and email addresses are supported. The Label.Caption property can auto-detect web and email addresses.
Use the new Paintbox component to draw directly to a canvas. The Draw commands are internally stored as a metafile that can be rendered to Screen and Printer. The RB 11 PDF Device can convert metafiles to native PDF graphics resulting in high quality PDF rendering of paintbox content.
Use the OnPrint event to access the PaintBox.Canvas and draw text, lines, images, etc.
Note: The PaintBox to supports drawing to the canvas from both Delphi code and RAP code.
Example:
myPaintBox.Canvas.Font.Name := 'Times New Roman'; myPaintBox.Canvas.Font.Size := 10; myPaintBox.Canvas.TextOut(2, 2, 'Hello Paintbox!');
Use the new SummarBand.AlignToBottom property to control whether the summary band prints at the bottom of the band, like a footer. When the FooterBand.Visible and PrintOnLastPage are true, setting AlignToBottom to true, results in the summary appearing just above the footer. Otherwise, when no footer is present, the summary will apear at the bottom of the page.
Use the new SystemVariable options to automatically display the AutoSearch Description on your reports or to print Copy information. The following new options are available.
| Value | Meaning |
| vtCopyNo | Current copy number (when printing mulitple copies to the printer). Note: This text will not print with the original document. The text will print with the first and subsequent copies of the report. |
| vtCopyNoDesc | Textual summary of the current copy number ('Copy: 1'). Note: This text will not print with the original document. The text will print with the first and subsequent copies of the report. |
| vtSearchDesc | Textual description of the search conditions definied with report autosearch fields. |
The Image component has new AlignHorizontal and AlignVertical options to control the horizontal and vertical positing of the image.
The Line component has new support for diagonal lines.
The BarCode and 2DBarCode components have a new AlignBarCode property for controlling the horizontal position of the barcode.
RichText contains several new enhancements, including support for FullJustication, LeftMargin, Transparent, and default Font. MailMerge support has been extended to include DBRichText.
Use either the built-in RichText Editor or the RichText.Paragraph property to control
paragraph formatting for alignment, indentation, numbering, and tabs. To format a paragraph for full justification, select the paragraph in the editor and use the format toolbar. Or programmatically use the RichText.Paragraph property
uses ppTypes, ppRichTx; begin // set paragraph text alignment to full justifieds myRichText.Paragraph.TextAlignment := taFullJustified; end;
Use the LeftMargin property to specifies an inner margin for rendering the text inside the left edge of the control. This is in addition to any paragraph formatting embedded in the rtf data.New RichText controls have a default LeftMargin property of 0, while RichText controls created with prior RB versions will default to 1/32 inch for backward compatibility.
RichText can be rendered to the printer with support for transparency.
RichText can be rendered to PDF with full quality.
Set RichText.Font to control the default font used for the control.
The RichText Editor has new support for updating the format toolbar to reflect the the common formatting properties of the selected text - also known as the 'consistent attributes'.
This event fires after a FileDevice has been created. You can access the FileDevice via the FileDevice property. You can typecast the FileDevice and to configure its properties. Example:
Example:
uses
ppPDFDevice;
var
lPDFDevice: TppPDEFDevice;
begin
if (myReport.FileDevice is TppPDFDevice) then
begin
lPDFDevice := TppPDFDevice(myReport.FileDevice);
// add code here to configure PDFDevice properties...
end;
end; This event fires after a PrinterDevice has been created. You can access the PrinterDevice via the PrinterDevice property.
The PrinterDevice fires this event while sending pages to the printer. One use of this event is to enable printer escape codes to be sent directly to the printer.
The Report.PrinterDevice is created when sending pages to a printer. The aDeviceState parameter is of type TppDeviceStateType - an enumerated type declared in the ppTypes unit.
| DeviceState | Timing |
| dsBeforeStartJob | Before print job starts |
| dsAfterStartJob | After print job starts |
| dsBeforeStartPage | Before page starts |
| dsAfterStartPage | After page starts |
| dsBeforeEndPage | Before page ends |
| dsAfterEndPage | After page ends |
| dsBeforeEndJob | Before print job ends |
| dsAfterEndJob | After print job ends |
| dsBeforeDrawCommand | Before a draw command is rendered |
| dsAfterDrawCommand | After a draw command is rendered |
Example:
uses
ppTypes;
procedure Form1.ppReport1OnPrinterDeviceStateChange(Sender: TObject; aStateChange:
TppDeviceStateChangeType);
begin
if (aStateChange = dsAfterStartPage) then
ppReport1.SendEscape('some escape code here');
end;