hk_reportdata

Represents the data of a field within a section.

Inherits from hk_dsdatavisible.

set_data(data [,registerchange])

Sets the data string, that should be printed. Available variables for data:

  • columnnames delimited by #, eg. #mycolumn#

  • %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

If you have set a column with set_columnname() you have additionally the following variable names

  • %value% the raw value of the column defined with @ref set_columnname

  • %fieldname% the name of the column not recoded defined with set_columnname

  • %VALUE% the value of the column defined with @ref set_columnname recoded

  • %FIELDNAME% the recoded (with @ref hk_report::set_recodefunction ) name of the column

  • %COUNT% the number of values

  • %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

data()

returns the data

set_beforedata(bdata [,registerchange])

The value that will be printed immediately before the data. That can be escape sequences, delimiters etc. Example: CSV files (comma separated values) usually have the following format: "data1","data2" In this case the '"' would be printed before and after the data, so this would be defined with set_beforedata("\"") and set_afterdata("\""). The "," is set with hk_reportsection.set_betweendata(","). Use this function only if hk_report.reporttype() is set to "Userdefined".

beforedata()

returns the value that will be printed immedialtely before the data.

set_afterdata(adata [,registerchange])

The value that will be printed immediately after the data. That can be escape sequences, delimiters etc. Example: CSV files (comma separated values) usually have the following format: "data1","data2" In this case the '"' would be printed before and after the data, so this would be defined with set_beforedata("\"") and set_afterdata("\""). The "," is set with hk_reportsection.set_betweendata(","). Use this function only if hk_report.reporttype() is set to "Userdefined".

afterdata()

returns the value that will be printed immedialtely after the data.

actual_string()

returns the printed string. This function shouldn't be called from the user!

count()

returns the value that should be added to hk_report.offset

set_runningcount([ do_count,[registerchange]])

The values of the variables %SUM% %COUNT% %AVERAGE% %STDDEV% etc. can be relatively to the section. e.g. if the section is a uniquesection and it changes, all variables can be reset to 0 (default). if 'do_count' is true these variables will change to global variables in the report and are not set to 0 when the section changes.

runningcount()

returns true if runningcount is set

set_topline([set_it [,registerchange]])

If 'set_it' is True a line should be painted above the data

set_bottomline([set_it [,registerchange]])

If 'set_it' is True a line should be painted below the data

set_leftline([set_it [,registerchange]])

If 'set_it' is True a line should be painted left of the data

set_rightline([set_it [,registerchange]])

If 'set_it' is True a line should be painted right of the data

set_diagonalluro([set_it [,registerchange]])

If 'set_it' is true a diagonal will be painted from _l_inks _u_nten to _r_echts _o_ben (left down to right up)

set_diagonalloru([set_it [,registerchange]])

If 'set_it' is true a diagonal will be painted from _l_inks _o_ben to _r_echts _u_nten (left up to right down)

topline()

returns true if a line at the top of the data is printed

bottomline()

returns true if a line at the bottom of the data is printed

leftline()

returns true if a line at the left of the data is printed

rightline()

returns true if a line at the right of the data is printed

diagonalloru()

returns true if a diagonal line from left top to right bottom is printed

diagonalluro()

returns true if a diagonal line from left bottom to right top is printed

set_frame(set_it)

convenience function: calls set_leftline(set_it),set_rightline(set_it)set_topline(set_it)set_bottomline(set_it)

set_wordbreak(set_it)

If 'set_it' is true and the reporttype supports it, text will be written in more than one line if the width of the data field is too small

wordbreak()

returns true is set_wordbreak() is set

set_configurefunction(functionname)

internal function

configurefunctionstring()

returns the name of the configure function