Report Subroutines

DBMS Library subroutines related to reporting.

Subroutine Name Parameter Name Valid Input Value Description
Array2report_idSql()     Inserts each key from the $arr list into the public.report_id table. Returns $group_id and $report_ids.
  $group_id   Group ID.
  $arr   A list of parameters.
FindReportmanFile()     Uses request_to_comp_path() subroutine with different combinations of the parameter $report and the Apache config variable ReportmanADOserver to find the right Reportman configuration file.
  $report   The report name.
  ReportmanADOserver   If this Apache configuration variable exists the subroutine searches for and validates the Wine report configuration files. Otherwise the subroutine searches for and validates the Kylix report configuration files.
ReportMethod()     Analyzes the report name to determine which reporting method is used (Reportman or ODT Report. The subroutine first tries to determine the reporting method from the $report suffix. If there is no suffix present it uses the value of the Apache config variable DefaultReportEngine. If it finds unknown report suffix or if the DefaultReportEngine is not defined it raises an error.
  $report   The report name. Optional suffix determines the reporting method. See the button example to understand how the $report name is constructed.
    my_report_name.rep The report will be created with the Report Manager and printed in .pdf format.
    my_report_name.odt The report will be created with the ODT Report and printed in .odt format.
    my_report_name.pdf The report will be created with the ODT Report and printed in .pdf format.
NewGroupId()     Uses Apache config variable PrintNextValQuery to obtain new group ID value.
By default, if the config variable is missing, it uses select nextval('public.report_id_id_seq') query.
SqlSelect2report_id()     It uses the NewGroupId() to get a new $group_id value. Initializes the report_id table with the IDs of the records to be printed. Returns $group_id and $report_ids to be passed as parameters to the PDF method. The returned parameter $group_id contains a $GROUP_ID value. The returned parameter $report_ids contains a reference to an array of a $REPORT_ID values.
  $Params->{'reportlist'}   If the reportlist parameter is defined the function returns Array2report_idSql()
  $Params->{'type'}   Otherwise, if the reportlist parameter is not defined, the $Params->{'type'} is set to records
  $Params->{'where'} and $Params->{'numrec'}   Both parameters are used for making SqlSelect2report_id numrec query.
The result of the query is saved to $SQL{MAX_ROWS}
  $Params->{'where'}   Is also used for making SqlSelect2report_id print query.
Topic revision: r11 - 22 Sep 2016, JanezStangelj
This site is powered by FoswikiCopyright (©) Leader.IT - Italy P.I. IT01434390223 Privacy policy & use of cookies