New Blog Post: PDF/A and Metadata

print text of the selected item of a parameter lookup

edited July 2014 in End User
In a search screen of the report builder I have a lookup field.
Prior to preview the report, I need to display in a label, the text of
the selected item and not its value.
How do?
Know to display the value, the command is:
ReportBeforePrint procedure;
Label1.Caption: = parameter1.value;


  • edited July 2014
    Hi Fabricio,

    Using the various routines located in the TppLookupList class you can
    get the selected name or "text" before the report prints. Something
    like the following...

    procedure TForm2.ppReport1BeforePrint(Sender: TObject);
    lParameter: TppParameter;
    liIndex: Integer;
    lsParamValue: String;

    lParameter := ppReport1.Parameters['Parameter1'];
    lsParamValue := lParameter.Value;
    liIndex := lParameter.LookupList.IndexOfValue(lsParamValue);


    Best Regards,

    Nico Cizik
    Digital Metaphors
  • edited July 2014
    I tried to use the code sent but not accepted into the calc procedure
    error: "Erro: ReportBeforePrint, Linha 15: Esperado: '( ou'[, mas ao
    invés encontrou 'IndexOfValue'."

    Em 10/07/2014 12:39, Nico Cizik (Digital Metaphors) escreveu:
  • edited July 2014
    Hi Fabricio,

    For future reference, please state that you are using RAP in your main
    post so we know which features you are utilizing.

    The code I posted will not function in RAP. You will need to create a
    passthru function in order to get the value you need. See the
    Developer's Guide and main RAP demo included with RB for passthru
    function examples.

    Best Regards,

    Nico Cizik
    Digital Metaphors
This discussion has been closed.