###################################################################### # # # Product: GPQRHtmlFilter Component # # For Delphi & - TGPQRHtmlFilter and additional # # C++ Builder QRControls # # # # # # Version: 2.7.1 # # Author: Girish Patil # # E-mail: GPatil@vsnl.com # # # # Readme Date: December 30, 1999 # # # ###################################################################### CONTENTS =============================== 1. Files in ZIP 2. Installation 3. Usage Guide & Tips 4. Pricing, Ordering & Feedback 1. Files in ZIP =============== - GPQRHtmPack.BPL Main component package library - GPQRHtmPack.DCP Compiled package file - GPQrCtrls.DCU Additional QR controls compiled unit - GPQRHtml.DCU Main component compiled unit - GPQRHtmlAbout.DCU About dialog compiled unit - License.TXT Terms & agreement - OrderFrm.TXT Information for non-Internet based ordering - Readme.TXT Information & usage help - History.TXT Chronology of revisions & enhancements Additional sample files in the "Sample" folder - GPQRDemo.DPR Load and run this project in Delphi - GPQRDemo.RES to get a quick feel of GPQRHtmlFilter's - Main.DFM ability to export QR reports to - Main.PAS HTML. There are 2 sets of the BPL, DCP & DCUs. One in the D4 folder and the other in D5. 2. Installation =============== NOTE: 1. Uninstall any older versions of the software from the IDE and remove the old path from Library Path on the Library page of Tools|Environment Options... 2. GPQRHtmPack was compiled using QR 3.0.5. Make sure you have installed this version of QuickReport first. 3. GPQRHtmPack requires the following packages: Delphi 4 & - VCL40, VCLDB40, VCLJPG40, QRPT40, TEEDB44, TEE44 & CBuilder 4 TeeQR44. Delphi 5 - VCL50, VCLDB50, VCLJPG50, QRPT50, TEEDB45, TEE45 & TEEQR45. Make sure they are installed into the IDE before proceeding. Get QR: http://www.qusoft.com Get TEE: http://www.teemach.com After you have unzipped the contents of GPQRHtml.ZIP to a folder of its own (Referred to below as GPQRHtml_DIR): - Run Delphi/CBuilder - Close all projects (recommended) - Choose Component|Install Packages... from the menu - Click Add... - Look in: GPQRHtml_DIR\D4 folder for Delphi 4 & CBuilder 4 GPQRHtml_DIR\D5 folder for Delphi 5 - Select GPQRHtmPack.BPL & Click Open The GPQRHtmPack Package should appear in the list of Design packages. Look for "Enhanced HTML Filter for Quick Report" - Click OK You should find the new GP Controls & GPQRHtmlFilter components on the "GPQReport" page of the Component Palette - Make sure GPQRHtml_DIR is included in the Library Path. To do this Choose Tools|Environment Options... and open the Library page. You are now ready to use the component in your applications. 3. Usage Guide ============== Two ways to using the GPQRHtmlFilter ------------------------------------ - Drop the GPQRHtmlFilter component on the form that contains the QuickRep component (or the MainForm or the form that calls all reports). When you preview the report select the "HTML Document [New]" Save-as-type, give a file name and click Save. You will find a good HTML representation of your report in that file. - Using the QuickRep.ExportToFilter method and saving the HTML file programmatically: - You do not have to drop a GPQRHtmlFilter component on the report form. - Include "GPQRHtml" under "uses". - Use a code snippet as below procedure TForm1.SaveBtnClick(Sender: TObject); var AFilter: TGPQRHTMLDoc; begin AFilter := TGPQRHTMLDoc.Create('Path\ReportName.HTM'); try QuickRep.Prepare; QuickRep.ExportToFilter(AFilter); finally QuickRep.QRPrinter.Free; QuickRep.QRPrinter := nil; AFilter.Free; end; end; --------- Exporting simple line and box shapes ------------------------------------ Just use the GPQRLine component instead of the QRShape component. The GPQRLine component implements only the line shapes [qrsRectangle, qrsVertLine, qrsHorLine, qrsTopAndBottom, qrsRightAndLeft], all except qrsCircle. IT IS STRONGLY RECOMMENDED that you use GPQRLine for line drawing, since it exports WITHOUT creating a separate image file (?.JPG), as does the GPQRShape component. Exporting more graphic shapes, images and charts ------------------------------------------------ Just use the GPQRShape, GPQRImage, GPQRDBImage and GPQRChart components instead of the QRShape, QRImage, QRDBImage and QRChart components. The new components do nothing different from the original components, except sending a message to the ExportFilter after making sure they are talking to the right one. Image file name = + '_I' + + E.g.: Sample_I265.JPG SerialNumber is zero based. It starts at ZERO. You can get a list of the names of image files, that were created during the export: use "ImageFileNames", a global TStringList object, declared in GPQRHtml.PAS. If you just need the count of image files created use "ImageCount", a global Integer variable. You would need to add 1, since the first image file uses the SerialNumber "0" (ImageCount + 1). Additional Properties of GPQRShape, GPQRImage, GPQRDBImage and GPQRChart ------------------------------------------------------------------------ ExportAsJpeg: Boolean default True Set to True for the image files to be saved in JPEG format. Setting False saves the files in BMP format. ExportJpegQuality: TJPEGQualityRange default 100 Set a value between 1..100, depending on your need of quality and image file size. 1 = Smallest file size, 100 = Best quality. ExportUsingSingleImage: Boolean default True [False for DBImage & Chart] Ideally, for the Shape and Image components, it should remain as True. GPQRHtmlFilter maintains a list of image files it creates, with object information. Setting the property to True ensures that only one file is created, for the object, and the same is encoded into the HTML for each of its (the object's) occurrences. HtmlAltText: string Enter text that the browser should show within the area of the image, when the image file cannot be located. Browsers also show the same text as ToolTip for the image. It's good practice to set this property. Additional Events of GPQRShape, GPQRImage, GPQRDBImage and GPQRChart -------------------------------------------------------------------- TCreateImageEvent = procedure(Sender: TQRPrintable; var NewImageFileName: string) of object OnCreateImage: TCreateImageEvent Program this event to change any of the object's properties, before it shows, prints or exports. The changes you make to the object will reflect in the preview also. For example, you can use a GPQRImage's OnCreateImage to represent a Boolean value. For the purpose of clean and smooth HTML exporting of such run-time changed objects, the event contains the variable NewImageFileName. The example uses a GPQRImage to represent a Boolean value: (you can find another similar example in the demo project) procedure TForm1.GPQRImageCreateImage(Sender: TQRPrintable; var NewImageFileName: String); begin with Sender as TGPQRImage do if Table1BoolField.Value then begin Picture.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Check.Bmp'); NewImageFileName := 'Checked'; // WITHOUT file extension end else begin Picture.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'UnCheck.Bmp'); NewImageFileName := 'UnChecked'; // WITHOUT file extension end; end; ---------- Even for giving an image file name of your choice set the property ExportUsingSingleImage to True, otherwise the file will be re-created every time the object prints. NOTE: The file extension is determined from the value of property ExportAsJpeg. Do NOT include the file extension when setting NewImageFileName. You can use the OnCreateImage event for objects (Shape/Image/?) that need to represent more than two states also. There's no limit, other than ones imagination! Additional Events of GPQRLine ----------------------------- OnPrint: TNotifyEvent Write an event handler for this event to change any properties of the GPQRLine component, before it prints. Framing and CLEAN rectangular shading of text & band objects ------------------------------------------------------------ All you need to do is use the additional GP QR controls provided with version 2.5+. These new controls pass the frame and shade data to the GPQRHtmlFilter. Usage Tips ---------- - All programmed events of a report are invoked again for every save/print/export operation. Make sure you initialize all variables/counters in the "BeforePrint" event of the report. - For Shading and Framing of objects (text, graphic & band) just make sure you've used the supplied GP QR controls. - Consider using GPQRLine instead of GPQRShape for line drawing. - Quickly changing from old QR controls to new GP QR controls: 1. Right-click on the report form and select "View as Text". 2. Search for the old QR control classes (TQRDBText, TQRDBImage...) and replace with the appropriate new GP QR control classes (TGPQRDBText, TGPQRDBImage..). 3. Right-click in the edit window and select "View as Form". 4. Save the Form and click "Yes", when the IDE prompts you for correcting declarations. 4. Pricing, Ordering & Feedback =============================== Pricing ------- There are 4 editions of the product: 1. Trial Edition - US$ 0. Which saves a maximum of 3 pages, is only for use in the IDE. 2. Basic Edition - US$ 24. You can use this edition in applications that you distribute (deploy). 3. Professional Edition - US$ 37. Basic Edition + complete source code of the component. 4. Professional Site License - US$ 64. Professional(s) with a conscience! Professional Edition that can be used on any number of computers at a single work site. I'll be happy to know GPQRHtmlFilter is being used in larger organizations! Please read and understand the accompanying licensing document in "License.Txt". Ordering -------- You can order GPQRHtmlFilter online over the Internet at http://shareit1.element5.com/programs.html?productid=107003. Alternatively, you can go to http://www.shareit.com and enter the PROGRAM NUMBER: 107003. If you do not wish to order over the Internet, you have the option of doing it via phone, fax or postal mail. Please open the file "OrderFrm.TXT" for details. Once you make the payment in your preferred mode: - ShareIt! will send me an email notification, with YOUR EMAIL address. - Within 48 hours you will receive your appropriate deployment edition by email -- your email should be working, of course. MAKE SURE you give your email at the time of ordering. Feedback -------- Write-in to GPatil@vsnl.com - Suggest enhancements for the up-coming new release. - Put forth what you wish you had in the component. - Report bugs. - Any other feedback that you think is relevant.