2010-05-17

Crystal Report XI ObjectPosition Error

[DCC Error] CrystalActiveXReportViewerLib11_5_TLB.pas(2825):
E2160 Type not allowed in OLE Automation call

function TCRVSelectionItem.Set_ObjectPosition(pVal: tagRECT): HResult;
  { Warning: The property ObjectPosition has a setter and a getter whose
    types do not match. Delphi was unable to generate a property of
    this sort and so is using a Variant as a passthrough. }
var
  InterfaceVariant: OleVariant;
begin
  InterfaceVariant := DefaultInterface;

  // Mark by Jasper
  //InterfaceVariant.ObjectPosition := pVal;
  //Result := S_OK;

  // Make by Jasper
  Result :=
    (IUnknown(InterfaceVariant) as ICRVSelectionItem).Set_ObjectPosition(pVal);
end;

ObjectPosition

沒有留言: