Notifications
Announcements
No record found.
report 50100 "MyQueryReport" { UsageCategory = ReportsAndAnalysis; dataset { dataitem(MyQuery; "MyQuery") { column(No; No) { } column(Name; Name) { } column(BalanceLCY; BalanceLCY) { } } } requestpage { layout { area(content) { group(Filters) { field(MinBalance; MinBalanceFilter) { ApplicationArea = All; Caption = 'Minimum Balance'; trigger OnValidate() begin // Validate and store the filter value end; } } } } } var MinBalanceFilter: Decimal; trigger OnPreReport() begin // Apply the filter from the request page to the query if MinBalanceFilter <> 0 then MyQuery.SetFilter(BalanceLCY, '>=%1', MinBalanceFilter); end; }
Hi, good day I hope this can help you, and give you some hints.
How Do I: Create a Report based upon a Query? – think about IT
Best Regards Gerardo
report 50100 "MyQueryReport" { UsageCategory = ReportsAndAnalysis; DefaultLayout = RDLC; RDLCLayout = './MyQueryReport.rdlc'; // Optional: Add your layout file dataset { dataitem(Integer; Integer) { DataItemTableView = where(Number = const(1..)); column(No; CustNo) { Caption = 'Customer No.'; } column(Name; CustName) { Caption = 'Customer Name'; } column(BalanceLCY; CustBalanceLCY) { Caption = 'Balance (LCY)'; } trigger OnPreDataItem() begin // Apply filters to the query before opening it if MinBalanceFilter <> 0 then MyQuery.SetFilter(BalanceLCY, '>=%1', MinBalanceFilter); MyQuery.Open(); // Open the query with any applied filters end; trigger OnAfterGetRecord() begin // Read the next row from the query if not MyQuery.Read() then CurrReport.Break(); // Exit when no more rows // Assign query values to report variables CustNo := MyQuery.No; CustName := MyQuery.Name; CustBalanceLCY := MyQuery.BalanceLCY; end; } } requestpage { layout { area(content) { group(Filters) { field(MinBalance; MinBalanceFilter) { ApplicationArea = All; Caption = 'Minimum Balance'; trigger OnValidate() begin // Validate the input if needed if MinBalanceFilter < 0 then Error('Minimum Balance cannot be negative.'); end; } } } } } var MyQuery: Query "MyQuery"; // Reference to your query object CustNo: Code[20]; // Variables to hold query column values CustName: Text[100]; CustBalanceLCY: Decimal; MinBalanceFilter: Decimal; // Variable for runtime filter from request page } query 50100 "MyQuery" { QueryType = Normal; elements { dataitem(Customer; Customer) { column(No; "No.") { } column(Name; Name) { } column(BalanceLCY; "Balance (LCY)") { } } } }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 3,143
Jainam M. Kothari 1,694 Super User 2025 Season 2
YUN ZHU 1,067 Super User 2025 Season 2