Databaseconnectionclasses  0.5.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
hk_reportsection Class Reference

represents a section of the report. More...

#include <hk_reportsection.h>

Inheritance diagram for hk_reportsection:
Inheritance graph
[legend]
Collaboration diagram for hk_reportsection:
Collaboration graph
[legend]

Public Member Functions

void set_unique (bool unique=true, bool endsection=false, bool registerchange=true)
 
bool unique (void)
 
hk_reportdatanew_data (void)
 
hk_reportdatadata_at (unsigned int)
 
vector< hk_reportdata * > * datalist (void)
 
virtual bool actual_string (void)
 
hk_string sectionbegin (void)
 
void set_sectionbegin (const hk_string &b, bool registerchange=true)
 
hk_string sectionend (void)
 
void set_sectionend (const hk_string &e, bool registerchange=true)
 
hk_string betweendata (void)
 
void set_betweendata (const hk_string &b, bool registerchange=true)
 
bool new_uniquevalue (bool justcheck=false)
 
bool endsection (void)
 
void set_automatic_create_data (bool d=true, bool registerchange=true)
 
bool new_page_after_section (void)
 
void set_new_page_after_section (bool p, bool registerchange=true)
 
bool section_was_printed (void)
 
void set_subreport (const hk_string &subreport="", bool before_data=false, bool registerchange=true)
 
hk_string subreportname (void)
 
hk_reportsubreport (void)
 
void add_depending_fields (const hk_string &thisreport_field, const hk_string &subreport_field, bool registerchange=true)
 
void clear_depending_fields (void)
 
list< hk_string > * depending_on_thisreportfields (void)
 
list< hk_string > * depending_on_subreportfields (void)
 
bool print_subreport_before_data (void)
 
bool print_subreport (void)
 
void set_replacefunction (const hk_string &f, bool registerchange=true)
 
virtual hk_string replace (const hk_string &where)
 
void reset_count (void)
 
virtual hk_font font (void)
 
virtual unsigned long counts_as (void)
 
void set_sectioncountfunction (const hk_string &f, bool registerchange=true)
 
hk_string sectioncountfunctionstring (void)
 
reportsectioncounttype * sectioncountfunction (void)
 
virtual void savedata (ostream &s, bool userdefined=false)
 
virtual void loaddata (xmlNodePtr definition, bool userdefined=false)
 
virtual void set_datasource (hk_datasource *d)
 
virtual bool set_presentationdatasource (long n, bool registerchange=true)
 
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)
 
void set_default_reportdataconfigurefunction (const hk_string &f, bool registerchange=true)
 
hk_string default_reportdataconfigurefunction (void)
 
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 neutralize_definition (bool registerchange)
 
virtual void reset (void)
 
void clear_countingfields (void)
 
void remove_data (hk_reportdata *)
 
hk_reportreport (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)
 
hk_reportsectionpairreportsectionpair (void)
 
bool set_offset (unsigned int o, bool registerchange=true)
 
unsigned int offset (void)
 
void bulk_operation (hk_presentation::enum_bulkoperation bulkoperation)
 
void set_automaticcreatedatafunction (reportsectionautomaticcreatedatatype *)
 
reportsectionautomaticcreatedatatype * automaticcreatedatafunction (void)
 
hk_reportdataget_reportdatavisible (long nr)
 
hk_reportdataget_reportdatavisible (const hk_string &identifier)
 
bool is_fully_printed (void)
 
void set_print_section (bool)
 
bool print_section (void)
 
- Public Member Functions inherited from hk_dsdatavisible
 hk_dsdatavisible (hk_presentation *p=NULL)
 
void set_columnname (const hk_string &c, bool registerchange=true)
 
void set_columnname (const hk_string &c, bool registerchange, int coloccurance)
 
hk_columncolumn (void)
 
hk_string columnname (void) const
 
hk_datasourcedatasource (void)
 
virtual void savedata (ostream &s)
 
virtual void loaddata (xmlNodePtr definition)
 
bool use_defaultvalue (void)
 
void set_defaultvalue (const hk_string &def, bool registerchange=true)
 
hk_string raw_defaultvalue (void)
 
hk_string defaultvalue (void)
 
