Announcements
Hi All,
I am Exporting the Vendor Records by using the Excel Buffer, but I am getting this error, can anyone help me.
Thanks & Regards
P V Sarath.
Thank you, Nitin Verma.
Hi,
Please use as Yellow marked
local procedure GenerateFile()
var
Instr: InStream;
Outstr: OutStream;
TempBlob: Codeunit "Temp Blob";
FileName: Text;
begin
TempBlob.CreateOutStream(Outstr);
Xmlport.Export(Xmlport::"Vendor Export VEL", Outstr);
TempBlob.CreateInStream(Instr);
FileName := 'Vendors.xml';
DownloadFromStream(Instr, '', '', '', FileName);
end;
I am calling this codeunit in the action,
action(ExportVendor)
{
ApplicationArea = All;
Caption = 'ExportVendor';
ToolTip = 'Exports the Selected Vendors';
trigger OnAction()
var
UpdateRecords: Codeunit "Update Records VendorEmployee";
EmployeeCreation: Report "Create Employee in Vendor VEL";
begin
Commit;
UpdateRecords.Run();
Message('process Finished');
end;
|
Hi All,
For Expporting a file, I am calling my function in the codeunit Run trigger, my code is
But, I am getting this error, can anyone guide me please.
Thanks & Regards,
P Venkata Sarath.
Hi,
Please create your own function to enter the values in Cell instead of Addcolumn functions
RowNo : Integer RowNo := 1; EnterCell(RowNo : Integer;ColumnNo : Integer;CellValue : Text[250];Bold : Boolean;Italic : Boolean;UnderLine : Boolean;DoubleUnderLine : Boolean;Format : Text[30];CellType : Option) TempExcelBuffer.INIT; procedure MakeVendor()
var
TempExcelBuffer: Record "Excel Buffer";
// "Vendor No.":Code[20];
begin
Row := 1;
Column := 1;
EnterCell(RowNo,ColumnNo,Vendor.No.,Bold,Italic,UnderLine,DoubleUnderLine,Format,CellType
Column += 1;
EnterCell(RowNo,ColumnNo,Vendor.No.,Bold,Italic,UnderLine,DoubleUnderLine,Format,CellType
Column += 1;
EnterCell(RowNo,ColumnNo,Vendor.No.,Bold,Italic,UnderLine,DoubleUnderLine,Format,CellType
end;
|
Hi Bruvik,
I am sharing my code I am calling from the functions from codeunit in the report.
It seems that you are violating the primary key in the table.
Make sure you increment the row and or column number for every new insert.
Maybe you you can share your code so we can easier help you figure out your problem?
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156