Hi,
I'm having trouble identifying the problem here. I've got a report that predates report extension, along with a table extension with a blob field on Purchase Header table. When the report is sent to preview, my blob field comes out filled (is intended to work like "Work Description" from sales header), but when the report is sent to attachments or printed to PDF, the Blob field is always empty.
The DataItem that should print the lines:
dataitem(WorkDescriptionLines; "Integer")
{
DataItemTableView = SORTING(Number) WHERE(Number = FILTER(1 .. 99999));
column(WorkDescriptionLineNumber; Number)
{
}
column(WorkDescriptionLine; WorkDescriptionLine)
{
}
trigger OnAfterGetRecord()
var
TypeHelper: Codeunit "Type Helper";
begin
if WorkDescriptionLines.Number <> 1 then
if WorkDescriptionInstream.EOS then
CurrReport.Break();
WorkDescriptionLine := TypeHelper.ReadAsTextWithSeparator(WorkDescriptionInstream, TypeHelper.LFSeparator);
end;
trigger OnPostDataItem()
begin
Clear(WorkDescriptionInstream)
end;
trigger OnPreDataItem()
begin
if not ShowWorkDescription then
CurrReport.Break();
Header."Work Description Blob".CreateInStream(WorkDescriptionInstream, TextEncoding::UTF8);
end;
}
The field has the calcfields set onaftergetrecord from the parent DataItem.
Anyone got a similar problem recently? I'm been going around in circles trying to understand.
Would appreciate any help at all.
Thank you.