void reset_default (bool registerchange=true)
 
void set_numberformat (bool use_numberseparator=false, int commadigits=-1, bool registerchange=true)
 
void set_numberformat (bool use_numberseparator, int commadigits, bool registerchange, bool force_setting)
 
bool use_numberseparator (void)
 
int commadigits (void)
 
int precision (void)
 
virtual hk_string value_at (unsigned long row)
 
virtual hk_string value (void)
 
virtual void set_value (const hk_string &)
 
unsigned int find (unsigned int from, unsigned int to, const hk_string &searchtext, bool wholephrase=false, bool casesensitive=false, bool backwards=false)
 
unsigned int find (const hk_string &searchtext, bool wholephrase=false, bool casesensitive=false, bool backwards=false)
 
void set_on_valuechanged_action (const hk_string &, bool registerchange=true, bool force_setting=true)
 
hk_string on_valuechanged_action (void)
 
virtual bool action_on_valuechanged (void)
 
virtual hk_string tag_value (int tagnumber, bool &ok)
 
bool set_filtervalue (const hk_string &)
 
hk_string filtervalue (bool withcolumnnames=false) const
 
virtual void update_filter (void)
 
- Public Member Functions inherited from hk_dsvisible
 hk_dsvisible (hk_presentation *presentation=NULL)
 
long presentationdatasource (void)
 
hk_datasourcedatasource (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)
 
- Public Member Functions inherited from hk_visible
 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)
 
hk_presentationpresentation (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_keykey () 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 &)
 
- Public Member Functions inherited from hk_class
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_sectionreplacefunctiontype (const hk_string &name, section_replacefunctiontype *f)
 
static list< hk_string > * sectionreplacefunctionlist (void)
 
static void add_sectioncountfunctiontype (const hk_string &name, reportsectioncounttype *f)
 
static list< hk_string > * sectioncountfunctionlist (void)
 
- Static Public Member Functions inherited from hk_dsdatavisible
static void set_defaultnumberformat (bool use_thousandsseparator, int precision)
 
static bool defaultuse_numberseparator (void)
 
static int defaultprecision (void)
 
static bool parsed_value (hk_string &v, hk_connection *c)
 
- Static Public Member Functions inherited from hk_visible
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 Public Member Functions inherited from hk_class
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

 hk_reportsection (hk_report *)
 
virtual void before_datasource_enables (void)
 
void remove_all_datas (void)
 
virtual hk_reportdatawidget_specific_new_data (void)
 
virtual void widget_specific_after_loaddata (void)
 
virtual void widget_specific_offset_changed (void)
 
virtual void sizetype_changed (void)
 
virtual bool presentationmode_changed (void)
 
void automatic_create_datafields (void)
 
void force_new_section (void)
 
void raise_widget (hk_reportdata *)
 
void lower_widget (hk_reportdata *)
 
- Protected Member Functions inherited from hk_dsdatavisible
void set_data_has_changed (void)
 
virtual bool datasource_disable (void)
 
virtual bool datasource_enable (void)
 
virtual void datasource_delete (void)
 
virtual bool before_columns_deleted (void)
 
virtual void widget_specific_set_column (void)
 
virtual void widget_specific_numberformat (void)
 
virtual void widget_specific_set_defaultvalue (void)
 
virtual void columndata_has_changed (void)
 
virtual void before_insert_row (void)
 
virtual void new_column_pointer_created (void)
 
- Protected Member Functions inherited from hk_dsvisible
void row_change (void)
 
void batch_next (void)
 
void batch_previous (void)
 
void insert_mode (void)
 
virtual void widget_specific_insert_mode (void)
 
virtual bool widget_specific_row_change (void)
 
virtual void widget_specific_batch_next (void)
 
virtual void widget_specific_batch_previous (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 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 before_source_vanishes (void)
 
virtual void widget_specific_presentationdatasource (long)
 
- Protected Member Functions inherited from hk_visible
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 *)
 
- Protected Member Functions inherited from hk_class
hk_interpreternew_interpreter (const hk_string &interpreter, hk_presentation *)
 

Protected Attributes

bool p_already_automaticcreated_data
 
vector< hk_reportdata * > p_data
 
bool p_unique
 
