Databaseconnectionclasses
0.5.3
|
basic class to create reports More...
#include <hk_report.h>
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 } |
![]() | |
enum | enum_presentationtype { general, form, report, qbe, referentialintegrity } |
enum | enum_bulkoperation { bulkfont, bulkforeground, bulkbackground } |
enum | enum_sizetype { relative, absolute } |
![]() | |
enum | enum_mode { designmode, viewmode, filtermode } |
![]() | |
enum | enum_visibletype { textlabel, button, rowselector, boolean, lineedit, memo, combobox, grid, form, report, reportsection, reportdata, query, subform, image, date, tabvisible, other } |
enum | alignmenttype { alignleft, alignright, aligncenter, aligndefault } |
![]() | |
enum | enum_interaction { noninteractive, interactive } |
enum | enum_measuresystem { cm, inch } |
enum | enum_tagtype { normaltag, mastertag } |
Public Member Functions | |
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 (xmlNodePtr 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) |
![]() | |
void | set_database (hk_database *db) |
hk_database * | database (void) const |
enum_presentationtype | presentationtype (void) const |
void | set_name (const hk_string &n) |
hk_string | name (void) const |
list< hk_datasource * > * | datasources (void) const |
long | new_datasource (const hk_string &name, datasourcetype dt=dt_table) |
hk_datasource * | get_datasource (long nr) |
hk_datasource * | get_datasource (const hk_string &description) |
hk_datasource * | get_datasource_by_shortname (const hk_string &description) |
hk_string | unique_datasourcename (long nr) |
hk_string | unique_shortdatasourcename (long nr) |
void | clear_datasourcelist (void) |
void | set_designsize (unsigned int width, unsigned int height, bool registerchange=true) |
virtual void | set_presentationsize (unsigned int, unsigned int) |
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 | register_object (hk_visible *) |
void | set_automatic_enable_datasources (bool) |
bool | automatic_enable_datasources (void) |
void | set_sizetype (enum_sizetype type, bool registerchange=true) |
enum_sizetype | sizetype (void) |
hk_interpreter * | interpreter (void) |
virtual void | script_error (hk_visible *, hk_interpreter::enum_action) |
void | set_interpretername (const hk_string &, bool registerchange=true) |
hk_string | interpretername (void) const |
void | enable_datasources (bool enable, hk_datasource::enum_accessmode mode=hk_datasource::standard) |
virtual bool | intervaltasks (void) |
bool | load_module (const hk_string &modulename) |
![]() | |
hk_dsmodevisible (hk_presentation *presentation=NULL) | |
virtual void | set_designmode (void) |
virtual void | set_viewmode (void) |
enum_mode | mode (void) const |
bool | has_changed (void) const |
void | has_changed (bool) |
void | set_block_has_changed (bool) |
bool | block_has_changed (void) const |
virtual void | reset_has_changed (void) |
bool | is_new () const |
![]() | |
hk_dsvisible (hk_presentation *presentation=NULL) | |
virtual void | set_datasource (hk_datasource *d) |
long | presentationdatasource (void) |
hk_datasource * | datasource (void) |
virtual void | savedata (ostream &s, bool savedatasource, bool saveall) |
void | set_readonly (bool readonly) |
bool | is_readonly (void) const |
void | set_before_row_change_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | before_row_change_action (void) |
void | set_after_row_change_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | after_row_change_action (void) |
void | set_before_update_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | before_update_action (void) |
void | set_after_update_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | after_update_action (void) |
void | set_before_delete_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | before_delete_action (void) |
void | set_after_delete_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | after_delete_action (void) |
void | set_before_insert_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | before_insert_action (void) |
void | set_after_insert_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | after_insert_action (void) |
virtual void | action_before_store_changed_data (void) |
virtual void | action_after_store_changed_data (void) |
virtual void | action_before_row_change (void) |
virtual void | action_after_row_change (void) |
virtual void | action_before_delete (void) |
virtual void | action_after_delete (void) |
virtual void | action_before_insert (void) |
virtual void | action_after_insert (void) |
![]() | |
hk_visible (hk_presentation *p=NULL) | |
void | set_x (unsigned int px, bool registerchange=true) |
void | set_y (unsigned int py, bool registerchange=true) |
void | set_width (unsigned int w, bool registerchange=true) |
void | set_height (unsigned int h, bool registerchange=true) |
unsigned int | x (void) const |
unsigned int | y (void) const |
unsigned int | width (void) const |
unsigned int | height (void) |
void | set_size (unsigned int x, unsigned int y, unsigned int w, unsigned int h, bool registerchange=true) |
void | set_size (unsigned int x, unsigned int y, unsigned int w, unsigned int h, bool registerchange, bool force_setting) |
void | set_size (unsigned int width, unsigned int height, bool registerchange=true) |
void | set_position (unsigned int x, unsigned int y, bool registerchange=true) |
void | set_label (const hk_string &l, bool registerchange=true) |
void | set_label (const hk_string &l, bool registerchange, bool force_setting) |
hk_string | label (void) |
bool | set_identifier (const hk_string &, bool registerchange=true, enum_interaction=interactive) |
hk_string | identifier (void) const |
enum_visibletype | type (void) |
void | set_font (const hk_string &font, int size, bool registerchange=true) |
void | set_font (const hk_string &font, int size, bool registerchange, bool force_setting) |
void | set_font (const hk_font &font, bool registerchange=true) |
void | set_font (const hk_font &font, bool registerchange, bool force_setting) |
void | set_foregroundcolour (const hk_colour &colour, bool registerchange=true) |
void | set_foregroundcolour (const hk_colour &colour, bool registerchange, bool force_setting) |
hk_colour | foregroundcolour (void) |
void | set_backgroundcolour (const hk_colour &colour, bool registerchange=true) |
void | set_backgroundcolour (const hk_colour &colour, bool registerchange, bool force_setting) |
hk_colour | backgroundcolour (void) |
void | set_neverregisterchange (bool n) |
void | set_neverregisterchange (bool n, bool force_setting) |
bool | neverregisterchange (void) |
long | presentationnumber (void) const |
void | set_datetimeformat (const hk_string &datetime, const hk_string &date, const hk_string &time) |
void | set_datetimeformat (const hk_string &datetime, const hk_string &date, const hk_string &time, bool force_setting) |
hk_string | datetimeformat (void) |
hk_string | dateformat (void) |
hk_string | timeformat (void) |
void | set_counts_as (unsigned long int c) |
virtual void | set_counts_as (unsigned long int c, bool force_setting) |
virtual unsigned long int | counts_as (void) |
virtual hk_string | replace (const hk_string &where) |
hk_presentation * | presentation (void) |
void | set_load_presentationnumber (bool l) |
void | set_load_presentationnumber (bool l, bool force_setting) |
bool | load_presentationnumber (void) |
void | set_alignment (alignmenttype a, bool registerchange=true) |
void | set_alignment (alignmenttype a, bool registerchange, bool force_setting) |
alignmenttype | alignment (void) |
void | set_tooltip (const hk_string &, bool registerchange=true, bool force_setting=false) |
hk_string | tooltip (void) |
virtual void | show_widget (void) |
virtual void | hide_widget (void) |
virtual bool | close_widget (void) |
virtual void | lower_widget (bool registerchange=true) |
virtual void | raise_widget (bool registerchange=true) |
void | set_on_click_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | on_click_action (void) |
void | set_on_doubleclick_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | on_doubleclick_action (void) |
void | set_on_open_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | on_open_action (void) |
void | set_on_close_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | on_close_action (void) |
void | set_on_getfocus_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | on_getfocus_action (void) |
void | set_on_loosefocus_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | on_loosefocus_action (void) |
void | set_on_key_action (const hk_string &, bool registerchange=true, bool force_setting=true) |
hk_string | on_key_action (void) |
void | set_key (const hk_key &) |
hk_key * | key () const |
void | set_enabled (bool enabled, bool registerchange=true, bool force_setting=false) |
bool | is_enabled () |
virtual bool | action_on_click (void) |
virtual bool | action_on_doubleclick (void) |
virtual bool | action_on_close (void) |
virtual bool | action_on_open (void) |
virtual bool | action_on_getfocus (void) |
virtual bool | action_on_loosefocus (void) |
virtual bool | action_on_key (void) |
bool | in_tabvisible (void) const |
void | set_buddylabel (long int labelid, bool registerchange=true, bool force_setting=false) |
long int | buddylabel (void) const |
void | set_movebuddylabel (bool) |
bool | move_buddylabel (void) const |
int | tag_number (const hk_string &) |
virtual hk_string | column_value (const hk_string &colname, bool &ok) |
hk_string | tag_value (const hk_string &, bool &ok) |
int | register_tag (const hk_string &) |
![]() | |
void | hkclassname (const hk_string &n) |
hk_string | hkclassname (void) const |
void | hkdebug (const hk_string &d) const |
void | hkdebug (const hk_string &d, const hk_string &e) const |
void | hkdebug (const hk_string &d, int i) const |
void | hkdebug (const hk_string &d, double i) const |
void | wanna_debug (bool d) |
bool | wanna_debug (void) const |
bool | generaldebug (void) |
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) |
![]() | |
static void | set_defaultsizetype (enum_sizetype type) |
static enum_sizetype | defaultsizetype (void) |
static void | set_snap2gridx (int) |
static int | snap2gridx (void) |
static void | set_snap2gridy (int) |
static int | snap2gridy (void) |
![]() | |
static void | set_defaulttextalignment (alignmenttype a) |
static alignmenttype | defaulttextalignment (void) |
static void | set_defaultnumberalignment (alignmenttype a) |
static alignmenttype | defaultnumberalignment (void) |
static void | set_open_maximized_windows (bool m) |
static bool | open_maximized_windows (void) |
![]() | |
static void | set_generaldebug (bool d) |
static hk_string | hk_translate (const hk_string &t) |
static void | show_warningmessage (const hk_string &m) |
static void | set_warningmessage (messagewindowtype *m) |
static bool | show_yesnodialog (const hk_string &m, bool default_value) |
static void | set_yesnodialog (yesno_dialogtype *d) |
static hk_string | show_stringvaluedialog (const hk_string &t) |
static void | set_stringvaluedialog (stringvalue_dialogtype *t) |
static void | set_translatefunction (translatefunctiontype *t) |
static void | set_filedialog (file_dialogtype *f) |
static hk_string | show_filedialog (const hk_string &f="", enum_operationmode m=file_open) |
static void | set_directorydialog (stringvalue_dialogtype *f) |
static hk_string | show_directorydialog (const hk_string &f="") |
static void | set_showpedantic (bool s) |
static bool | showpedantic (void) |
static void | set_measuresystem (enum_measuresystem) |
static enum_measuresystem | measuresystem (void) |
static xmlNodePtr | get_tagvalue (xmlNodePtr where, const hk_string &tag, hk_string &value, int position=1, enum_tagtype tagtype=normaltag) |
static xmlNodePtr | get_tagvalue (xmlNodePtr where, const hk_string &tag, unsigned long &value, int position=1) |
static xmlNodePtr | get_tagvalue (xmlNodePtr where, const hk_string &tag, unsigned int &value, int position=1) |
static xmlNodePtr | get_tagvalue (xmlNodePtr where, const hk_string &tag, long &value, int position=1) |
static xmlNodePtr | get_tagvalue (xmlNodePtr where, const hk_string &tag, int &value, int position=1) |
static xmlNodePtr | get_tagvalue (xmlNodePtr where, const hk_string &tag, bool &value, int position=1) |
static xmlNodePtr | get_tagvalue (xmlNodePtr &where, const hk_string &tag) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, const hk_string &value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, unsigned long value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, unsigned int value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, long value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, int value) |
static void | set_tagvalue (ostream &stream, const hk_string &tag, bool value) |
static void | start_mastertag (ostream &stream, const hk_string &tag) |
static void | end_mastertag (ostream &stream, const hk_string &tag) |
static void | set_defaultdatetimeformat (const hk_string &timeformat, const hk_string &dateformat, const hk_string &datetimeformat) |
static hk_string | defaultdateformat (void) |
static hk_string | defaulttimeformat (void) |
static hk_string | defaultdatetimeformat (void) |
static void | save_preferences (void) |
static bool | runtime_only (void) |
static void | set_locale (const hk_string &locale) |
static hk_string | locale (void) |
static void | set_defaultdriver (const hk_string &d) |
static hk_string | defaultdriver (void) |
static void | set_default_automatic_data_update (bool) |
static bool | default_automatic_data_update (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) |
![]() | |
void | remove_datasource (long nr, bool registerchange=true) |
virtual void | widget_specific_presentationresize (void) |
virtual void | widget_specific_fieldresize (hk_visible *) |
virtual void | widget_specific_set_name (void) |
void | database_delete (void) |
virtual void | database_has_vanished (void) |
void | before_source_vanishes (void) |
bool | ask_name (void) |
virtual void | raise_widget (hk_visible *) |
virtual void | lower_widget (hk_visible *) |
![]() | |
virtual void | set_has_changed (enum_has_changed forcesetting=standard) |
virtual void | widget_specific_modechanges (enum_mode) |
virtual bool | widget_specific_before_modechanges (enum_mode) |
![]() | |
void | row_change (void) |
void | batch_next (void) |
void | batch_previous (void) |
void | insert_mode (void) |
virtual void | widget_specific_insert_mode (void) |
virtual void | widget_specific_enable_disable (void) |
virtual void | widget_specific_enable (void) |
virtual void | widget_specific_disable (void) |
virtual void | widget_specific_row_added (void) |
virtual void | widget_specific_row_deleted (void) |
virtual void | before_row_change (void) |
virtual void | before_store_changed_data (void) |
virtual void | after_store_changed_data (void) |
virtual void | before_insert_row (void) |
virtual void | before_datasource_enables (void) |
virtual bool | datasource_enable (void) |
virtual void | datasource_delete (void) |
virtual void | row_added (void) |
virtual void | row_deleted (void) |
virtual bool | columns_new_created (void) |
virtual void | list_changes (listtype type) |
virtual bool | table_structure_changes (void) |
virtual void | widget_specific_presentationdatasource (long) |
virtual bool | presentationmode_changed (void) |
![]() | |
virtual void | widget_specific_form_resizes (void) |
virtual void | widget_specific_font_changed (void) |
virtual void | widget_specific_label_changed (void) |
virtual void | widget_specific_foregroundcolour_changed (const hk_colour &oldcolour) |
virtual void | widget_specific_backgroundcolour_changed (const hk_colour &oldcolour) |
virtual bool | widget_specific_coordinates (unsigned int px, unsigned int py, unsigned int pwidth, unsigned int pheight) |
virtual void | widget_specific_raise_widget (void) |
virtual void | widget_specific_lower_widget (void) |
virtual void | widget_specific_tooltip_changed (void) |
virtual void | widget_specific_enabled_changed (void) |
virtual void | before_presentationmode_changed (void) |
virtual void | widget_specific_alignment (void) |
virtual void | widget_specific_sizetype_changed (void) |
bool | allow_datachanging (bool force_setting) |
void | has_changed (bool registerchange, enum_has_changed force_setting=standard) |
void | set_tabvisible (hk_tabvisible *) |
![]() | |
hk_interpreter * | new_interpreter (const hk_string &interpreter, hk_presentation *) |
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 |
![]() | |
enum_presentationtype | p_presentationtype |
unsigned int | p_actualwidth |
unsigned int | p_actualheight |
bool | p_while_errorhandling |
![]() | |
bool | p_is_new |
![]() | |
hk_datasource * | p_datasource |
hk_datetime | p_date |
hk_string | debug_p_columnname |
![]() | |
hk_presentation * | p_presentation |
enum_visibletype | p_visibletype |
bool | p_setcoordinates |
bool | p_setwidgetcoordinates |
bool | while_init |
Friends | |
class | hk_reportsectionpair |
class | hk_reportsection |
Additional Inherited Members | |
![]() | |
enum | enum_has_changed { standard, forcesetting } |
![]() | |
static hk_string | p_defaulttimeformat ="h:m:s" |
static hk_string | p_defaultdateformat ="D.M.Y" |
static hk_string | p_defaultdatetimeformat ="D.M.Y h:m:s" |
static bool | p_runtime_only =false |
basic class to create reports
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.
you can use the variables
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
|
protectedvirtual |
FOR WIDGET DEVELOPERS ONLY: will be automatically called before the columns will be deleted. usually column pointers will be set to NULL in this function. i.e.when enabling,disabling or when a depending datasource has to requery its rows.
Reimplemented from hk_dsvisible.
References datasource_disable(), and hk_class::hkdebug().
hk_reportsection * hk_report::datasection | ( | void | ) |
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
|
protectedvirtual |
FOR WIDGET DEVELOPERS ONLY: will be automatically called when the datasources is disabling
Reimplemented from hk_dsvisible.
References hk_class::hkdebug().
Referenced by before_columns_deleted().
hk_string hk_report::default_afterreportdata | ( | void | ) |
default afterdata. Will be set when a datafield is created
hk_string hk_report::default_beforereportdata | ( | void | ) |
default beforedata. Will be set when a datafield is created
hk_string hk_report::default_reportdata | ( | void | ) |
the default column value will be used as a default when a new data will be created with new_data default is @
bool hk_report::execute | ( | void | ) |
After you have defined the report with new_section etc. you can start the report by calling this function.
References set_mode().
Referenced by print_report().
unsigned int hk_report::formatheight | ( | pageformattype | t = A4 | ) |
returns the height of the pageformat
References hk_class::hkdebug().
Referenced by set_pageformat().
unsigned int hk_report::formatwidth | ( | pageformattype | t = A4 | ) |
void hk_report::init_report | ( | void | ) |
sets the report in the same state as it would be after creating;
References hk_class::hkdebug(), hk_reportsection::set_automatic_create_data(), set_borders(), set_mode(), set_orientation(), and set_pageformat().
|
virtual |
loads the object's values out of the definition string. Especially used to load queries, forms and reports
Reimplemented from hk_presentation.
References hk_class::get_tagvalue(), hk_class::hkdebug(), hk_presentation::loaddata(), new_sectionpair(), set_filename(), set_orientation(), set_pageformat(), and set_recodefunction().
bool hk_report::move_sectionpair | ( | unsigned int | actualposition, |
int | steps | ||
) |
moves an existing sectionpair relative to the other existing sectionpairs.
actualposition | position of the sectionpair to be moved |
steps | positive values move it closer to the datasection, negative values move it away |
hk_reportsectionpair * hk_report::new_sectionpair | ( | bool | registerchange = true | ) |
convenience function. See new_sectionpair_at for details
References hk_class::hkdebug(), and new_sectionpair_at().
Referenced by loaddata().
hk_reportsectionpair * hk_report::new_sectionpair_at | ( | unsigned int | position, |
bool | registerchange = true |
||
) |
creates a new sectionpair at position "position" position most outside position is 0
References hk_reportsectionpair::footersection(), and hk_reportsectionpair::headersection().
Referenced by new_sectionpair().
hk_string hk_report::outputfile | ( | void | ) |
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.
Referenced by print_report().
ostream * hk_report::outputstream | ( | void | ) |
If the report will be printed to the standard output the outputstream is cout, else a textstream.
References outputstream().
Referenced by hk_reportsection::actual_string(), outputstream(), and rowcount().
hk_reportsection * hk_report::page_footer | ( | void | ) |
The page head will be printed on top of every page
Referenced by hk_reportdata::actual_string(), and hk_reportsection::actual_string().
hk_reportsection * hk_report::page_header | ( | void | ) |
The page head will be printed on top of every page
Referenced by hk_reportdata::actual_string(), and hk_reportsection::actual_string().
long hk_report::pagenumber | ( | void | ) |
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
bool hk_report::print_report | ( | bool | execute_before_printing = true | ) |
sends the report to the printer
References execute(), hk_class::hk_translate(), hk_class::hkdebug(), outputfile(), and hk_class::show_warningmessage().
hk_reportsection * hk_report::report_footer | ( | void | ) |
the section that will be printed at the end of the report
hk_reportsection * hk_report::report_header | ( | void | ) |
the section that will be printed at the beginning of the report
void hk_report::rowcount | ( | unsigned long | c | ) |
This function does the counting job for set_periodic and will be called automaticallly
References hk_class::hkdebug(), outputstream(), and rowcount().
Referenced by hk_reportdata::actual_string(), hk_reportsection::actual_string(), and rowcount().
|
virtual |
stores the object's values to stream s. Especially used to store queries, forms and reports
Reimplemented from hk_presentation.
References hk_class::end_mastertag(), hk_class::hkdebug(), hk_presentation::savedata(), hk_class::set_tagvalue(), and hk_class::start_mastertag().
vector< hk_reportsectionpair * > * hk_report::sectionpairs | ( | void | ) |
A list of all the sections
Referenced by hk_reportsection::reset_count().
void hk_report::set_begin | ( | const hk_string & | b, |
bool | registerchange = true |
||
) |
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()
void hk_report::set_borders | ( | unsigned int | left = 200 , |
unsigned int | right = 200 , |
||
unsigned int | top = 200 , |
||
unsigned int | bottom = 300 , |
||
bool | registerchange = true |
||
) |
defines the borders of the page
References hk_class::hk_translate(), hk_class::hkdebug(), and hk_class::show_warningmessage().
Referenced by init_report().
void hk_report::set_bottomline | ( | bool | l = true , |
bool | registerchange = true |
||
) |
paints a horizontal line on the bottom of the page
void hk_report::set_default_reportdataconfigurefunction | ( | const hk_string & | f, |
bool | registerchange = true |
||
) |
default dataconfigurefunction. Will be set when a datafield is created
void hk_report::set_default_reportsectionbegin | ( | const hk_string & | e, |
bool | registerchange = true |
||
) |
default sectionbegin. Will be set when a section is created See hk_reportsection::set_sectionbegin for details
void hk_report::set_default_reportsectionbetweendata | ( | const hk_string & | b, |
bool | registerchange = true |
||
) |
default sectionbetweendata. Will be set when a section is created See hk_reportsection::set_sectionbetweendata for details
void hk_report::set_default_reportsectioncountfunction | ( | const hk_string & | f, |
bool | registerchange = true |
||
) |
default sectioncountfunction. Will be set when a section is created See hk_reportsection::set_sectioncountfunction for details
void hk_report::set_default_reportsectionend | ( | const hk_string & | e, |
bool | registerchange = true |
||
) |
default sectionend. Will be set when a section is created See hk_reportsection::set_sectionend for details
void hk_report::set_diagonalloru | ( | bool | l = true , |
bool | registerchange = true |
||
) |
paints a diagonal line on the left top corner to the right bottom corner of the page
void hk_report::set_diagonalluro | ( | bool | l = true , |
bool | registerchange = true |
||
) |
paints a diagonal line on the left bottom corner to the right upper corner of the page
void hk_report::set_end | ( | const hk_string & | e, |
bool | registerchange = true |
||
) |
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()
void hk_report::set_filebegin | ( | const hk_string & | b, |
bool | registerchange = true |
||
) |
will be set at the beginning of a file. If a report has multiple files b will be written in each file
void hk_report::set_fileend | ( | const hk_string & | e, |
bool | registerchange = true |
||
) |
will be set at the end of a file. If a report has multiple files e will be written in each file
void hk_report::set_fileextension | ( | const hk_string & | ext, |
bool | registerchange = true |
||
) |
The output filename will be completed with this extension, i.e. '.ps' for postscript files
void hk_report::set_filename | ( | const hk_string & | f, |
bool | registerchange = true |
||
) |
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.
Referenced by loaddata().
void hk_report::set_firstpagenumber | ( | long int | f, |
bool | registerchange = true |
||
) |
Set the pagenumber if the first page should not start with 1.
void hk_report::set_frame | ( | bool | l = true , |
bool | registerchange = true |
||
) |
paints a frame on the page
void hk_report::set_leftline | ( | bool | l = true , |
bool | registerchange = true |
||
) |
paints a vertical line on the left side of the page
void hk_report::set_masterreport | ( | hk_report * | m | ) |
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
Referenced by hk_reportsection::set_subreport().
|
virtual |
if mode is design then you can define or alter a presentation else the data will be shown
Reimplemented from hk_presentation.
References hk_presentation::set_mode().
Referenced by execute(), and init_report().
|
virtual |
If a report has more than one page and this function is set to true every page will be stored in a separate file.
Referenced by hk_reporthtml::set_multiplefiles().
void hk_report::set_orientation | ( | orientationtype | o = portrait , |
bool | registerchange = true |
||
) |
sets the page orientation. Possible values are portrait and landscape
References set_pageformat().
Referenced by init_report(), and loaddata().
void hk_report::set_pagedelimiter | ( | const hk_string & | d, |
bool | registerchange = true |
||
) |
The pagedelimiter is a hk_string sequence to be sent between to pages (i.e. an escape sequence for the printer)
void hk_report::set_pageformat | ( | pageformattype | t = A4 , |
bool | registerchange = true |
||
) |
sets the correct page height and width of the equivalent page formats. Default is A4
References formatheight(), formatwidth(), hk_class::hkdebug(), and hk_presentation::set_designsize().
Referenced by init_report(), loaddata(), and set_orientation().
void hk_report::set_pageformat | ( | unsigned int | width, |
unsigned int | height, | ||
bool | registerchange | ||
) |
sets the page height and width. The pageformat will be changed to "userdefined"
References hk_class::hkdebug(), and hk_presentation::set_designsize().
void hk_report::set_pagenamecolumn | ( | const hk_string & | c, |
bool | registerchange = true |
||
) |
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
References hk_class::hkdebug().
void hk_report::set_periodic | ( | unsigned long | when, |
const hk_string & | what = "" , |
||
bool | newpage = false , |
||
bool | registerchange = true |
||
) |
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"
References hk_class::hkdebug().
void hk_report::set_print_full_pages_only | ( | bool | p, |
bool | registerchange | ||
) |
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
|
static |
sets the printercommand. default is "lpr"
void hk_report::set_recodefunction | ( | const hk_string & | r, |
bool | registerchange = true |
||
) |
If the data has to be recoded (i.e. ASCII to html -> ü) you can write a function and set it with set_recodefunction
r | name of an existing recodefunction. A new one can be set with add_recodetype |
References hk_class::hk_translate(), hk_class::hkdebug(), and hk_class::show_warningmessage().
Referenced by loaddata().
void hk_report::set_rightline | ( | bool | l = true , |
bool | registerchange = true |
||
) |
paints a vertical line on the right side of the page
void hk_report::set_topline | ( | bool | l = true , |
bool | registerchange = true |
||
) |
paints a horizontal line on top of the page
References hk_class::hkdebug().
void hk_report::set_use_standard_storagepath | ( | bool | s = true | ) |
if true the report output will be written in a file in the .hk_classes directory (~/.hk_classes/driver/host/database/output)
|
protectedvirtual |
If this function returns false the execution of the report will be cancelled
|
protectedvirtual |
If this function returns false the execution of the report will be cancelled
|
protectedvirtual |
FOR WIDGET DEVELOPERS ONLY: will be automatically called when the datasource has changed the row. Has to be rewritten for a new widget
Reimplemented from hk_dsvisible.