Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Report with from_date and to_date dropdowns/calendar button

  1. #1

    Default Report with from_date and to_date dropdowns/calendar button

    Hi All

    I am new to Pentaho reporting and I am working on report designer. I need to create a report which shows the no of cutomer registration per day. I have achieved this by firing simple queries on my dimensions and fact tables.. Now I need to have two drop downs/calendar button so that i can select the start and end date so as to display the customer registrations only for a certain period of time.
    Kindly share your ideas how to select the proper components and achieve this?

  2. #2
    Join Date
    Mar 2012
    Posts
    276

    Default

    Hi Sami,

    You can achieve this by parameters,
    add a parameter ex ${startDate}---> value type as Date ; display type as Date Picker
    similarly for ${endDate} parameter

    include them in query as
    where date between ${startDate} and ${endDate}


    Cheers,
    Surya

  3. #3

    Default

    Thanks Surya.... I have implemented it

  4. #4
    Join Date
    Oct 2012
    Posts
    3

    Default

    @Surya

    I did exactly that for a report I had just created, however whenever I select a date on one parameter, it automatically switches the other parameter to the beginning of the year.

    No really sure what's going on...

  5. #5
    Join Date
    Oct 2012
    Posts
    3

    Default

    @Surya

    I've done what you've suggested as I'm in roughly the same boat.

    Problem I have now, is that whenever I set one parameter and then change the other, it resets the other parameter to the first of the year.

  6. #6
    Join Date
    Oct 2012
    Posts
    3

    Default

    Quote Originally Posted by surya.thanuri View Post
    Hi Sami,

    You can achieve this by parameters,
    add a parameter ex ${startDate}---> value type as Date ; display type as Date Picker
    similarly for ${endDate} parameter

    include them in query as
    where date between ${startDate} and ${endDate}


    Cheers,
    Surya

    I've followed the instructions as I'm in a similar boat.

    However, when I set the "Start Date" parameter and go set the "End Date" parameter, it automatically sets the Start Date to the first of the year. Not really sure what's going on...

  7. #7
    Join Date
    Sep 2017
    Posts
    1

    Default

    I am having the same problems one post I saw mentioned adding >= and <= to the start date and end date code. Doesn't seem like something you'd need since the between statement is in the query, but I've been trying everything.

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.