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

Incompatible Types

edited April 2007 in General
This code works fine in my main form, but when
it is copied over to Report Builder I get the

Incompatible types 'Integer' and 'Extended' error

how do I get around this?

procedure TMain.pUpdateDrawerDrawing;
var
iLeft : integer;
begin
iLeft := Cabinet.Top + Round( SF * DWT);
end;

SF is an integer
DWT a double

TIA

Comments

  • edited April 2007
    Hi Mojoala,

    For future reference, please post RAP questions in the RAP newsgroup. This
    helps us understand the question easier and allows us to give a quicker and
    more accurate response.

    Try using a separate local variable to calculate SF * DWT before sending it
    to the Round routine.

    var
    liLeft: Integer;
    ldProduct: Double;
    begin

    ldProduct := SF * DWT;
    liLeft := Cabinet.Top + Round(ldProduct);

    end;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2007
    thanks

This discussion has been closed.