Home RAP
New Blog Posts: Merging Reports - Part 1 and Part 2

Passing Variables to Report

edited April 2003 in RAP
Hi

I have seen many postings along these lines but wanted to find out if there
is an easier way in v7.02.
I just want to pass two dates (to and from to my report and have them appear
as values in two variables on the end user designer screen.)

I have looked at parameters but can't work out how to access them in RAP,
also the Pass through functions seems long winded just for this.

What is the best method for this.

Thanks

Andy

Comments

  • edited April 2003
    Hi Andy,

    use a JITPipeline.

    regards,
    Chris Ueberall;
  • edited April 2003
    Thanks Chris, that looks like it'll do the job, just one small thing. I have
    created a couple of fields but am struggling to assign values at run time. I
    want make the value of the first field to Edit1.Text.

    Thanks

    Andy

  • edited April 2003
    Andy,

    use the event 'OnGetFieldValue'.

    function TmyDataModule.myPipelineGetFieldValue(aFieldName: String): Variant;
    begin
    if aFieldName = 'myFieldName' then begin
    Result := Edit1.Text;
    end
    else if aFieldName = 'myFieldName2' then begin
    // ...
    end;
    end;

    regards,
    Chris Ueberall;
  • edited April 2003
    Thanks Chris
    Very nearly there, this works OK, but now if I drop a new JitPipeline onto a
    form it is no longer selectable in the end user
    designer, I don't remember doing anything specific with the first form, it
    just appeared as data to be selected.

    Andy

  • edited April 2003
    Andy,

    place the pipeline on your end-user datamodule and set property 'Visible' to 'True'.

    HTH,
    Chris Ueberall;
This discussion has been closed.