Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

hk_reportdata Class Reference

represents the data of a field within a section. More...

#include <hk_reportdata.h>

Inheritance diagram for hk_reportdata:

hk_dsdatavisible hk_dsvisible hk_visible hk_class List of all members.

Public Member Functions

void set_data (const hk_string &d, bool registerchange=true)
hk_string data (void)
void set_beforedata (const hk_string &b, bool registerchange=true)
void set_afterdata (const hk_string &a, bool registerchange=true)
hk_string beforedata ()
hk_string afterdata ()
hk_string actual_string (void)
void count (void)
void set_runningcount (bool c=true, bool registerchange=true)
bool runningcount (void)
virtual hk_font font (void)
void set_datacountfunction (const hk_string &f, bool registerchange)
hk_string datacountfunctionstring (void)
reportdatacounttypedatacountfunction (void)
void set_topline (bool l=true, bool registerchange=true)
void set_bottomline (bool l=true, bool registerchange=true)
void set_leftline (bool l=true, bool registerchange=true)
void set_rightline (bool l=true, bool registerchange=true)
void set_diagonalluro (bool l=true, bool registerchange=true)
void set_diagonalloru (bool l=true, bool registerchange=true)
bool diagonalloru (void)
bool topline (void)
bool bottomline (void)
bool leftline (void)
bool rightline (void)
bool diagonalluro (void)
void set_frame (bool l=true, bool registerchange=true)
void set_linebreak (bool b=true, bool registerchange=true)
bool linebreak (void)
void set_dynamic_height (bool dynamic, bool registerchange=true)
bool dynamic_height (void) const
void set_configurefunction (const hk_string &f, bool registerchange=true)
data_configurefunctiontypeconfigurefunction (void)
hk_string configurefunctionstring (void)
virtual void savedata (ostream &s, bool userdefined=false)
virtual void loaddata (const hk_string &definition, bool userdefined=false)
void neutralize_definition (bool registerchange)
void set_replacefunction (const hk_string &f, bool registerchange=true)
void reset_count ()
hk_reportreport (void)
hk_reportsectionsection (void)
virtual void lower_widget (bool registerchange=true)
virtual void raise_widget (bool registerchange=true)
void set_on_print_action (const hk_string &, bool registerchange=true)
hk_string on_print_action (void)
list< hk_string > * value_in_lines ()
unsigned int height (void)
bool data_fully_printed (void)
void reset_data_fully_printed (void)
int pagescount (void)
virtual hk_string tag_value (int tagnumber, bool &ok)
virtual hk_string column_value (const hk_string &colname, bool &ok)
void set_is_image (bool, bool registerchange=true)
bool is_image (void)

Static Public Member Functions

static void add_configurefunctiontype (const hk_string &name, data_configurefunctiontype *f)
static list< hk_string > * configurefunctionlist (void)
static void add_datacountfunctiontype (const hk_string &name, reportdatacounttype *f)
static list< hk_string > * datacountfunctionlist (void)
static void add_datareplacefunctiontype (const hk_string &name, data_replacefunctiontype *f)
static list< hk_string > * datareplacefunctionlist (void)

Protected Member Functions

 hk_reportdata (hk_reportsection *)
virtual ~hk_reportdata (void)
virtual void new_column_pointer_created (void)
virtual void sizetype_changed (void)
virtual bool presentationmode_changed (void)
virtual bool action_on_print (void)

Friends

class hk_reportsection

Detailed Description

represents the data of a field within a section.

represents the data of a field within a section

Version:
Revision
1.40
Author:
Horst Knorr (hk_classes@knoda.org)
you can use the columnnames delimited by # as variablenames. If a hk_report::recodefunction is set, the values will be recoded.
XPOS%		the absolute value of the x-coordinate
YPOS%  	the absolute value of the y-coordinate
WIDTH%         the absolute value of the width
HEIGHT%        the absolute value of the height
RELXPOS%       the relative value of the x-coordinate
RELYPOS%       the relative value of the y-coordinate
RELWIDTH%      the relative value of the width
RELHEIGHT%     the relative value of the height
PAGENUMBER%     the number of the page
ABSOLUTEPAGENUMBER%     physical number of the page in file
ROWNUMBER%      the actual row number of the datasource

column#         the value of the column as shown in the following two examples
#field1#         the value of the column with the name 'field1'
#first_name#     the value of the column with the name 'first_name'
If you have set set_columnname you have additionally the following variable names
VALUE%          the value of the column defined with set_columnname 
with hk_report::set_recodefunction
FIELDNAME%      the  name of the column
defined with set_columnname
COUNT%          the number of values
If the column is of type integer or real you have the following variables
SUM%            the sum of all values
MIN%            the minimum value
MAX%            the maximum value
STDDEV%         standard deviation
STDDEVSAMPLE%   standard deviation of a sample
AVERAGE%        the average of all values


Constructor & Destructor Documentation

hk_reportdata::hk_reportdata hk_reportsection  )  [protected]
 

virtual hk_reportdata::~hk_reportdata void   )  [protected, virtual]
 


Member Function Documentation

virtual bool hk_reportdata::action_on_print void   )  [protected, virtual]
 

hk_string hk_reportdata::actual_string void   ) 
 

returns the value that will be printed in the section

static void hk_reportdata::add_configurefunctiontype const hk_string name,
data_configurefunctiontype f
[static]
 

static void hk_reportdata::add_datacountfunctiontype const hk_string name,
reportdatacounttype f
[static]
 

static void hk_reportdata::add_datareplacefunctiontype const hk_string name,
data_replacefunctiontype f
[static]
 

hk_string hk_reportdata::afterdata  ) 
 

hk_string hk_reportdata::beforedata  ) 
 

bool hk_reportdata::bottomline void   ) 
 

virtual hk_string hk_reportdata::column_value const hk_string colname,
bool &  ok
[virtual]
 

Reimplemented from hk_visible.

data_configurefunctiontype* hk_reportdata::configurefunction void   ) 
 

static list<hk_string>* hk_reportdata::configurefunctionlist void   )  [static]
 

hk_string hk_reportdata::configurefunctionstring void   ) 
 

void hk_reportdata::count void   ) 
 

Will be internally called to create the values for the variables COUNT%,SUM% etc.

hk_string hk_reportdata::data void   ) 
 

bool hk_reportdata::data_fully_printed void   ) 
 

reportdatacounttype* hk_reportdata::datacountfunction void   ) 
 

static list<hk_string>* hk_reportdata::datacountfunctionlist void   )  [static]
 

hk_string hk_reportdata::datacountfunctionstring void   ) 
 

static list<hk_string>* hk_reportdata::datareplacefunctionlist void   )  [static]
 

bool hk_reportdata::diagonalloru void   ) 
 

bool hk_reportdata::diagonalluro void   ) 
 

bool hk_reportdata::dynamic_height void   )  const
 

virtual hk_font hk_reportdata::font void   )  [virtual]
 

Reimplemented from hk_visible.

unsigned int hk_reportdata::height void   ) 
 

Reimplemented from hk_visible.

bool hk_reportdata::is_image void   ) 
 

bool hk_reportdata::leftline void   ) 
 

bool hk_reportdata::linebreak void   ) 
 

virtual void hk_reportdata::loaddata const hk_string definition,
bool  userdefined = false
[virtual]
 

virtual void hk_reportdata::lower_widget bool  registerchange = true  )  [virtual]
 

if the widget is part of a presentation this widget will be moved into the background

Reimplemented from hk_visible.

void hk_reportdata::neutralize_definition bool  registerchange  ) 
 

virtual void hk_reportdata::new_column_pointer_created void   )  [protected, virtual]
 

Reimplemented from hk_dsdatavisible.

hk_string hk_reportdata::on_print_action void   ) 
 

int hk_reportdata::pagescount void   ) 
 

virtual bool hk_reportdata::presentationmode_changed void   )  [protected, virtual]
 

Reimplemented from hk_dsdatavisible.

virtual void hk_reportdata::raise_widget bool  registerchange = true  )  [virtual]
 

if the widget is part of a presentation this widget will be moved into the front

Reimplemented from hk_visible.

hk_report* hk_reportdata::report void   ) 
 

returns the report this datafield belongs to

void hk_reportdata::reset_count  ) 
 

void hk_reportdata::reset_data_fully_printed void   ) 
 

