Pentaho Reporting and Pentaho Report Designer
  1. Pentaho Reporting and Pentaho Report Designer
  2. PRD-2867

Reporting with a PDI Transformation as a Datasource: Wrong date format

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Severe Severe
    • Resolution: Not a Bug
    • Affects Version/s: 3.6.1 GA [3.6.0 GA (Platform Release)]
    • Component/s: None
    • Labels:
      None
    • Customer Case:
    • 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.
    • QA Validation Status:
      Not Yet Validated

      Description

      When a prpt has a PDI transformation as a datasource, Report Engine is not passing the dates parameter (that comes from a Date Picker) in the format that has been selected in the parameter to PDI, even if the parameter in the prpt is set as String.
      To Reproduce:
      1) Use a fresh pentaho BI installation
      2) Copy SamplePDI.ktr and SamplePDI.prpt into pentaho-solutions/steel-wheels/ and refresh repository
      3) Execute SamplePDI.prpt in PUC
      4) Select 2005/01/01 as Start Date and 2005/12/31 as nd Date
      5) Notice the fields "Start Date1" and "End Date1" in the report (returned by the data source), the format of the date is yyyy-MM-dd even though in the prpt its default format should be yyyyMMdd
      6) Notice the fields "Start Date2" and "End Date2" in the report (the parameter in prpt), the format of the date is yyyy-MM-dd even though in the prpt its default format should be yyyyMMdd
      NOTE: In this example, the process works OK, because hypersonic is expecting the date in yyyy-MM-dd format, but not in other databases (Teradata does in expect dates as yyyyMMdd)

        Activity

        Hide
        Thomas Morgner added a comment -
        If a parameter is passed in as a Date object, then that's all the reporting engine knows. The format-property on the parameter is only for the parameter-UI. Kettle does not support typed parameter (as all kettle parameter are strings) and thus you will have to format that date yourself in a second step (for instance via a hidden parameter with a post-processing formula).
        Show
        Thomas Morgner added a comment - If a parameter is passed in as a Date object, then that's all the reporting engine knows. The format-property on the parameter is only for the parameter-UI. Kettle does not support typed parameter (as all kettle parameter are strings) and thus you will have to format that date yourself in a second step (for instance via a hidden parameter with a post-processing formula).
        Hide
        Thomas Morgner added a comment -
        What part of this bugreport is a business secret? I cannot see anything that justifies the security level set to Internal here. As long as we are an open source company, we should stick to the open source principles and keep bug information open.
        Show
        Thomas Morgner added a comment - What part of this bugreport is a business secret? I cannot see anything that justifies the security level set to Internal here. As long as we are an open source company, we should stick to the open source principles and keep bug information open.
        Hide
        Kurtis Cruzada added a comment -
        Agreed.
        Show
        Kurtis Cruzada added a comment - Agreed.
        Hide
        Rodrigo Haces added a comment -
        The parameter is not set as date, but as string. Shouldn't the parameter get the string in the format specified?
        Show
        Rodrigo Haces added a comment - The parameter is not set as date, but as string. Shouldn't the parameter get the string in the format specified?
        Hide
        Rodrigo Haces added a comment -
        The parameter is not set as date, but as string. Shouldn't the parameter get the string in the format specified?
        Show
        Rodrigo Haces added a comment - The parameter is not set as date, but as string. Shouldn't the parameter get the string in the format specified?
        Hide
        Kurtis Cruzada added a comment -
        No. That is for the parameter UI. If you want to have it formatted a certain way you will need to add a hidden parameter and use a formula to put it in the right text format.
        Show
        Kurtis Cruzada added a comment - No. That is for the parameter UI. If you want to have it formatted a certain way you will need to add a hidden parameter and use a formula to put it in the right text format.

          People

          • Assignee:
            Rodrigo Haces
            Reporter:
            Rodrigo Haces
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: