I am using quick report 6 in Delphi 10.2. When I add quickreport source path to library paths I am getting Incompatible type errors on qrpdffilt.pas.
Var
P: ^ pos2table;
Buff: array of ansichar;
d: dword;
RGBCol:TRGBColor;
PColor: TColor;
Pos2table is of type packed array
Incompatible types issue comes for following lines
P:=@Buff[d];
RGBCol:=pcolor;
Any solution?
P := @Buff[d];
is assigning an^AnsiChar
pointer to a^pos2table
pointer, so of course the compiler will complain since they are pointers to different types, but only if you have type-checked pointers enabled, in which case you need to use a typecast to resolve it, eg:RGBCol:=pcolor;
is trying to assign aTColor
(an integer type, not a pointer type) to aTRGBColor
(presumably a record type). There is no standard implicit conversion between them, so the compiler complains about this. You can use a pointer typecast to resolve this, too: