Good afternoon,
I'm using OpenERP 7.0 with Jasper_reports for the preparation of reports.
The connection I use is using JDBC datasource to access the database without problems.
The version used in Jasper_reports is to NanTic.
The issue is I have a report created with iReport and if I run it in iReport with <preview> works perfectly !!!
Query details
SELECT
iqcirugia."id" AS iqcirugia_id,
iqcirugia."create_uid" AS iqcirugia_create_uid,
iqcirugia."create_date" AS iqcirugia_create_date,
iqcirugia."write_date" AS iqcirugia_write_date,
iqcirugia."write_uid" AS iqcirugia_write_uid,
iqcirugia."autoriza" AS iqcirugia_autoriza,
...
...
res_company."attachment_num" AS res_company_attachment_num,
res_company."logo_topbar" AS res_company_logo_topbar
FROM
"public"."iqcirugia" iqcirugia INNER JOIN "public"."iqcirugia_location" iqcirugia_location ON iqcirugia."id" = iqcirugia_location."cirugia_id"
INNER JOIN "public"."stock_location" stock_location ON iqcirugia_location."location_id" = stock_location."id"
INNER JOIN "public"."res_company" res_company ON iqcirugia."company_id" = res_company."id"
WHERE
$X{ IN ,(iqcirugia.id::varchar),PIDS}
In the report, I have created 2 parameters (IDS, PIDS)
Parameter 1 -> IDS
Parameter 2 -> PIDS
The problem is that when I run it from OpenERP did not properly collects the record ID I'm positioned.
I mean, if I'm positioned in register 1 to 9 works fine, but when that position myself in the ID 11, 12, 13.... loses first character ... I mean if I give ID 13 to print the record, the report prints ID 3??
jasper_report.py details:
def executeReport(self, dataFile, outputFile, subreportDataFiles):
locale = self.context.get('lang', 'en_US')
connectionParameters = {
'output': self.outputFormat,
#'xml': dataFile,
'csv': dataFile,
'dsn': self.dsn(),
'user': self.userName(),
'password': self.password(),
'subreports': subreportDataFiles,
}
parameters = {
'STANDARD_DIR': self.report.standardDirectory(),
'REPORT_LOCALE': locale,
#'IDS': self.ids,
'IDS': ','.join(map(str,self.ids)),
As you can see, I have included modifications to the code jaspert_report.py in ExecuteReport method but since I did not reflect correctly the ID.
If I put the default, for example:
..
result = {'13'}
..
y then
'IDS': ','.join(map(str,result)),
It still prints register ID=3.
Do you have encountered this problem?
Thanks in advance
Juan