Report
The DotHRB Report is a class for creating structured documents like invoices, bills, and orders.
This component is in an incubation phase. There are currently no guarantees of further development or a final release. Continued progress is strictly contingent on significant community interest and feedback.
It currently utilizes a band-based architecture (e.g., Title, Header, Section, Body, Footer, Summary) for flexible layout definition and data segmentation.
The class is designed to offer comprehensive rendering capabilities, including the precise placement of complex graphic elements (such as images, drawing lines, bounding boxes, and filled areas), to ensure professional, print-ready output. The foundational code for this functionality is present, but achieving the full, advanced feature set is the project's future objective.
Generated reports can be exported to a wide range of common formats:
PDF (Print-ready output)
XLSX (Spreadsheet data)
DOCX (Editable document)
CSV (Plain data export)
#include "dothrb.ch"
#include "dotrpt.ch"
function MyReport()
...
REPORT ;
STARTPAGE to 1 ;
LAYOUT to MyReportLayout() ;
HEADER to MyReportHeader() ;
SECTION to MyReportSection() ;
FOOTER to MyReportFooter() ;
...
REPORT PRINT HEADER
REPORT PRINT FIRST SECTION ...
while ...
REPORT SKIPLINE 1
@ PCOL 000 say value1 picture "@ZE 999"
@ PCOL 003 say value2
...
dbskip() ...
end while
REPORT EJECTPAGE LAST
...
return nil
function MyReportLayout()
example of commands that can be used in layouts:
...
PRINT
SETFONT
GOTOXY
IMAGE
BARCODE
VLINE
HLINE
BOX
HALFBOX
FILL
...
example of commands:
@ PCOL ... SAY ... [PICTURE ...] [XLS [ VALUE ...] [COL ...]]
REPORT PRINT FIRST HEADER ...
REPORT PRINT FIRST SECTION ...
REPORT PRINT TITLE ...
REPORT PRINT HEADER ...
REPORT PRINT SECTION ...
REPORT PRINT FOOTER ...
REPORT PRINT SUMMARY ...
REPORT SET SECTION AFTER HEADER ...
REPORT RESET SECTION AFTER HEADER ...
REPORT SKIPPAGE ...
REPORT SKIPLINE ...
REPORT SKIPLINE ... NOEJECT ...
REPORT SKIPLINE ... BODY ...
REPORT EJECTPAGE ...
REPORT EJECTPAGE NOFOOTER ...
REPORT EJECTPAGE LAST ...
REPORT SET STATUS CONTINUE ...
REPORT STARTPAGE TO ;
[ TOP MARGIN TO ... ] ;
[ BOTTOM MARGIN TO ... ] ;
[ OFFSET TO ... ] ;
[ LENGTH TO ... ] ;
[ WIDTH TO ... ] ;
[ BODY TO ... ] ;
[ HEADER TO ... ] ;
[ LAYOUT TO ... ] ;
[ SECTION TO ... ] ;
[ FOOTER TO ... ] ;
[ TITLE TO ... ] ;
[ SUMMARY TO ... ] ;
[ ORIENTATION TO ... ] ;
[ SINGLE TO ... ] ;
[ FONT [ TO ] ... ] ;
[ CPI [ TO ] ... ] ;
SET PAGE HEADER TO ...
SET PAGE SECTION TO ...