=====================================
= RichView Controls for QuickReport =
=====================================
About
=====
QRRichview / QRDBRichview are components for printing RichView documents with QuickReport.
Copyright (c) 2005-2011 Henk van Bokhorst / IVS Systemhouse B.V. and QBS Software. All rights reserved.
Website (TRichView and this component): www.trichview.com
Website (QuickReport): www.quickreport.co.uk
E-mail (regarding this component): qrrvwrapper@xs4all.nl
Website of my company (dutch, does not contain information about this component): www.ivs-systemhouse.nl
These components are freely distributable in source form provided all copyrights and acknowledgements remain intact. The author would also appreciate receiving notification of all changes, improvements or additions made to these components.
If you like these components, you can show me your appreciation by sending me a postcard of your town / country with a nice stamp. You can send it to:
Henk van Bokhorst
Ibislaan 2
NL-3871 TA Hoevelaken
The Netherlands
These components are developed and tested using Delphi 7, Delphi 2007 and Delphi 2010 in combination with QuickReport 4 and 5 (Professional). It should be compatible with QuickReport 3.6 Professional. It seems not to be compatible with older versions / standard versions of QuickReport, but maybe you can make it compatible. I don't know if it is compatible with other versions of C++ builder or Delphi. And of course you will need RichView...
[Update by Sergey Tkachenko]: This wrapper is also compatible with Quickreport 6.
Installation
============
[Update by Sergey Tkachenko]: the original text of this chapter was removed.
Since December 2018, these controls are included in the main TRichView setup, and they are installed automatically if Quickreport 6 is already installed.
If you need to support older versions of Quickreport, let me know.
Usage
=====
Create a new QuickReport and drop a QR(DB)RichView component on it. For QRRichview, use one of the Load* methods (see below) to load the data you want to print or use the Text property. For QRDBRichview, assign the DataSet and DataField property to the correct set / field. That's it!
You can also check the demo applications.
Note: The component renders the data as a metafile before printing. When printing directly this gives excellent results, since the metafile is rendered using the printer resolution. However, when you use the preview, the metafile is rendered using the screen resolution. When you print from within the preview, the document is not rendered again, so the quality (although still acceptable) is not optimal. This is by the way a common 'feature' of QuickReport 4.
Properties
==========
The following properties are available (apart from the standard QRPrintable properties).
AutoPages (default True) and AutoStretch (default True): AutoStretch does exactly what you would expect using QuickReport: It stretches the band to fit the complete document (which can of course result in getting more than one page). AutoPages can be used if you don't want to use AutoStretch, but you want to print the report completely, creating more pages if necessary. In this case, you decide the exact dimensions of the QRRichView component on the QuickReport (the component and band are not stretched). If this space is not big enough to hold the document, a new page follows with on the same location and with the same dimensions the next part of the document etc, until the full document is printed. If AutoStretch is True, AutoPages is automatically set to True, since of course enough pages are created to hold the component). If AutoPages and AutoStretch are both False, only that part of the document is printed that fits.
ColorMode (default rvcmPrinterColor): Derived from TCustomRVPrint, possible values:
- rvcmColor: Color output.
- rvcmPrinterColor: Color output, but clWindow is changed to clWhite, clWindowText is changed to clBlack.
- rvcmGrayScale: Colors are converted to shades of gray.
- rvcmBlackAndWhite: Paragraph background is not printed; text is printed black on white or white on black depending on what is darker.
- rvcmBlackOnWhite: Paragraph background is not printed; text is printed black on white.
TransparentBackground (default False): Derived from TCustomRVPrint; If set to True, background will not be printed.
NoMargins (default False): When True, the (top, left, right, bottom) margins of your document are ignored, so it fits the component completely. This makes it easy to align it with other QuickReport components.
DataSet / DataField (only for QRDBRichview): To assign the table / field which contains the RVF or RTF data (the component supports these two formats).
Text (only for QRRichview): Here you can (in design-time) load a RVF or RTF file, which is then stored into the form. Of course, this is not the preferred method for large documents, since it will bloat your application.
Methods
=======
The following methods are available for QRRichview (apart from the standard QRPrintable methods).
function LoadRVFFile(FileName: string): boolean. To load a file that has the RichView Format. True if function succeeds.
function LoadRTFFile(FileName: string): boolean. To load a file that has the Rich Text Format. True if function succeeds.
function LoadRVFStream(Stream: TStream): boolean. To load a stream that contains text in the RichView Tormat. True if function succeeds.
function LoadRTFStream(Stream: TStream): boolean. To load a stream that contains text in the Rich Text Format. True if function succeeds.
QRDesign
========
Note: I did not test or check the QRDesign units, they are created and tested by QBS Software. You can find them in the QRDesign folder.
They gave the following instructions to use the components with QRDesign.
1. Build a QRDesign application or use an exiting one.
2. Add qrd3rdpartycontrol_TRichView to the 'uses' clause of the main form.
3. Add qrd3rdpartycontrol_TRichView.pas to the project.
4. Build the project.
The wrapper will require the source of TRichView and RVQRCtrls.pas to be available, so add the directory of this source to the project search path ( Project / Options menu, Directories&Conditionals tab).
That is all that is required, and the QRRichView will appear on the QRDesign editor toolbar.
To install the DB version add 'qrd3rdpartycontrol_TDBRichView' to the project and repeat these steps.
History
=======
Version 1.00 (2005/06/17)
- First release
Version 1.01 (2005/07/22)
- Made compatible with QuickReport 3.6 and higher (thanks to Eike Hoffmann)
- Included CB6 package and demo (thanks to / made by Eike Hoffmann)
- Bug solved: When the text was divided over several pages, and on the first page there were other components printed before the QRRichView, the top of the QRRichView on subsequent pages was too low.
- Bug solved: The component did not take the non-printable area of a printer into account, therefore the RichView text was printed too far to the right and bottom on most printers, and did therefore not align with other QuickReport components.
Version 1.02 (2005/07/26)
- Bug solved: When you only wanted to print a subrange, not starting with page 1, the text appeared too small on the paper.
Version 1.03 (2005/07/27)
- Bug solved: It was remarkable that on most occasions the last page was printed correctly...
Version 1.04 (2005/07/29)
- Bug solved: Images, lines etc. weren't scaled correctly on the print.
- You can now print to all kinds of printers, no 'out of memory'-errors any more when using postscript printers / faxes etc.
Version 1.05 (2005/08/17)
- Bug solved: Sometimes the last line was not printed completely (thanks to Sergey Tkachenko).
Version 1.06 (2006/02/11)
- Included Delphi 2006 package and demo (thanks to / made by Ralf B�hler).
Version 2.00 (2007/09
评论1
最新资源