Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Applying report to existing XACTION

  1. #1

    Default Applying report to existing XACTION

    I have created an XACTION that is somewhat convoluted and ugly, and don't want to have to recreate. It generates a list of data perfectly. However, now I need to apply some formatting to it to pretty it up.

    I'd like to use the Report Designer (or iReports from Jasper) but it appears that the Report Designer wants to create a new query (or use a CSV/XML file); I don't see a way to use an existing XACTION.

    Is this something that can be easily done, or am I going to have to kludge something together by creating a fake query that generates the fields I need and manually editing the resultant XML?

    Thanks,

    -d-
    Have you hugged your computer geek today?

  2. #2

    Default

    yeah your pretty much looking at the latter, although if you know the field names you don't actually have to put a query in there, just publish it, although it would make preview's a bit of an arse

    Tom
    This is a signature.... everyone gets it.

    Join the Unofficial Pentaho IRC channel on freenode.
    Server: chat.freenode.net Channel: ##pentaho

    Please try and make an effort and search the wiki and forums before posting!
    Checkout the Saiku, the future of Open Source Interactive OLAP(http://analytical-labs.com)

    http://mattlittle.files.wordpress.co...-bananaman.jpg

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

    Default

    Right now, if you publish a report, the XAction contains all the data-description (ie, what query to use, what parameters to set) while the *.xml file (the report) does only contain the report layout and no references to the query or datasource.

    So as Tom pointed out, just design the report and then take the published XML file and add your own XAction file.

    Just make sure that your XAction references the newly published report-definition file and you should be up and running. For the report-designer, there is no way to run a XAction to a given point and then grab the contents of a process variable. Running XActions is like running a programm - the outcome can be dependent on so many factors of the runtime environment that you could go crazy just thinking about it.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  4. #4

    Default

    I did get it working; it was far less painful than expected. The only issues I had were the vagueness of the errors when outputs didn't quite line up as expected. For example, the one I had the hardest time finding had:

    Code:
    <query-result type="result-set" mapping="qryresult"/>
    ...instead of ...

    Code:
    <query-result type="result-set" mapping="query_result"/>
    ... which the JFreeReportComponent section was expecting as an input. Reading through the code, I automatically glossed over the "qry/query" difference. Amazing what the brain fills in for you.

    It seems to me that if an input is expected and not found, there should be something more thorough than "ActionDefinition for JFreeReportComponent did not execute successfully"; If the XACTION file is expecting an input variable, it lets you know exactly what is missing, but if a action-definition within the XACTION is missing an input, it seems to throw a generic "can't run. so sorry" error.

    Ok ... enough ranting. Need caffiene.

    Thanks for the assistance; much appreciated

    -d-
    Have you hugged your computer geek today?

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.