Connected Parameters - No trigger on date fields?

(4 posts) (3 voices)

Tags:

No tags yet.

  1. Anders Pedersen, Member

    I have a time interval selector (radio button) defined as:

    select 1, 'Translation start date in last 4 weeks'
    union select 2, 'Translation start date in last 3 calendar months'
    union select 3, 'Translation start date in last 12 calendar months'
    union select 4, 'Translation start date in selected period';

    for option 4 '... selected period' I have 2 date fields

    vStartDate vEndDate

    defined as the date datatype in the report input parameter list.

    following this in the report parameters I have a 4'th parameter which is dependent on a start date and end date specified by the radio button selection.

    my 4'th value is being calculate in a stored procedure. If the radio button assumes one of the values (1,2,3) the values for start and end date are being calculated based on the time interval and current date. That works fine.

    If the radio button is set to '4' and I following populate the date fields nothing is being calculated. But if I then select '3' and then '4' again (for the radio button), then the vStartDate and vEndDate are being applied in the calculation as expected.

    I have tried referencing the vStartDate and vEndDate by name and by mydbr_param2 (and 3), but I do not seem to be able to have the value of the 4 field calculated by changing any of the dates ... only by toggling the radio button.

    here is the relevant cutout of the code I used for calculating the 4'th parameter (for the mydbr_paramX attempt):


    CASE
    WHEN mydbr_param1='1' THEN set StartDate=(DATE_SUB(NOW(), INTERVAL 4 WEEK)), EndDate=now();
    WHEN mydbr_param1='2' THEN set StartDate=date_format(NOW() - INTERVAL 3 MONTH, '%Y-%m-01'), EndDate=last_day(NOW() - INTERVAL 1 MONTH);
    WHEN mydbr_param1='3' THEN set StartDate=date_format(NOW() - INTERVAL 12 MONTH, '%Y-%m-01'), EndDate=last_day(NOW() - INTERVAL 1 MONTH);
    WHEN ( mydbr_param1='4' AND ( ( mydbr_param2 IS NOT NULL ) OR ( mydbr_param3 IS NOT NULL ) ) ) THEN set StartDate=mydbr_param2, EndDate=mydbr_param3;
    END CASE;

    Does selecting a date (using the date picker) not trigger a recalculation of connected parameters?

    Kind Regards
    Anders M Pedersen

  2. myDBR Team, Key Master

    Connected parameters are triggered by radio buttons and select lists. Not yet dates.

    Btw. if you use stored procedure parameters you can use the parameter names in connected parameters instead of "mydbr_param1". Makes report maintenence easier.

    --
    myDBR Team

  3. cris, Member

    I would second this request to have connected parameters triggered by date changes. I worked around the issue, but it would be smooth to have it work natively. Thank you for a great program and great support!

  4. myDBR Team, Key Master

    Adding a support for dates is more of an UI issue. The challenge with the date is to make it seamless to the user. Selecting a date is not a single operation but may consist of multiple steps (date range). Any suggestions are welcomed.

    --
    myDBR Team


Reply

You must log in to post.