hk_string p_lastuniquevalue
 
hk_string p_sectionbegin
 
hk_string p_sectionend
 
hk_string p_betweendata
 
hk_reportp_report
 
hk_reportp_subreport
 
hk_string p_subreportstring
 
bool p_print_subreport_before_data
 
bool p_uniqueendsection
 
bool p_automatic_create_datas
 
bool p_newpageaftersection
 
bool p_sectionwasprinted
 
section_replacefunctiontype * p_replacefunction
 
hk_string p_replacefunctionstring
 
hk_string p_default_data
 
hk_string p_default_beforedata
 
hk_string p_default_afterdata
 
hk_string p_default_dataconfigurefunction
 
int p_default_precision
 
bool p_default_use_thousandsseparator
 
unsigned int p_offset
 
- Protected Attributes inherited from hk_dsdatavisible
hk_columnp_column
 
hk_string p_filterreplacevalue
 
hk_string p_filtervalueend
 
- Protected Attributes inherited from hk_dsvisible
hk_datasourcep_datasource
 
hk_datetime p_date
 
hk_string debug_p_columnname
 
- Protected Attributes inherited from hk_visible
hk_presentationp_presentation
 
enum_visibletype p_visibletype
 
bool p_setcoordinates
 
bool p_setwidgetcoordinates
 
bool while_init
 

Friends

class hk_report
 
class hk_reportsectionpair
 
class hk_reportdata
 

Additional Inherited Members

- Public Types inherited from hk_visible
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 }
 
- Public Types inherited from hk_class
enum  enum_interaction { noninteractive, interactive }
 
enum  enum_measuresystem { cm, inch }
 
enum  enum_tagtype { normaltag, mastertag }
 
- Protected Types inherited from hk_visible
enum  enum_has_changed { standard, forcesetting }
 
- Static Protected Attributes inherited from hk_class
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
 

Detailed Description

represents a section of the report.

hk_reportsection represents a section in a hk_report element. Within a section you can define the outputdata,use it as headers for your data and so in If it is needed as a section header or footer use set_unique in combination with set_uniquecolumn It also can contain subreports. Usually section come as "twins", a header section and a footer section belonging to each other, see hk_reportsectionpair for details

