Uploaded image for project: 'Pentaho Reporting and Pentaho Report Designer'
  1. Pentaho Reporting and Pentaho Report Designer
  2. PRD-5454

Cannot use transformation as data source on PRPT with parameters in TableInput

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: High
    • Resolution: Fixed
    • Affects Version/s: 5.3.0 GA
    • Fix Version/s: 8.1.0 GA
    • Component/s: None
    • Labels:
    • Story Points:
      0
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.

      Description

      Found while working ESR-4664, when a PRPT gets data from a KTR, and the KTR uses parameters (for example, in the SQL of a TableInput step), the variables don't get resolved from those saved as defaults. You have to add the variables to the kettle.properties, and only then can you use it at design time.

      The issue happens in AbstractKettleTransformationProducer ( https://github.com/pentaho/pentaho-reporting/blob/master/engine/extensions-kettle/source/org/pentaho/reporting/engine/classic/extensions/datasources/kettle/AbstractKettleTransformationProducer.java#L222 ) when getStepFields is called. At this point, unfortunately the environment isn't set up for the variables to be resolved from the defaults.

      I note though that in the method performQueryOnTransformation ( https://github.com/pentaho/pentaho-reporting/blob/master/engine/extensions-kettle/source/org/pentaho/reporting/engine/classic/extensions/datasources/kettle/AbstractKettleTransformationProducer.java#L298-L302 ) there's a call to prepareTransformation prior to calling getStepFields. It's likely that that's all that's missing from the queryDesignTimeStructure method.

        Attachments

        1. pdi_sources_multiple.png
          pdi_sources_multiple.png
          14 kB
        2. Screenshot_1.png
          Screenshot_1.png
          18 kB
        3. Screenshot_2.png
          Screenshot_2.png
          183 kB
        4. Screenshot_3.png
          Screenshot_3.png
          104 kB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              mbatchelor Marc Batchelor (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: