Dear YUN ZHU,
I noticed that you had created the report with temporary table in docx format. I would like to know whether it is possible to create report in RDLC Format..??
As of now, I had designed the report and used the triggers as instructed in your blog. But, the same issue persist [ "The report couldn’t be generated, because it was empty. Adjust your filters and try again."]. I had attached the currently working code below for your reference.
report 50110 TempReport
{
UsageCategory = ReportsAndAnalysis;
ApplicationArea = All;
RDLCLayout = TempReport.rdl';
DefaultLayout = RDLC;
dataset
{
dataitem(TempTable; TempTable)
{
column(Amount; Amount)
{
}
column(AmountIncVAT; AmountIncVAT)
{
}
column(Bill_to_Customer_No_; Bill_to_Customer_No_)
{
}
column(Bill_to_Name; Bill_to_Name)
{
}
column(Currency_Factor; Currency_Factor)
{
}
column(CustomerAddress; CustomerAddress)
{
}
column(Description; Description)
{
}
column(Invoice_Discount_Amount; Invoice_Discount_Amount)
{
}
column(ItemNo_; ItemNo_)
{
}
column(Line_Discount__; Line_Discount__)
{
}
column(Line_Discount_Amount; Line_Discount_Amount)
{
}
column(No_; No_)
{
}
column(Order_Date; Order_Date)
{
}
column(Quantity; Quantity)
{
}
column(Quote_No_; Quote_No_)
{
}
column(Shipment_Date; Shipment_Date)
{
}
column(Unit_of_Measure; Unit_of_Measure)
{
}
column(Unit_Price; Unit_Price)
{
}
column(VAT__; VAT__)
{
}
column(Your_Reference; Your_Reference)
{
}
}
}
trigger OnPreReport()
var
TempTablename: Record TempTable;
begin
TempTable.Reset();
TempTable.DeleteAll();
TempTablename.Reset();
if TempTablename.FindSet() then
repeat
TempTable.Init();
TempTable.Amount := TempTablename.Amount;
TempTable.AmountIncVAT := TempTablename.AmountIncVAT;
TempTable.Bill_to_Customer_No_ := TempTablename.Bill_to_Customer_No_;
TempTable.Bill_to_Name := TempTablename.Bill_to_Name;
TempTable.Currency_Factor := TempTablename.Currency_Factor;
TempTable.CustomerAddress := TempTablename.CustomerAddress;
TempTable.Description := TempTablename.Description;
TempTable.Invoice_Discount_Amount := TempTablename.Invoice_Discount_Amount;
TempTable.ItemNo_ := TempTablename.ItemNo_;
TempTable.Line_Discount__ := TempTablename.Line_Discount__;
TempTable.Line_Discount_Amount := TempTablename.Line_Discount_Amount;
TempTable.No_ := TempTablename.No_;
TempTable.Order_Date := TempTablename.Order_Date;
TempTable.Quantity := TempTablename.Quantity;
TempTable.Shipment_Date := TempTablename.Shipment_Date;
TempTable.Unit_of_Measure := TempTablename.Unit_of_Measure;
TempTable.Unit_Price := TempTablename.Unit_Price;
TempTable.VAT__ := TempTablename.VAT__;
TempTable.Insert();
until TempTablename.Next() = 0;
end;
}
Please do suggest me ways to create a report in RDLC Format.
Thanks in advance,
Saravanan Murugesan