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

REGRESSION - Multiple queries are sent to DB from query-driven drop down parameters

    XMLWordPrintable

    Details

    • 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

      In order to replicate this you can use the attached report; the report is written against SampleData in MySQL it has two queries:
      LineParameter:
      SELECT DISTINCT `products`.`PRODUCTLINE` FROM `products`
      and
      MainQuery:
      SELECT
      `products`.`PRODUCTCODE`, `products`.`PRODUCTNAME`,
      `products`.`PRODUCTLINE`, `products`.`PRODUCTSCALE`,
      `products`.`PRODUCTVENDOR`, `products`.`PRODUCTDESCRIPTION`,
      `products`.`QUANTITYINSTOCK`, `products`.`BUYPRICE`,
      `products`.`MSRP`
      FROM `products`
      WHERE `products`.`PRODUCTLINE` = ${pLine}

      Make sure to enable SQL logging in PRPT to be able to see the SQL:

      5.1 behavior:
      Run the report:
      Notice the first query logged in the pentaho log is the LineParameter see 51_pentaho.log line 4
      Select Motorcycles from the drop down
      Notice the main query is executed with Motorcycles see 51_pentaho.log line 9

      Change the parameter to Trains and notice the only query being executed is the main query; see 51_pentaho.log line 24
      Change the parameter to Planes and notice the only query being executed is the main query; see 51_pentaho.log line 39

      5.2 Behavior

      Notice in 52_pentaho.log there are two queries for the LineParameter; see lines 2 and 7

      Change the parameter to Motorcycles notice there are 3 queries for the parameter again on lines: 12, 17, 37
      Change the parameter to Trains and notice again the 3 queries on lines: 42, 47 and 67

      Please see attached report and logs for 5.1 and 5.2

        Attachments

        1. 51_List_Parameter.prpt
          5 kB
        2. 51_pentaho.log
          3 kB
        3. 52_pentaho.log
          5 kB

          Issue Links

            Activity

              People

              Assignee:
              aliaksandr Aliaksandr Bialkevich (Inactive)
              Reporter:
              clopez Carlos Lopez
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 16h
                  16h