#include <hk_report.h>
Inheritance diagram for hk_report:
Public Types | |
enum | orientationtype { landscape, portrait } |
enum | pageformattype { A0 = 0, A1 = 1, A2 = 2, A3 = 3, A4 = 4, A5 = 5, A6 = 6, A7 = 7, A8 = 8, A9 = 9, A10 = 10, letter = 11, legal = 12, executive = 13, tabloid = 14, userdefined = 15 } |
Public Member Functions | |
hk_report (void) | |
virtual | ~hk_report (void) |
void | set_filename (const hk_string &, bool registerchange=true) |
hk_string | filename (void) |
void | set_use_standard_storagepath (bool s=true) |
bool | use_standard_storagepath (void) |
hk_string | outputfile (void) |
void | set_begin (const hk_string &, bool registerchange=true) |
hk_string | begin (void) |
void | set_end (const hk_string &, bool registerchange=true) |
hk_string | end (void) |
hk_reportsection * | page_header (void) |
hk_reportsection * | page_footer (void) |
hk_reportsection * | report_header (void) |
hk_reportsection * | report_footer (void) |
hk_reportsection * | datasection (void) |
hk_reportsectionpair * | new_sectionpair (bool registerchange=true) |
hk_reportsectionpair * | new_sectionpair_at (unsigned int position, bool registerchange=true) |
bool | move_sectionpair (unsigned int actualposition, int steps) |
bool | execute (void) |
bool | while_executing (void) const |
bool | while_load_report (void) const |
virtual bool | while_loading (void) |
virtual bool | set_mode (enum_mode s) |
void | set_recodefunction (const hk_string &r, bool registerchange=true) |
recodefunctiontype * | recodefunction (void) |
hk_string | recodefunctionstring (void) |
void | new_page (void) |
void | set_pagedelimiter (const hk_string &d, bool registerchange=true) |
hk_string | pagedelimiter (void) |
vector< hk_reportsectionpair * > * | sectionpairs (void) |
virtual void | set_multiplefiles (bool m=true, bool registerchange=true) |
bool | multiplefiles (void) |
void | set_fileextension (const hk_string &ext, bool registerchange=true) |
hk_string | fileextension (void) |
void | set_firstpagenumber (long int f, bool registerchange=true) |
long int | firstpagenumber (void) |
void | set_pagenamecolumn (const hk_string &c, bool registerchange=true) |
hk_string | pagenamecolumn (void) |
void | set_filebegin (const hk_string &b, bool registerchange=true) |
hk_string | filebegin (void) |
void | set_fileend (const hk_string &e, bool registerchange=true) |
hk_string | fileend (void) |
void | set_periodic (unsigned long when, const hk_string &what="", bool newpage=false, bool registerchange=true) |
unsigned long | periodic_when (void) |
hk_string | periodic_what (void) |
bool | periodic_newpage (void) |
ostream * | outputstream (void) |
void | set_masterreport (hk_report *m) |
hk_report * | masterreport (void) |
bool | is_subreport (void) const |
bool | is_subpresentation (void) |
void | rowcount (unsigned long) |
unsigned long | current_rowcount (void) |
virtual hk_font | font (void) |
long | pagenumber (void) |
long | absolutepagenumber (void) |
unsigned long | rownumber (void) |
virtual bool | set_presentationdatasource (long n, bool registerchange=true) |
virtual bool | save_report (const hk_string &name="", bool ask=true) |
virtual bool | load_report (const hk_string &name="") |
virtual void | savedata (ostream &s) |
virtual void | loaddata (const hk_string &definition) |
hk_string | default_reportdata (void) |
void | set_default_reportdata (const hk_string &v, bool registerchange=true) |
hk_string | default_beforereportdata (void) |
void | set_default_beforereportdata (const hk_string &v, bool registerchange=true) |
hk_string | default_afterreportdata (void) |
void | set_default_afterreportdata (const hk_string &v, bool registerchange=true) |
int | default_reportprecision (void) |
void | set_default_reportprecision (int, bool registerchange=true) |
bool | default_use_reportseparator (void) |
void | set_default_use_reportseparator (bool, bool registerchange=true) |
void | set_default_reportdataconfigurefunction (const hk_string &f, bool registerchange=true) |
hk_string | default_reportdataconfigurefunction (void) |
void | set_default_reportsectionbegin (const hk_string &e, bool registerchange=true) |
hk_string | default_reportsectionbegin (void) |
void | set_default_reportsectionend (const hk_string &e, bool registerchange=true) |
hk_string | default_reportsectionend (void) |
void | set_default_reportsectionbetweendata (const hk_string &b, bool registerchange=true) |
hk_string | default_reportsectionbetweendata (void) |
void | set_default_reportsectioncountfunction (const hk_string &f, bool registerchange=true) |
hk_string | default_reportsectioncountfunction (void) |
void | set_topline (bool l=true, bool registerchange=true) |
bool | topline (void) |
void | set_bottomline (bool l=true, bool registerchange=true) |
bool | bottomline (void) |
void | set_leftline (bool l=true, bool registerchange=true) |
bool | leftline (void) |
void | set_rightline (bool l=true, bool registerchange=true) |
bool | rightline (void) |
void | set_diagonalluro (bool l=true, bool registerchange=true) |
bool | diagonalluro (void) |
void | set_diagonalloru (bool l=true, bool registerchange=true) |
bool | diagonalloru (void) |
void | set_frame (bool l=true, bool registerchange=true) |
void | set_borders (unsigned int left=200, unsigned int right=200, unsigned int top=200, unsigned int bottom=300, bool registerchange=true) |
unsigned int | border_left (void) |
unsigned int | border_right (void) |
unsigned int | border_top (void) |
unsigned int | border_bottom (void) |
void | set_orientation (orientationtype o=portrait, bool registerchange=true) |
orientationtype | orientation (void) |
void | set_pageformat (pageformattype t=A4, bool registerchange=true) |
void | set_pageformat (unsigned int width, unsigned int height, bool registerchange) |
pageformattype | pageformat (void) |
unsigned int | formatwidth (pageformattype t=A4) |
unsigned int | formatheight (pageformattype t=A4) |
void | set_reportconfigurefunction (const hk_string &f, bool registerchange) |
void | set_reporttype (const hk_string &, bool registerchange=true) |
hk_string | reporttype (void) |
void | configure_page (void) |
void | neutralize_definition (bool registerchange) |
void | init_report (void) |
void | remove_sectionpair (hk_reportsectionpair *, bool registerchange=true) |
list< hk_string > * | neededfonts (void) |
list< hk_string > * | usedfonts (void) |
list< hk_string > * | usedpsfonts (void) |
bool | print_report (bool execute_before_printing=true) |
unsigned int | designwidth (void) |
unsigned int | designheight (void) |
unsigned int | horizontal2relativ (unsigned int h) |
unsigned int | vertical2relativ (unsigned int v) |
unsigned int | relativ2horizontal (unsigned int r) |
unsigned int | relativ2vertical (unsigned int r) |
virtual void | bulk_operation (enum_bulkoperation bulkoperation) |
hk_reportdata * | get_reportdatavisible (long nr) |
hk_reportdata * | get_reportdatavisible (const hk_string &identifier) |
void | set_on_new_page_action (const hk_string &, bool registerchange=true) |
hk_string | on_new_page_action (void) |
void | stop_execution (void) |
bool | execution_stopped (void) |
hk_string | filelocale (void) |
hk_string | filecharset (void) |
void | set_filelocale (const hk_string &) |
void | set_filecharset (const hk_string &) |
void | set_useencodingtab (bool) |
bool | useencodingtab (void) |
hk_encodingtab * | encodingtab (void) const |
void | set_print_full_pages_only (bool, bool registerchange) |
bool | print_full_pages_only (void) |
void | set_fullpagereplacefunction (const hk_string &r, bool registerchange=true) |
recodefunctiontype * | fullpagereplacefunction (void) |
hk_string | fullpagereplacefunctionstring (void) |
virtual hk_string | tag_value (int tagnumber, bool &ok) |
Static Public Member Functions | |
static void | add_recodetype (const hk_string &name, recodefunctiontype *f) |
static list< hk_string > * | recodelist (void) |
static void | add_reporttype (const hk_string &name, reporttypefunction *f) |
static list< hk_string > * | reporttypelist (void) |
static void | add_configurefunctiontype (const hk_string &name, report_configurefunction *f) |
static list< hk_string > * | configurefunctionlist (void) |
static void | set_printcommand (const hk_string &printcommand) |
static hk_string | printcommand (void) |
static void | setup_reportbasics (void) |
static void | add_fullpagereplacefunctiontype (const hk_string &name, recodefunctiontype *f) |
static list< hk_string > * | fullpagereplacefunctionlist (void) |
static void | set_embedfonts (bool) |
static bool | embedfonts (void) |
Protected Member Functions | |
void | set_progressdialog (progress_dialogtype *progressdialog) |
progress_dialogtype * | progressdialog (void) const |
void | remove_section (hk_reportsection *) |
virtual bool | datasource_disable (void) |
virtual bool | before_columns_deleted (void) |
virtual bool | widget_specific_before_new_page (void) |
virtual bool | widget_specific_after_new_page (void) |
virtual hk_reportsection * | widget_specific_new_section (void) |
virtual void | widget_specific_after_loadreport (void) |
virtual void | widget_specific_before_execute (void) |
virtual void | widget_specific_after_first_outstream_created (void) |
virtual void | widget_specific_before_last_outstream_closed (void) |
virtual void | widget_specific_after_execute (void) |
virtual bool | widget_specific_row_change (void) |
virtual void | widget_specific_batch_next (void) |
virtual void | widget_specific_batch_previous (void) |
void | remove_all_sections (void) |
virtual void | sizetype_changed (void) |
void | database_delete (void) |
virtual bool | action_on_new_page (void) |
Protected Attributes | |
bool | p_multiplefiles |
vector< hk_reportsectionpair * > | p_sectionpairs |
hk_string | p_default_data |
hk_string | p_default_beforedata |
hk_string | p_default_afterdata |
hk_string | p_default_dataconfigurefunction |
Friends | |
class | hk_reportsectionpair |
class | hk_reportsection |
With hk_report you can create reports to print all your database data in all userdefined, textbased formats, such as CVS, HTML, XML, Postscript etc. It has all functions you need to create reports in any kind and any format. See also the convenience class hk_reportcvs.
PTIME% the time in seconds used to create the report output. PAGENUMBER% the number of the page ABSOLUTEPAGENUMBER% physical number of the page in file PSNEEDEDFONTS% adds the Postscript-style %DocumentNeededFonts section
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from hk_presentation. |
|
|
|
|
|
|
|
Reimplemented from hk_presentation. |
|
This section is printed for every row in a datasource. It should be regarded as the main data section of the report This section will be embraced by the user defined sections created with new_sectionpair |
|
|
|
default afterdata. Will be set when a datafield is created |
|
default beforedata. Will be set when a datafield is created |
|
the default column value will be used as a default when a new data will be created with new_data default is @ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from hk_presentation. |
|
Reimplemented from hk_presentation. |
|
|
|
|
|
|
|
|
|
|
|
After you have defined the report with new_section etc. you can start the report by calling this function. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
returns the height of the pageformat |
|
returns the width of the pageformat |
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from hk_presentation. |
|
sets the report in the same state as it would be after creating; |
|
Reimplemented from hk_presentation. |
|
|
|
|
|
Reimplemented in hk_kdesimplereport. |
|
Reimplemented from hk_presentation. |
|
|
|
moves an existing sectionpair relative to the other existing sectionpairs.
|
|
|
|
|
|
|
|
|
|
convenience function. See new_sectionpair_at for details |
|
creates a new sectionpair at position "position" position most outside position is 0 |
|
|
|
|
|
path and name of the file which contains the output of the report (if not set with set_filename) will be set while executing the report. |
|
If the report will be printed to the standard output the outputstream is cout, else a textstream. |
|
The page head will be printed on top of every page |
|
The page head will be printed on top of every page |
|
|
|
|
|
|
|
the number of the page. To get more than one page you have to use either hk_reportsection::set_new_page_after_section or hk_report::set_periodic |
|
|
|
|
|
|
|
|
|
sends the report to the printer |
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from hk_presentation. |
|
Reimplemented from hk_presentation. |
|
|
|
|
|
|
|
the section that will be printed at the end of the report |
|
the section that will be printed at the beginning of the report |
|
|
|
|
|
|
|
This function does the counting job for set_periodic and will be called automaticallly |
|
|
|
|
|
Reimplemented from hk_presentation. |
|
A list of all the sections |
|
Here you can set a string which will be printed at the very beginning of the report (report header) Can be used for initialisation of the report. To print data on top of the report see report_header() |
|
defines the borders of the page |
|
paints a horizontal line on the bottom of the page |
|
|
|
|
|
|
|
default dataconfigurefunction. Will be set when a datafield is created |
|
|
|
default sectionbegin. Will be set when a section is created See hk_reportsection::set_sectionbegin for details |
|
default sectionbetweendata. Will be set when a section is created See hk_reportsection::set_sectionbetweendata for details |
|
default sectioncountfunction. Will be set when a section is created See hk_reportsection::set_sectioncountfunction for details |
|
default sectionend. Will be set when a section is created See hk_reportsection::set_sectionend for details |
|
|
|
paints a diagonal line on the left top corner to the right bottom corner of the page |
|
paints a diagonal line on the left bottom corner to the right upper corner of the page |
|
|
|
Here you can set a string which will be shown at the very end of the report (report footer) To print data at the end of the report see report_footer() |
|
will be set at the beginning of a file. If a report has multiple files b will be written in each file |
|
|
|
will be set at the end of a file. If a report has multiple files e will be written in each file |
|
The output filename will be completed with this extension, i.e. '.ps' for postscript files |
|
|
|
Sets the filename of the report. If you don't give the report a name the report and use_standard_storagepath is false will be printed at the standard output.
|
|
Set the pagenumber if the first page should not start with 1. |
|
paints a frame on the page |
|
|
|
paints a vertical line on the left side of the page |
|
A report can contain a subreport. If this report is a subreport this is its link to its master report Usually you dont have to call this function |
|
Reimplemented from hk_presentation. Reimplemented in hk_kdesimplereport. |
|
If a report has more than one page and this function is set to true every page will be stored in a separate file. |
|
|
|
sets the page orientation. Possible values are portrait and landscape |
|
The pagedelimiter is a hk_string sequence to be sent between to pages (i.e. an escape sequence for the printer) |
|
sets the page height and width. The pageformat will be changed to "userdefined" |
|
sets the correct page height and width of the equivalent page formats. Default is A4 |
|
You have different possibilities to name the report files. First, with set_filename set_fileextension Second, you can have the the filename in a column of your datasource. Give the name of the column with this function and then it will look up the name in this column. It is your responsibility to make sure that every filename is unique |
|
A string that will be printed whenever a internal counter will get as big or greater than "when" To define "what counts what" use set_counts_as Whenever the event of "counting" occurs by calling row_count. Example: You want to print 50 lines per page, your header is 3 lines wide and your data isone line per data row set your page head to "3" and your datasection to "1" |
|
|
|
default is false: if true the section output will be buffered until a new_page is created, if false it is directly written to the stream |
|
sets the printercommand. default is "lpr" |
|
|
|
If the data has to be recoded (i.e. ASCII to html -> ü) you can write a function and set it with set_recodefunction
|
|
|
|
|
|
paints a vertical line on the right side of the page |
|
paints a horizontal line on top of the page |
|
if true the report output will be written in a file in the .hk_classes directory (~/.hk_classes/driver/host/database/output) |
|
|
|
|
|
Reimplemented from hk_presentation. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from hk_presentation. |
|
|
|
|
|
Reimplemented from hk_presentation. |
|
Reimplemented in hk_kdesimplereport. |
|
|
|
Reimplemented in hk_kdesimplereport. |
|
If this function returns false the execution of the report will be cancelled Reimplemented in hk_kdesimplereport. |
|
|
|
|
|
Reimplemented in hk_kdesimplereport. |
|
|
|
If this function returns false the execution of the report will be cancelled |
|
Reimplemented in hk_kdesimplereport. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|