Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Two SQL queries in one report

  1. #1
    Join Date
    Mar 2003
    Posts
    4,947

    Default Two SQL queries in one report

    Hi

    I'm still going through documentation and I found quite difficult to find if it's possible to put few queries into one report. Is it possible to do it? I have to put into report few piecies of information from different tables and I have to use few queries for it. One group has to have client information which will be queried by clientID and the rest just some client specific financial data.

    Thanks in advance for help
    Radek

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Hi,

    one table - thats the limit for JFreeReport 0.8. You have to join the database tables and supply a denormalized resultset to JFreeReport.

    Code:
    SELECT Customer.ID, Customer.Name, Transaction.Customer, Transaction.Description FROM Customers, Transactions WHERE Customer.ID = Transaction.Customer ORDER BY Customer.ID
    Then you can, for instance add a group for the customer to the report. The groups field list would contain the Customer-ID, and therefore a group header and footer is created for each customer.

    Regards,
    Thomas

  3. #3
    Join Date
    Mar 2003
    Posts
    4,947

    Default

    Thanks for quick reply. I would like to use JFreeReports in the future if only it will have some way of handling multiple queries or maybe using subreports. Good work

  4. #4
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Hi,

    this is part of the upcoming JFreeReport 0.9 - the release is currently scheduled for July*.

    Regards,
    Thomas

    *) As usual: This is what I think now - it may change, in case some strange issues pop up.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.