I’ve managed to modify the reports path by going in the admin page and changing it in the plugin page.
But now I have a new problem!
My SQL query for the report is like that:
SELECT
tbl_proposals."fld_id" AS tbl_proposals_fld_id,
tbl_epc."fld_parent_id" AS tbl_epc_fld_parent_id,
tbl_epc."fld_project_description" AS tbl_epc_fld_project_description,
tbl_epc."cal_epc_no" AS tbl_epc_cal_epc_no,
parent.cal_epc_no AS parent_cal_epc_no
FROM
"public"."tbl_epc" tbl_epc INNER JOIN "public"."tbl_proposals" tbl_proposals ON tbl_epc."fld_id" = tbl_proposals."fld_epc_id"
INNER JOIN tbl_epc AS parent ON tbl_epc.fld_parent_id = parent.fld_id
WHERE
tbl_proposals."fld_id" = $P{Proposal_id}
My code to generate the report in my solution is like that:
function GenerateReport()
{
var params = new java.util.HashMap();
params.put('Proposal_id', fld_id);
params.put('Original_PO', tbl_proposals_to_tbl_epc_orders.fld_order_no);
params.put('Author', globals.CurrentUserName);
params.put('Checker', v_checker);
params.put('Approver', v_approver);
params.put('Labour_Cost', v_labour_cost);
params.put('Hardware_Cost', v_hw_cost);
params.put('Site_Cost', v_site_cost);
params.put('Total_Cost', v_total_cost);
plugins.jasperPluginRMI.runReport(controller.getServerName(),'CV-Report.jrxml' ,null,'viewer',params);
All paramareters with solution variables beginning by ‘v_’ are simple form variables (like v_checker) used as dataproviders in fields to get input from the user to fill the report.
1st the report generated does not print any cost entered (type tried in iReport were ‘number’ then ‘float’, pattern ‘currency’)
However the Author and Checker fields are printed well in the report.
All fields in the solution are simple TEXT_FIELDS without any format.
I’ve tried to put back the pattern of one of the cost field in iReport, to default (nothing). I’ve saved the report, restarted Servoy, but it still display the report with the currency symbol (a ‘£’) in the field like the ones which have not been changed.
Also, the Proposal_Id passed to the report does still the same even if I change of record. It looks like it keeps the report version when I just tested it from iReport (with prompts).