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

Variant type conversion error ?? in calc field

edited December 2003 in General
I am trying to set a calc field in a subreport

procedure TForm_WipeSurvList.vQtyGetText(Sender: TObject;
var Text: String);
var
UnitID:integer;
UnitLabel: string;
Qty : string;
begin
inherited;
UnitID := ppBDEPipeline2['inv_quantity_unit_id']; // complains about
variant conversion here
UnitLabel := Units.GetUnit(UnitID);
Qty := FloatToStr(ppBDEPipeline2['original_quantity']);
Text := Qty + ' ' + UnitLabel;
end;

Note, I am testing my rules against the Pipeline values, vice the dataset
(query) results , as I would have done in a previous life. The reason being
is that I am using a M-D Pipeline join for this report and I am being led to
believe that the query is only traverse once with the dataset stored in the
pipeline. There for me to use
Query1.FieldByName('inv_quantity_unit_id').AsInteger would not return the
right valiue. Am I correct or totally out of it.
Larry

Comments

This discussion has been closed.