Report Printer Pro - RAVE question, using the latest 11.0.10
Report Printer Pro - RAVE question, using the latest 11.0.10
Unfortunately I still have a few reports using these components. I'll be switching it out for the next release of my app, trying to get the current release out!
In the mean time, any time I try printing the contents of a "BlobType" of ftMemo, I'm getting Chinese characters (want English, what it was entered as). The database character encoding is UTF-8 (from Firebird 2.0.6 database). The content displays fine in a memo control. I haven't found any settings/properties on the components to set up the code page, or the like.
Here's a snippet of code:
Memobuf := TDBMemobuf.Create;
Memobuf.PrintStart := TabStart(1);
Memobuf.PrintEnd := TabEnd(1);
Memobuf.Field := (qryJONotes.FindField('COMEMO') as TMemoField);
MemoBuf.BaseReport := ReportPrinter;
lines := memolines(memobuf);
SetTab(0.75, pjLeft, 7, 5, BOXLINELEFTRIGHT, 0);
PrintTab(getmemoline(Memobuf, EOL));
Thanks,
Curt
Unfortunately I still have a few reports using these components. I'll be switching it out for the next release of my app, trying to get the current release out!
In the mean time, any time I try printing the contents of a "BlobType" of ftMemo, I'm getting Chinese characters (want English, what it was entered as). The database character encoding is UTF-8 (from Firebird 2.0.6 database). The content displays fine in a memo control. I haven't found any settings/properties on the components to set up the code page, or the like.
Here's a snippet of code:
Memobuf := TDBMemobuf.Create;
Memobuf.PrintStart := TabStart(1);
Memobuf.PrintEnd := TabEnd(1);
Memobuf.Field := (qryJONotes.FindField('COMEMO') as TMemoField);
MemoBuf.BaseReport := ReportPrinter;
lines := memolines(memobuf);
SetTab(0.75, pjLeft, 7, 5, BOXLINELEFTRIGHT, 0);
PrintTab(getmemoline(Memobuf, EOL));
Thanks,
Curt
Found a simple fix until I can remove this report engine. I didn't feel like modifying the component set, so I did it from my app. Fortunately there was a way to set the text of the "memBuf".
ReplyDeletefunction MemoToStr(Afield: TField): string;
begin
if not(Afield.IsNull) then
Result := Afield.value
else Result := '';
end;
Text := MemoToStr(qryJONotes.FindField('COMEMO'));
Memobuf.Text := Text;
Memobuf.PrintStart := TabStart(0);
Memobuf.PrintEnd := TabEnd(1);
The rest of the code to print the report.