From: Alexander S.K. <al...@be...> - 2004-12-08 11:39:30
|
Hello All, As it is written in the Changelog, the Designer now is able to create/modify reports. To do this, it should be called with -r switch. I shall not develop the Hwreport anymore, Designer becomes the main report builder now. It has more modern and advanced engine than Hwreport and, what is important, it is more easy to support one engine than two different :). The important point is that now the report builder may be integrated into the application and it is convenient, IMO, that the same code, the same module, linked into the application, implements two tasks - works with input forms and with reports. The compatibility with the *.rpt files, created with Hwreport, is implemented via the plugin ( resource/r_text.prg ) - you may open rpt files, choosing the 'plain text format' and then save them in a new format, which is exactly the same as for input forms. The new report engine uses a bit different approach than the old one. There are no 'markers' - the widget 'area' is used instead. I didn't provide examples yet, but you can convert any rpt file into the new format and you will see how these 'areas' are used. The 'area' has two main properties: - AreaType - it may be Table, DocHeader, DocFooter, PageHeader, PageFooter. The Table is the same as the space between 'Start line' and 'End line' markers in the old engine. - VarOffset - False/True, it determines, if the area position on the paper is fixed ( False ), or it depends on the size of previous area ( True ). The areas may be nested - I didn't check yet, does it work, but it should. Few notes about the methods. The report itself has two methods: - onRepInit, which is executed when the report starts - onRepExit. Every print item ( Label, Box, Vline, HLine, Bitmap ) has three methods: - onBegin - it is executed before the item is being printed - Condition - it must return a logical value ( with the 'Return' statement ), which determines, should this item be printed or no. - onExit - it is executed after the item is being printed The 'Label' item has additionally a method 'Expression', which calculates a string, which should be printed. The 'area' has additionally a method 'onNextLine', which is executed for the each line in a 'Table' area - it is the same as script for the 'End Line' marker in an old report engine. Regards, Alexander http://kresin.belgorod.su |