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

Field does not exist

edited April 2002 in General
I am trying to do a calculation in my report on a field that may not exist
in the pipeline. If the field doesn't exist, then I want to calculate
against a field that I know does exist. Anyone have any suggestions?

Thanks in advance,
Nick

Comments

  • edited April 2002
    Hi Nick,

    what environment are you using?

    regards,
    Chris Ueberall;
  • edited April 2002
    Delphi 6, RB 6.03

  • edited April 2002
    Nick,

    You can create a calculated field in Delphi filled with the data of the one
    that exists.

    regards,
    Chris Ueberall;

  • edited April 2002
    You can query which fields do exist in the data pipeline by accesing it's
    Fields array property. For example:

    while not(lbFieldExists) and (liIndex < ppReport1.DataPipeline.FieldCount)
    do
    begin
    lbFieldExists := (ppReport1.DataPipeline.Fields[liIndex].FieldName =
    aFieldName); // or FieldAlias
    Inc(liIndex);
    end;

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.