Home DADE

TDateParameter with soBetween search operator

edited December 2013 in DADE
Hi
I need to know how to read both date values individually from a Tdate
type parameter with a soBetween search operator.
To read the full value, I'm using pDate.autosearchsettings.searchexpresion

I'm using RB 14.08

Thanks

Ignacio

Comments

  • edited December 2013
    Hi Ignacio,

    Use the TppAutoSearchField.Values property to get access to the
    soBetween or soInList values.

    Access the AutoSearchField object using the Report.AutoSearchFields[]
    property or AutoSearchFieldByName routine.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2013
    Hi
    I know how to do it with autosearch fields but I'm using parameters
    because I need to do something with values entered by users before add a
    condition to the datapipelines. If I use the
    pDate.autosearchsettings.searchexpresion command it returns the whole
    value '01/11/2013,10/101/2013' but I need both values into different
    variables.
    Is there a way as using report.autosearchfields[].values[] but with params?

    thanks

    El 23/12/2013 13:05, Ignacio Alewaerts escribió:
  • edited December 2013
    Hi Ignacio,

    I apologize, I did not know you were using parameters.

    You can access the parameter values using the TParameter.ValueCount and
    TParameter.Values[] property.

    For example:

    lParameter := Report.Parameters['MyParam'];

    lsValue1 := lParameter.Values[0];
    lsValue2 := lParameter.Values[1];


    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2014
    How would it be on the Calc tab becuase with the next example

    procedure FechaOnPrint;
    var lParameter: TppParameter;
    lsValue1 : TDate;
    begin
    lParameter := Report.Parameters['pIntervalo'];

    lsValue1 := pIntervalo.Values[0];
    fecha.Value := lsValue1;
    end;

    It show the error message Expected '(' or '[' but 'Values' found or
    something like that?

    Thanks



    El 30/12/2013 12:26, Nico Cizik (Digital Metaphors) escribió:
  • edited January 2014
    Sorry the correct example is

    procedure FechaOnPrint;
    var lParameter: TppParameter;
    lsValue1 : TDate;
    begin
    lParameter := Report.Parameters['pIntervalo'];

    lsValue1 := lParameter.Values[0];
    fecha.Value := lsValue1;
    end;

    Hope it helps
    Thanks


    El 30/12/2013 12:26, Nico Cizik (Digital Metaphors) escribió:
  • edited January 2014
    Hi Ignacio,

    You did not mention that you are using RAP :).

    For RB 15, we added support for the Values property in RAP. In RB 15+
    you can simply using the following syntax to access each individual
    parameter value.

    lParamValue1 := MyParameter.Values(0);
    lParamValue2 := MyParameter.Values(1);

    Moving forward, we hope you will consider upgrading to the latest
    version of ReportBuilder to take advantage of this as well as many other
    new and exciting features. See the link below for all features added
    for RB 15.

    http://www.digital-metaphors.com/rbWiki/General/What's_New/RB_15

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2014
    Sorry. My mistake.
    Thanks for answering so fast. I already was considering upgrading to
    the latest version to take advantage of many features you've published

    Thanks again


    El 03/01/2014 12:51, Nico Cizik (Digital Metaphors) escribió:
This discussion has been closed.