bool hk_reportdata::rightline void   ) 
 

bool hk_reportdata::runningcount void   ) 
 

virtual void hk_reportdata::savedata ostream &  s,
bool  userdefined = false
[virtual]
 

hk_reportsection* hk_reportdata::section void   ) 
 

returns the section this datafield belongs to

void hk_reportdata::set_afterdata const hk_string a,
bool  registerchange = true
 

void hk_reportdata::set_beforedata const hk_string b,
bool  registerchange = true
 

void hk_reportdata::set_bottomline bool  l = true,
bool  registerchange = true
 

if true a line should be painted under the data

See set_configurefunction for details

void hk_reportdata::set_configurefunction const hk_string f,
bool  registerchange = true
 

in this function you have to define how to react on i.e. set_bottomline etc.

void hk_reportdata::set_data const hk_string d,
bool  registerchange = true
 

Set the data that should be printed when the section will be printed You can use all of the above named variables. Usually you connect a report_data part with a column via set_columnname The most easy way is to set the data to VALUE%. A more intermediate way will be shown in the following example

Example:

You want to automatically create links in a html report. For this reason you have a datasource with 2 columns "url", and "name". "url" has the URL, "name" contains a description i.e.

URL			name
http://www.suse.de 	SuseLinux
http://www.redhat.com	RedhatLinux
http://www.debian.org	Debian
*
To create a html link use set_data("<A HREF=\"#url#\">#name#</A>");

void hk_reportdata::set_datacountfunction const hk_string f,
bool  registerchange
 

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

Parameters:
f is a userdefined function that will be called whenever counts_as is called.

void hk_reportdata::set_diagonalloru bool  l = true,
bool  registerchange = true
 

if true a diagonal should be painted from _l_inks _o_ben to _r_echts _u_nten (left top to right down)

See set_configurefunction for details

void hk_reportdata::set_diagonalluro bool  l = true,
bool  registerchange = true
 

if true a diagonal should be painted from _l_inks _u_nten to _r_echts _o_ben (left down to right up)

See set_configurefunction for details

void hk_reportdata::set_dynamic_height bool  dynamic,
bool  registerchange = true
 

void hk_reportdata::set_frame bool  l = true,
bool  registerchange = true
 

if true a frame should be painted around the text (bottomline + topline + leftline + rightline)

See set_configurefunction for details

void hk_reportdata::set_is_image bool  ,
bool  registerchange = true
 

void hk_reportdata::set_leftline bool  l = true,
bool  registerchange = true
 

if true a line should be painted left of the data

See set_configurefunction for details

void hk_reportdata::set_linebreak bool  b = true,
bool  registerchange = true
 

if true the textline should be broken if the line is longer than the width

See set_configurefunction for details

void hk_reportdata::set_on_print_action const hk_string ,
bool  registerchange = true
 

void hk_reportdata::set_replacefunction const hk_string f,
bool  registerchange = true
 

See also:
hk_reportsection::set_replacefunction

void hk_reportdata::set_rightline bool  l = true,
bool  registerchange = true
 

if true a line should be painted right the data

See set_configurefunction for details

void hk_reportdata::set_runningcount bool  c = true,
bool  registerchange = true
 

The values of the variables SUM% COUNT% AVERAGE% STDDEV% etc. can be relatively to the section. i.e. if the section is a uniquesection and it changes all variables can be reset to 0 (default).

Parameters:
c if true these variables will change to global variables in the report and not be set to 0 when the section changes.

void hk_reportdata::set_topline bool  l = true,
bool  registerchange = true
 

if true a line should be painted above the data

See set_configurefunction for details

virtual void hk_reportdata::sizetype_changed void   )  [protected, virtual]
 

Reimplemented from hk_visible.

virtual hk_string hk_reportdata::tag_value int  tagnumber,
bool &  ok
[virtual]
 

Reimplemented from hk_visible.

bool hk_reportdata::topline void   ) 
 

list<hk_string>* hk_reportdata::value_in_lines  ) 
 


Friends And Related Function Documentation

friend class hk_reportsection [friend]
 


The documentation for this class was generated from the following file:
Generated on Thu Mar 9 18:40:42 2006 for hk_classes by  doxygen 1.4.1