11 #ifndef HK_REPORTSECTION
12 #define HK_REPORTSECTION
13 #include "hk_definitions.h"
14 #include "hk_dsdatavisible.h"
21 #include "hk_presentation.h"
35 typedef hk_string section_replacefunctiontype(
hk_reportsection*,
const hk_string& );
105 void set_unique(
bool unique=
true,
bool endsection=
false,
bool registerchange=
true);
115 vector<hk_reportdata*>* datalist(
void);
123 hk_string sectionbegin(
void);
124 void set_sectionbegin(
const hk_string& b,
bool registerchange=
true);
129 hk_string sectionend(
void);
130 void set_sectionend(
const hk_string& e,
bool registerchange=
true);
135 hk_string betweendata(
void);
136 void set_betweendata(
const hk_string& b,
bool registerchange=
true);
142 bool new_uniquevalue(
bool justcheck=
false);
146 bool endsection(
void);
152 void set_automatic_create_data(
bool d=
true,
bool registerchange=
true);
157 bool new_page_after_section(
void);
158 void set_new_page_after_section(
bool p,
bool registerchange=
true);
162 bool section_was_printed(
void);
169 void set_subreport(
const hk_string& subreport=
"",
bool before_data=
false,
bool registerchange=
true);
170 hk_string subreportname(
void);
175 void add_depending_fields(
const hk_string& thisreport_field,
const hk_string& subreport_field,
bool registerchange=
true);
176 void clear_depending_fields(
void);
177 list<hk_string>* depending_on_thisreportfields(
void);
178 list<hk_string>* depending_on_subreportfields(
void);
180 bool print_subreport_before_data(
void){
return p_print_subreport_before_data;}
181 bool print_subreport(
void);
188 virtual hk_string replace(
const hk_string& where);
190 static void add_sectionreplacefunctiontype(
const hk_string& name,section_replacefunctiontype* f);
191 static list<hk_string>* sectionreplacefunctionlist(
void);
197 void reset_count(
void);
199 virtual unsigned long counts_as(
void);
204 static void add_sectioncountfunctiontype(
const hk_string& name,reportsectioncounttype* f);
205 static list<hk_string>* sectioncountfunctionlist(
void);
207 void set_sectioncountfunction(
const hk_string& f,
bool registerchange=
true);
208 hk_string sectioncountfunctionstring(
void);
209 reportsectioncounttype* sectioncountfunction(
void);
210 virtual void savedata(ostream& s,
bool userdefined=
false);
211 virtual void loaddata(xmlNodePtr definition,
bool userdefined=
false);
213 virtual bool set_presentationdatasource(
long n,
bool registerchange=
true);
219 void set_default_reportdata(
const hk_string& v,
bool registerchange=
true);
220 hk_string default_beforereportdata(
void){
return p_default_beforedata;}
221 void set_default_beforereportdata(
const hk_string& v,
bool registerchange=
true);
222 hk_string default_afterreportdata(
void){
return p_default_afterdata;}
223 void set_default_afterreportdata(
const hk_string& v,
bool registerchange=
true);
224 void set_default_reportdataconfigurefunction(
const hk_string& f,
bool registerchange=
true);
225 hk_string default_reportdataconfigurefunction(
void);
226 int default_reportprecision(
void);
227 void set_default_reportprecision(
int,
bool registerchange=
true);
229 bool default_use_reportseparator(
void);
230 void set_default_use_reportseparator(
bool,
bool registerchange=
true);
232 void neutralize_definition(
bool registerchange);
233 virtual void reset(
void);
234 void clear_countingfields(
void);
240 unsigned int horizontal2relativ(
unsigned int h);
244 unsigned int vertical2relativ(
unsigned int v);
248 unsigned int relativ2horizontal(
unsigned int r);
252 unsigned int relativ2vertical(
unsigned int r);
257 bool set_offset(
unsigned int o,
bool registerchange=
true);
258 unsigned int offset(
void);
259 void bulk_operation(hk_presentation::enum_bulkoperation bulkoperation);
260 void set_automaticcreatedatafunction(reportsectionautomaticcreatedatatype*);
261 reportsectionautomaticcreatedatatype* automaticcreatedatafunction(
void){
return p_automaticreatedatafunction;}
263 hk_reportdata* get_reportdatavisible(
const hk_string& identifier);
264 bool is_fully_printed(
void);
265 void set_print_section(
bool);
266 bool print_section(
void);
272 virtual void before_datasource_enables(
void);
273 void remove_all_datas(
void);
275 virtual void widget_specific_after_loaddata(
void){}
276 virtual void widget_specific_offset_changed(
void){}
277 virtual void sizetype_changed(
void);
278 virtual bool presentationmode_changed(
void);
279 void automatic_create_datafields(
void);
280 void force_new_section(
void);
282 bool p_already_automaticcreated_data;
284 vector<hk_reportdata*> p_data;
287 hk_string p_lastuniquevalue;
288 hk_string p_sectionbegin;
289 hk_string p_sectionend;
290 hk_string p_betweendata;
293 hk_string p_subreportstring;
294 bool p_print_subreport_before_data;
295 bool p_uniqueendsection;
296 bool p_automatic_create_datas;
297 bool p_newpageaftersection;
298 bool p_sectionwasprinted;
299 section_replacefunctiontype* p_replacefunction;
300 hk_string p_replacefunctionstring;
301 hk_string p_default_data;
302 hk_string p_default_beforedata;
303 hk_string p_default_afterdata;
304 hk_string p_default_dataconfigurefunction;
305 int p_default_precision;
306 bool p_default_use_thousandsseparator;
307 unsigned int p_offset;
312 void create_countingfields(
void);
313 void count_countingfields(
void);
314 void clear_counting(
void);
315 reportsectioncounttype* p_sectioncountfunction;
316 hk_string p_sectioncountfunctionstring;
318 bool p_automatic_created_datasource;
319 vector<struct_countnumbers> p_countings;
321 typedef map<hk_string,reportsectioncounttype*,less<hk_string> > sectioncountlisttype ;
322 static sectioncountlisttype p_sectioncountfunctions;
323 static list<hk_string> p_sectioncountfunctionlist;
325 typedef map<hk_string,section_replacefunctiontype*,less<hk_string> > sectionreplacelisttype ;
326 static sectionreplacelisttype p_sectionreplacefunctions;
327 static list<hk_string> p_sectionreplacefunctionlist;
328 list<hk_string> p_depending_thisreport_fields;
329 list<hk_string> p_depending_subreport_fields;
331 bool p_forcenewsection;
332 reportsectionautomaticcreatedatatype* p_automaticreatedatafunction;
virtual void raise_widget(bool registerchange=true)
Definition: hk_reportdata.cpp:957
contains a header and a footer section
Definition: hk_reportsectionpair.h:26
represents a font
Definition: hk_font.h:26
void set_replacefunction(const hk_string &f, bool registerchange=true)
Definition: hk_reportdata.cpp:465
virtual void set_datasource(hk_datasource *d)
Definition: hk_dsdatavisible.cpp:99
Definition: hk_reportsection.h:37
represents a section of the report.
Definition: hk_reportsection.h:92
represents the data of a field within a section.
Definition: hk_reportdata.h:75
virtual void lower_widget(bool registerchange=true)
Definition: hk_reportdata.cpp:949
hk_string default_reportdata(void)
Definition: hk_reportsection.h:218
hk_string actual_string(void)
Definition: hk_reportdata.cpp:245
represents a resultquery or a table of a database.
Definition: hk_datasource.h:45
Definition: hk_definitions.h:211
hk_report * report(void)
Definition: hk_reportdata.cpp:925
base class for visible widgets with data connection
Definition: hk_dsdatavisible.h:32
basic class to create reports
Definition: hk_report.h:52
Definition: hk_definitions.h:205
represents one column of a datasource.
Definition: hk_column.h:34