Hi there! I have just written a generic printing routine to print selected lines of a dbgrid using a default layout to use in my apps where a specific layout is not needed. For that I use the TPrinter object.
My objective is to port a big app in Delphi to Lazarus but it has many QuickReports so I am replacing such code with this routine where the layout is not an issue. I am attaching the full source code in a text file (PrintLib.pas, 530 loc) in case it is useful to someone. To use it just call the procedure bellow: procedure PrintSelected(aTitle: string; aDBGrid: TDBGrid; aLogoImage: TImage); The Title is a string to be printed on left top corner of each page. The DBGrid is assumed to have Multiselect in Options, all selected lines will be printed. The TImage is for a logo or something alike and is printed on right top corner of each page. I am not using LazReport yet because I need the app running in Delphi for a while. I plan to use it for the more complex reports. I just have a question if someone could give me a hint on how to make a form preview of such printing that could be easyly ported to Lazarus. Wich object shoud I use for this purpose? Please ignore this message if it is off-topic. Thanks in advance. []'s, Ed.
PrintLib.pas
Description: Binary data
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
