hi Thank you all for always helping me
I have a question: I want a way to retrieve an image from a field that contains an image and I want to retrieve the image in the report
use Microsoft SQL Builder
First, I created a new report called "Shipment_Brief"
*****************************************************************************************
table 50020 "Shipment_Brief"
{
DataClassification = ToBeClassified;
fields
{
field(11; "Palletization Table"; Text[100])
{
DataClassification = ToBeClassified;
Caption = 'Palletization Table & Instructions';
}
field(12; "Palletization Table Att"; Blob)
{
DataClassification = ToBeClassified;
Caption = 'Palletization Table & Instructions Attachment';
Subtype = Bitmap;
}
}
}
*****************************************************************************************}
Secondly, I created a new Page "Shipment Brief Card"
page 50021 "Shipment Brief Card"
{
PageType = Card;
SourceTable = "Shipment_Brief";
ApplicationArea = All;
Caption = 'Shipment Brief';
UsageCategory = Administration;
SaveValues = false;
layout
{
area(content)
{
group(Group1)
{
Caption = 'Palletization Table & Instructions';
field("Palletization Table"; "Palletization Table")
{
ApplicationArea = All;
Editable = true;
}
field("Palletization Table Att"; "Palletization Table Att")
{
ApplicationArea = All;
Editable = true;
trigger OnAssistEdit()
var
InStream: InStream;
OutStream: OutStream;
FileName: Text;
BlobSize: Integer;
BlobData: Text;
begin
if UploadIntoStream('Select a file to upload - Palletization Table', '', '', FileName, InStream) then begin
Rec."Palletization Table Att".CreateOutStream(OutStream);
BlobData := '';
repeat
InStream.ReadText(BlobData);
until InStream.EOS;
OutStream.WriteText(BlobData);
Rec."Palletization Table Att Name" := FileName;
Rec.Modify();
Message('File uploaded and saved successfully: %1', FileName);
end else begin
Message('File upload cancelled.');
end;
end;
}
}
actions
{
area(Processing)
{
action(PrintReport)
{
ApplicationArea = All;
Caption = 'Print Report';
trigger OnAction()
var
ShipmentBrief: Record "Shipment_Brief";
ShipmentBriefRepot: Report "Shipment_Brief_Contact";
begin
CLEAR(ShipmentBrief);
CLEAR(ShipmentBriefRepot);
ShipmentBrief.SETRANGE("Invoice No Shipment", Rec."Invoice No");
ShipmentBrief.FindSet();
if ShipmentBrief.FindSet() then begin
ShipmentBriefRepot.SETTABLEVIEW(ShipmentBrief);
ShipmentBriefRepot.RUNMODAL;
end else begin
Message('No Sales Invoice Header found for No. %1', Rec."Invoice No");
end;
end;
}
*****************************************************************************************}
Third: I want to retrieve the image to appear in the report "Shipment_Brief_Contact"
report 50410 "Shipment_Brief_Contact"
{
DefaultLayout = RDLC;
RDLCLayout = './Report Layout/ShipmentBrief.RDL';
EnableExternalImages = true;
dataset
{
dataitem("Shipment_Brief"; "Shipment_Brief")
{
column(Palletization_Table; "Shipment_Brief"."Palletization Table")
{
}
column(Palletization_Table_Att; "Shipment_Brief"."Palletization Table Att")
{
}
}
}
This is all the code I have... I tried searching on Google but I didn't find a suitable solution close to what I want