Example: Defining a CVS output (no first row with columnnames)
   //
   // first define a datasource
   //
  hk_drivermanager p_driver;
  hk_connection* connect=p_driver.new_connection("mysql");
  connect->set_user("root");
  connect->set_host("localhost");
  connect->set_password("my_password");
  connect->connect();
  hk_database* database=connect->new_database("vokabeltrainer");
   //
   //now start defining the report
   //
  hk_report e;
   long int datasrc =e.new_datasource("reportabfrage",true);//loads an existing query
   e.set_presentationdatasource(datasrc);
  hk_reportsection* s=e.datasection();
  s->set_default_data("\"VALUE%""); // define " before and after the value of a column
  s->set_betweendata(" , "); // a comma separated list
  s->set_sectionend("\n"); // one row per datarow
  e.execute();
  

you can use the variables

PAGENUMBER%         the number of the page
ABSOLUTEPAGENUMBER% physical number of the page in file
Version
Revision:
1.46
Author
Horst Knorr (hk_cl.nosp@m.asse.nosp@m.s@kno.nosp@m.da.o.nosp@m.rg)

Member Function Documentation

bool hk_reportsection::actual_string ( void  )
virtual
void hk_reportsection::add_depending_fields ( const hk_string &  thisreport_field,
const hk_string &  subreport_field,
bool  registerchange = true 
)

If you set a subreport with set_subreport add the fields which are connected between the reports

References hk_class::hkdebug().

void hk_reportsection::add_sectioncountfunctiontype ( const hk_string &  name,
reportsectioncounttype *  f 
)
static

needed by hk_report::set_periodic. It is possible to compute as how much a section counts.

Parameters
fis a userdefined function that will be called whenever counts_as is called.
hk_string hk_reportsection::betweendata ( void  )

A string that will be printed between two datasegments defined with new_data i.e. If you want a comma separated list you would need set_betweendata(" , ");

Referenced by actual_string().

hk_string hk_reportsection::default_reportdata ( void  )
inline

the default column value will be used as a default when a new data will be created with new_data default is @

Referenced by new_data().

bool hk_reportsection::endsection ( void  )
Returns
true if this section is a unique section and will be printed behind the data
unsigned int hk_reportsection::horizontal2relativ ( unsigned int  h)

100% is report width - left border - right border

References hk_class::hkdebug().

hk_reportdata * hk_reportsection::new_data ( void  )
bool hk_reportsection::new_page_after_section ( void  )

true if a new page will be started after printing this section. Usually this function should only be used in combination with set_unique as an endsection

bool hk_reportsection::new_uniquevalue ( bool  justcheck = false)
Parameters
justcheckif true no variables(lastvalue) will be changed
Returns
true if this section is a unique section and this section has to be printed

References hk_column::asstring(), hk_column::asstring_at(), hk_dsdatavisible::column(), hk_class::hkdebug(), hk_datasource::max_rows(), and hk_datasource::row_position().

Referenced by actual_string().

unsigned int hk_reportsection::relativ2horizontal ( unsigned int  r)

100% is report width - left border - right border

References hk_class::hkdebug().

unsigned int hk_reportsection::relativ2vertical ( unsigned int  r)

100% is report height - top border - bottom border

References hk_class::hkdebug().

void hk_reportsection::reset_count ( void  )

Will set all COUNT, SUM, AVERAGE and so on variables to 0, if they are not "running counts" (which mean global for the whole report).See hk_reportdata for details. Usually you dont't have to call this function

References hk_reportsectionpair::footersection(), hk_reportsectionpair::headersection(), hk_class::hkdebug(), reset_count(), and hk_report::sectionpairs().

Referenced by actual_string(), and reset_count().

bool hk_reportsection::section_was_printed ( void  )
Returns
true if this section has been printed (unique sections will not be printed for every row) else false
hk_string hk_reportsection::sectionbegin ( void  )

The sectionbegin will be printed as a header of the section (before the data)

Referenced by actual_string().

hk_string hk_reportsection::sectionend ( void  )

The sectionend will be printed as a footer of the section (after the data) i.e. a
at the end of a datarow

Referenced by actual_string().

void hk_reportsection::set_automatic_create_data ( bool  d = true,
bool  registerchange = true 
)

If set true and you haven't defined any data with new_data it will automatically create the data set with default_data

Referenced by hk_report::init_report().

void hk_reportsection::set_datasource ( hk_datasource d)
virtual

the datasource

Reimplemented from hk_dsdatavisible.

References hk_class::hkdebug(), and hk_dsdatavisible::set_datasource().

bool hk_reportsection::set_offset ( unsigned int  o,
bool  registerchange = true 
)

The offset is additional space at the end of the section (totalsectionsize= size needed by reportdata + offset)

void hk_reportsection::set_replacefunction ( const hk_string &  f,
bool  registerchange = true 
)

You can enhance the possibilities of the section by writing your own function.This function could for example handle your own variables.

References hk_class::hk_translate(), hk_class::hkdebug(), and hk_class::show_warningmessage().

void hk_reportsection::set_subreport ( const hk_string &  subreport = "",
bool  before_data = false,
bool  registerchange = true 
)

A complete other report can be printed within a section

Parameters
subreportthe subreport
before_dataif true the subreport will be printed before the data of this section will be printed, else it will be printed after the data

References hk_datasource::clear_depending_fields(), hk_class::hkdebug(), hk_presentation::set_database(), hk_datasource::set_depending_on(), and hk_report::set_masterreport().

void hk_reportsection::set_unique ( bool  unique = true,
bool  endsection = false,
bool  registerchange = true 
)

If the section should be printed just once per block and not for each datarow use this function

Parameters
uniquetrue if this section should be printed once interesting four grouped data
endsectiontrue if this section should not be printed as a header. Instead it will be printed at the end of the block. Sections created with hk_reportsectionpair are already set correctly.

References hk_class::hkdebug().

Referenced by hk_reportsectionpair::init_sections().

unsigned int hk_reportsection::vertical2relativ ( unsigned int  v)

100% is report height - top border - bottom border

References hk_class::hkdebug().


The documentation for this class was generated from the following files: