report 50100 /GSTR1 Report/
{
ApplicationArea = All;
Caption = 'GSTR1 Excel';
UsageCategory = /ReportsAndAnalysis/;
ExcelLayout = 'GSTR1 Excel.xlsx';
DefaultLayout = Excel;
dataset
{
dataitem(/Sales Invoice Header/; /Sales Invoice Header/)
{
column(Receiver_Name; /Bill-to Name/)
{
}
column(Invoice_Number; /No./)
{
}
column(Posting_Date; /Posting Date/)
{
}
column(Place_of_Supply; /Location State Code/)
{
}
dataitem(/Sales Invoice Line/; /Sales Invoice Line/)
{
DataItemLink = /Document No./ = field(/No./);
DataItemLinkReference = /Sales Invoice Header/;
DataItemTableView = sorting(/Document No./);
column(Taxable_Value; Amount)
{
}
column(Rate; Rate)
{
}
column(CGST; CGST)
{
}
column(SGST; SGST)
{
}
column(IGST; IGST)
{
}
}
dataitem(/Cust. Ledger Entry/; /Cust. Ledger Entry/)
{
DataItemLink = /Document No./ = field(/No./);
DataItemLinkReference = /Sales Invoice Header/;
DataItemTableView = sorting(/Document No./);
column(Invoice_Value; Amount)
{
}
}
dataitem(Customer; Customer)
{
DataItemLink = /No./ = field(/Sell-to Customer No./);
DataItemLinkReference = /Sales Invoice Header/;
DataItemTableView = sorting(/No./);
column(GST_Registration_No_; /GST Registration No./)
{
}
}
trigger OnAfterGetRecord()
var
begin
DGST.Reset();
DGST.SetRange(/Document No./, /No./);
CGST := 0;
SGST := 0;
IGST := 0;
if DGST.FindFirst() then
repeat
if DGST./GST Component Code/ = 'CGST' then begin
CGST += -DGST./GST Amount/;
SGST += -DGST./GST Amount/;
IGST := 0;
Rate := DGST./GST %/;
end;
if DGST./GST Component Code/ = 'IGST' then begin
IGST += -DGST./GST Amount/;
Rate := DGST./GST %/;
CGST := 0;
SGST := 0;
end;
until DGST.Next() = 0
else begin
CGST := 0;
SGST := 0;
IGST := 0;
Rate := 0;
end;
end;
}
}
var
CGST: Decimal;
SGST: Decimal;
IGST: Decimal;
Rate: Decimal;
CustLedEnt: Record /Cust. Ledger Entry/;
DGST: Record /Detailed GST Ledger Entry/;
Cust: Record Customer;
CustGSTRegNo: Code[20];
InvoiceValue: Decimal;
GST_Registration_No_: Code[20];
}
If I run the above code I get output as
My requirement is to get values in columns in One line. but now getting Invoice value in one line, GST Registration No. in one line and all other field values in another line for the same document no. Please suggest me to all values in single line.