Today we will look at migration from QuickReport 6 to FastReport VCL.
Let's do it with the updated Converter included in FastReport VCL, it allows you to convert your template, even without QuickReport 6 installed on your computer.
Converter (ConverterQR2FR.pas) has the following list of convertible components from QuickReport 6 to FastReport VCL, it is presented in the table below.
QuickReport 6 |
FastReport VCL |
Done |
QuickReport 6 |
FastReport VCL |
Done |
TQuickRep |
TfrxReportPage |
+ |
TQRLineGraph |
TfrxChartView |
+ |
TQRPreviewController |
- |
- |
TQRGrImage |
TfrxPictureView KeepAspectRatio:= true |
+ + |
TQuickAbstractRep |
- |
- |
TQRPDFShape |
- |
- |
TQRSubDetail TQRBand TQRGroup |
TfrxBand |
+ |
TQRFrameline |
TfrxLineView |
+ |
TQRWildBand |
- |
- |
TQRAbsTable |
- |
- |
TQRChildBand |
TfrxChild |
+ |
TQRDBJPGlmage |
TfrxPictureView |
+ |
TQRLoopBand |
TfrxMasterData.RowCount |
+ |
TQRPQuickrep |
TfrxReportPage |
+ |
TQRStringsBand |
- |
- |
TQRPBand |
TfrxBand |
+ |
TQRLabel TQRDBText TQRExpr TQRSysData TQRMemo TQRExprMemo |
TfrxMemoView |
+ |
TQRPChildBand |
TfrxChild |
+ |
TQRGraphicCanvas |
TfrxPictureView |
+ |
TQRPLabel |
TfrxMemoView |
+ |
TQRMetriclabel |
- |
- |
TQRPDBText |
TfrxMemoView |
+ |
TQRHTMLLabel |
Memo allowHTMLTegs = true |
+ |
TQRPDBlmage |
TfrxPictureView |
+ |
TQRDMBarcode TQRDbDMBarcode |
TfrxBarcode2DView BarType := bcCodeDataMatrix |
+ + |
TQRPExpr |
TfrxMemoView |
+ |
TQRQRBarcode |
TfrxBarcode2DView |
+ |
TQRPMemo |
TfrxMemoView |
+ |
TQRQRDBBarcode |
TfrxBarcode2DView |
+ |
TQRPRichtext |
TfrxRichView |
+ |
TQRRichText |
TfrxRichView |
+ |
TQRPGrid |
- |
- |
TQRShape |
TfrxShapeView |
+ |
TQRPCheckBox |
- |
- |
TQRlmage TQRDBlmage |
TfrxPictureView |
+ |
TQRPShape |
TfrxShapeView |
+ |
TQRCompositeReport |
- |
- |
TQRPExprCheckbox |
- |
- |
TQRXMLSSFilter |
- |
- |
TQRStringgridReport |
- |
- |
TQRPreview |
- |
- |
TQRGridReport |
- |
- |
TQRColorBox |
- |
- |
TEnhancedlistbox |
- |
- |
TQRExpBarChart |
- |
- |
|
|
|
The conversion from QuickReport 6 to FastReport VCL.
Select Delphi form of the *.dfm format, in which you can find TQuickRep object, in which the report we need is constructed. Or select report template of the QuickReport 6 designer in *.qr2 format.
Will make a simple converter consisting of a form, a pair of components and one button.
Perform the following list of actions:
1. Create a new application (File -> New -> VCL Forms Application).
2. Enter in Uses clause ConverterQR2FR.
3. Depending on the installed components, you may need to remove the following blocks from the Uses clause in ConverterQR2FR.pas:
VCLTee.TeeProcs, VCLTee.TeEngine, VCLTee.Chart, VCLTee.Series, VCLTee.TeCanvas
frxChart, frxBDEComponents, frxIBXComponents
4. Drop the following components to the form:
5. Place this code in the OnClick event of the button:
Code:
1 2 3 4 5 6 7 8 9 |
procedure TForm1.Button1Click(Sender: TObject); begin if OpenDialog1.Execute then if frxReport1.LoadFromFile(OpenDialog1.FileName) then if SaveDialog1.Execute then frxReport1.SaveToFile(SaveDialog1.FileName); frxReport1.LoadFromFile(SaveDialog1.FileName); frxReport1.DesignReport(); end |
6. Run the application.
If you did everything correctly, the application will start, and you will need to click a button on the form.
Then a dialog box for opening a file will appear, open the required Delphi form of the *.dfm format, containing the TQuickRep object, or a report template for the QuickReport 6 designer in the *.qr2 format.
Then your template will be converted, if this was completed successfully, a dialog box for saving the template will appear in front of you, save it in *.fr3 format.
This converted template will automatically be opened in the FastReport VCL designer, but make sure that the conversion was correct.
If a DataSet was attached to your template, you will need to attach it to the FastReport VCL template to display the data correctly when building the report.
Below, using the screenshots example, we will consider a specific conversion of the Delphi form of the *.dfm format, which contains the TQuickRep object into the FastReport VCL report template.
For example, let's build a QR template on the form invform.dfm.
We connect DataSet to it through ADOConnection1, DataSource1 and Table1.
Follow these steps:
1. Let's run our simple Converter.