Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: CITRUS: Crosstabs and report-preprocessors?

  1. #1
    Join Date
    Mar 2008
    Posts
    364

    Default CITRUS: Crosstabs and report-preprocessors?

    Hi!
    I am currently bundling a tech-demo for our company. I got all the latest stuff from the hudson-buildserver and I am almost done.
    Just two things:

    I know crosstabs are declared "experimental" but I see that I can insert crosstab-groups... Are there any hints anywhere how this is supposed to work. At least a quick example.

    What are "report-preprocessors"? In the wiki it states: report-preprocessors can fully reconfigure reports and subreports based on the data for the report.
    What is that supposed to mean?

    Any hints are highly appreciated.

    regards,

    Mgie

  2. #2
    pstoellberger Guest

    Default

    we heard something about the new features (including preprocessor and crosstab - which will still be disabled in the next PRD) in the community webex: http://wiki.pentaho.com/display/COM/...r+3.5+-+CITRUS

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

    Default

    A report pre-processor is a way to inject code to modify a report-definition based on the data received from the datasources. You can either implement a Java-Class (usefull if you want to guarantee correctness) or can provide it via the ScriptableReportPreProcessor (contains Java-Script/BeanShell/etc to do the modifcations).

    One major example of a pre-processor is the famous pentaho-report-wizard. The pre-processor came in as a controlled way to customize reports based on either the global configuration or parameters. It started because we had a client, who maintained central reports for a set of customers and needed to customize the reports based on certain rules, but was not eager to maintain several separate copies of the same report. (Each report had to go through a complex and nasty approval process, it was painful for one report, but doing that for 10 or 15 would cause madness and office-violence.)


    On crosstabs: Crosstabs did not make it into the final release in a way where we could safely declare it as a stable and supported feature. Therefore our official stance for Citrus will be denial, crosstabs do not exist. However, you can you them on your own risk fairly easy:

    First create the crosstab-group. In the group, add as many row and column-groups as you need. In these groups' headers and footers add the labels and fields you want to see there. And last but not least, fill the itemband with the field (or fields, but usually its only one) of your choice.

    The crosstabbing is meant to be used with denormalized data, ie you have a streaming view over your fact-table, with all the groups pulled in via joins and the result sorted in the expected order of the output. (Or if you use MDX or OLAP4J, use the "Denormalized" variants).

    And last but not least - A practical hint: To get fields into the various bands in the crosstab, drag them into any of the outside bands and then use Cut&Paste to bring them in. Right now, the visual editor component does not know how to handle drag-events and reacts a bit confused if you try to pull in a element from the palette.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  4. #4
    Join Date
    Mar 2009
    Posts
    205

    Default

    It seems that the experimental crosstabs feature is gone in RC2. Is there a way to re-enable it (at our own risks of course) ?

  5. #5
    Join Date
    Mar 2008
    Posts
    364

    Default

    You have to press CTRL-ALT-O to enable crosstabs in the RC2 version (to actually see the menu option, not to enter a tab...)

  6. #6
    Join Date
    Mar 2009
    Posts
    205

    Default

    Thanks for the information.

    I have not been able to have a working example with your information.

    My goal is the have this data:

    Code:
    slsrep1 jan 2000
    slsrep1 feb 1000
    slsrep1 mar 4000
    slsrep2 jan 6000
    slsrep2 feb 1500
    look like:

    Code:
                  jan     feb    mar
    slsrep1   2000   1000  4000 
    slsrep2   6000   1500    0
    slsrep...
    How many row section and column section do I need. Where do I put/copy the fields. If anyone has a more detailed example, a reference to an early stage doc, or even a working prpt, that would be great.

    Thanks

  7. #7
    Join Date
    Apr 2008
    Posts
    4,685

    Default

    Quote Originally Posted by mgie View Post
    You have to press CTRL-ALT-O to enable crosstabs in the RC2 version (to actually see the menu option, not to enter a tab...)
    Doesn't seem to work in my RC2.
    Which menu does it appear in?

    I have tried:
    LeftCTRL-LeftALT-O
    LeftCTRL-LeftALT-LeftSHIFT-O
    LeftCTRL-RightALT-O
    LeftCTRL-RightALT-LeftShift-O
    etc.

  8. #8
    Join Date
    Mar 2008
    Posts
    364

    Default

    When you create an empty report and you select the details band and right-click you get "Add Group". After you ctrl-alt-o you also see "Add Crosstab Group" there

  9. #9
    Join Date
    Mar 2008
    Posts
    364

    Default

    Quote Originally Posted by haubuchon View Post
    If anyone has a more detailed example, a reference to an early stage doc, or even a working prpt, that would be great.
    It is described in Will Gorman new book "Pentaho Reporting 3.5 for Java Developers" which can also be purchased digitally and was helpfull to me so far. I didn't produce a real world example with crosstab yet, but at least the examples given there (8 pages about crosstab, though still considered experimental) are working.

  10. #10
    Join Date
    Apr 2008
    Posts
    4,685

    Default

    Quote Originally Posted by mgie View Post
    When you create an empty report and you select the details band and right-click you get "Add Group". After you ctrl-alt-o you also see "Add Crosstab Group" there
    Thanks!
    It does indeed appear to be there...

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.