Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

OpenERP 7.0, jasper_report, iReport and SQL parameters

Subscribe

Get notified when there's activity on this post

This question has been flagged
parameterssqlireportjasper_reports
7585 Views
Avatar
jsallent

Hello,

I am using the iReport integrated with jasper_report module in OpenERP 7.0. with XML without problems.

But, I created a report using iReport 5.5 with a JDBC SQL connection to my postgresql database with a sql query as the datasource. In iReport, I added a parameter named IDS to capture the data passed from OpenERP to the report. This parameter data type is set java.lang.Object..

I added another parameter named PIDS with a data type of java.util.List and a default expression of $P{IDS}.toList(). Finally, the report language is set to Groovy.

In the WHERE clause of the query, I used the $X syntax to retrieve records for all the passed ids:
where $X{IN, id, PIDS}

I have a following compile error:

Imágenes integradas 1

  The SQL QUERY ->

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,

     iqcirugia."paciente" AS iqcirugia_paciente,

     iqcirugia."nhc" AS iqcirugia_nhc,

     iqcirugia."payment_term" AS iqcirugia_payment_term,

     iqcirugia."fec_oper" AS iqcirugia_fec_oper,

     iqcirugia."centro" AS iqcirugia_centro,

     iqcirugia."partner_invoice_id" AS iqcirugia_partner_invoice_id,

     iqcirugia."tarjeta" AS iqcirugia_tarjeta,

     iqcirugia."otros" AS iqcirugia_otros,

     iqcirugia."partner_id" AS iqcirugia_partner_id,

     iqcirugia."name" AS iqcirugia_name,

     iqcirugia."fiscal_position" AS iqcirugia_fiscal_position,

     iqcirugia."user_id" AS iqcirugia_user_id,

     iqcirugia."tipo_id" AS iqcirugia_tipo_id,

     iqcirugia."doctor" AS iqcirugia_doctor,

     iqcirugia."company_id" AS iqcirugia_company_id,

     iqcirugia."state" AS iqcirugia_state,

     iqcirugia."payment_type" AS iqcirugia_payment_type,

     iqcirugia."pricelist_id" AS iqcirugia_pricelist_id,

     iqcirugia."poliza" AS iqcirugia_poliza,

     iqcirugia_location."id" AS iqcirugia_location_id,

     iqcirugia_location."create_uid" AS iqcirugia_location_create_uid,

     iqcirugia_location."create_date" AS iqcirugia_location_create_date,

     iqcirugia_location."write_date" AS iqcirugia_location_write_date,

     iqcirugia_location."write_uid" AS iqcirugia_location_write_uid,

     iqcirugia_location."cirugia_id" AS iqcirugia_location_cirugia_id,

     iqcirugia_location."location_id" AS iqcirugia_location_location_id,

     iqcirugia_location."name" AS iqcirugia_location_name,

     stock_location."id" AS stock_location_id,

     stock_location."parent_left" AS stock_location_parent_left,

     stock_location."parent_right" AS stock_location_parent_right,

     stock_location."create_uid" AS stock_location_create_uid,

     stock_location."create_date" AS stock_location_create_date,

     stock_location."write_date" AS stock_location_write_date,

     stock_location."write_uid" AS stock_location_write_uid,

     stock_location."comment" AS stock_location_comment,

     stock_location."chained_delay" AS stock_location_chained_delay,

     stock_location."chained_company_id" AS stock_location_chained_company_id,

     stock_location."active" AS stock_location_active,

     stock_location."posz" AS stock_location_posz,

     stock_location."posx" AS stock_location_posx,

     stock_location."posy" AS stock_location_posy,

     stock_location."valuation_in_account_id" AS stock_location_valuation_in_account_id,

     stock_location."partner_id" AS stock_location_partner_id,

     stock_location."icon" AS stock_location_icon,

     stock_location."valuation_out_account_id" AS stock_location_valuation_out_account_id,

     stock_location."scrap_location" AS stock_location_scrap_location,

     stock_location."name" AS stock_location_name,

     stock_location."chained_location_id" AS stock_location_chained_location_id,

     stock_location."chained_journal_id" AS stock_location_chained_journal_id,

     stock_location."chained_picking_type" AS stock_location_chained_picking_type,

     stock_location."company_id" AS stock_location_company_id,

     stock_location."chained_auto_packing" AS stock_location_chained_auto_packing,

     stock_location."complete_name" AS stock_location_complete_name,

     stock_location."usage" AS stock_location_usage,

     stock_location."location_id" AS stock_location_location_id,

     stock_location."chained_location_type" AS stock_location_chained_location_type

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"

WHERE $X{IN, iqcirugia.id, PIDS}

 

Sorry for my english.

 

I appreciate any help.

 

Best regards

Juan Sallent

 

 

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Print image from postgreSQL to iReport ?
ireport jasper_reports
Avatar
Avatar
Avatar
2
May 18
9227
Error in Printing Jasper Report with Sub Reports in openerp
ireport python2.7 jasper_reports
Avatar
Avatar
Avatar
2
May 18
13619
How can I use Jarper Reports and iReport in Odoo 9?
reports ireport jasper_reports odoo9
Avatar
Avatar
2
Jun 16
6340
iReport designer 4.0.2 not work with “print repeated value” for Sale Order Line
reports ireport openerp7 jasper_reports odoo
Avatar
0
Aug 17
9633
Unable to Delete Company Parameter Solved
parameters
Avatar
Avatar
1
May 24
3050
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now