Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Module with ReportPreProcessor

  1. #1
    Join Date
    Mar 2008
    Posts
    364

    Question Module with ReportPreProcessor

    Hi!
    I have written a new ReportPreProcessor and I would like to make it available in PRD. I have created a new module according to
    this guide http://wiki.pentaho.com/display/Repo...t+Preprocessor
    Result is: I doesnt get loaded. I can't see anything in prd.log

    Here is what I have done so far:
    I have bundled my ReportPreProcessor in a jar file and put it in the lib-folder of prd.
    The jar file contains a classic-engine.properties in its root. That file contains

    Code:
    org.saiku.reporting.core.xxx.Module=org.saiku.reporting.core.xxx.XxxModule
    I also have a XxxModule class with:
    Code:
        public void initialize(SubSystem arg0) throws ModuleInitializeException {
            ElementMetaDataParser.initializeOptionalReportPreProcessorMetaData
            ("org/saiku/reporting/core/xxx/meta-report-preprocessors.xml");
        }
    In the folder where my ReportPreProcessor class resides, the jar contains a file named
    meta-report-preprocessors.xml which looks like this
    Code:
    <meta-data xmlns="http://reporting.pentaho.org/namespaces/engine/classic/metadata/1.0">  <pre-processor class=org.saiku.reporting.core.xxx.XxxProcessor"
                     bundle-name="org.saiku.reporting.core.xxx.XxxProcessorBundle"
                     expert="false" hidden="false" preferred="false">
                     <property name="abc"/>
      </pre-processor>
    </meta-data>
    and also a file called XxxProcessorBundle.properties which contains

    Code:
    pre-processor.org.saiku.reporting.core.xxx.XxxProcessor.display-name=My Processor
    pre-processor.org.saiku.reporting.core.xxx.XxxProcessor.grouping=Scripting
    pre-processor.org.saiku.reporting.core.xxx.XxxProcessor.grouping.ordinal=100
    pre-processor.org.saiku.reporting.core.xxx.XxxProcessor.ordinal=10
    pre-processor.org.saiku.reporting.core.xxx.XxxProcessor.deprecated=
    
    
    pre-processor.org.saiku.reporting.core.xxx.XxxProcessor.property.url.display-name=ABC
    pre-processor.org.saiku.reporting.core.xxx.XxxProcessor.property.url.grouping=Foo
    pre-processor.org.saiku.reporting.core.xxx.XxxProcessor.property.url.grouping.ordinal=200
    pre-processor.org.saiku.reporting.core.xxx.XxxProcessor.property.url.ordinal=50
    whate else am I missing?

    cheers
    mgie

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

    Default

    The config-file in the root must have any the well-known prefix:
    "org.pentaho.reporting.engine.classic.core.userdefined.modules"

    so your file should look like:
    Code:
    org.pentaho.reporting.engine.classic.core.userdefined.modules.saiku-reporting.Module=org.saiku.reporting.core.xxx.XxxModule
    The engine searches for keys with the known prefix and checks the value for whether it is a module class. If it is, we load it. We do not check randomly all keys that may or may not exist, as this might have weird and unintended side-effects (apart from being slow like hell).
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

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.