Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Reporting - Filter Totals By - Single Quotes Problem

(1) ShareShare
ReportReport
Posted on by 2
Hi all,

I am trying to find a way to remove the leading and trailing single quotes that somehow get included when passing the following Item Journal Line filter string to the FlowFilter field /Lot No. Filter/ below.

Annoyingly, the report only works when the leading and trailing single quotes are removed, but I can't find where to remove them via code??? 




This is the code I use to populate the fields on the report:



Any suggestions woud be gratefully appreciated! 👍

Paul.
 
  • CU21051739-0 Profile Picture
    2 on at
    Reporting - Filter Totals By - Single Quotes Problem
    Does anyone know if there is already any existing standard report in the Base Application that that takes a filter containing .. or | from a record on a page and, when the report is run from an action on that page, it has a Filter Totals By field initialized in its request page without a leading and trailing single quote???
  • Lazybagsy Profile Picture
    2 on at
    Reporting - Filter Totals By - Single Quotes Problem
    Here's the code where I generate the string . As you can see, I had already tried DelChar, thinking that there were hidden quotes but the field value is ok and returns without quotes. The problem is when I then try to filter on this in the request page - single quotes then appear :S
     
    field(LotNoFilter; Rec."Lot No. Filter")
                {
                    ApplicationArea = All;
                    Caption= 'Lot No. Filter';
     
                    trigger OnLookup(var Text: Text): Boolean
                    var
                        LotDetail: Page "Lot No. Information List";
                        recLotNoInfo: Record "Lot No. Information";
                    begin
                        Clear(LotNoFilter);
                        recLotNoInfo.Reset();
                        recLotNoInfo.SetRange("Location Filter", Rec."Location Code");
                        recLotNoInfo.SetRange("Bin Code", Rec."Bin Code");
                        recLotNoInfo.SetRange("Item No.", Rec."Item No.");
                        LotDetail.SetTableView(recLotNoInfo);
                        LotDetail.LookupMode(true);
                        if LotDetail.RunModal() = Action::LookupOK then begin
                            Text += LotDetail.GetSelectionFilter();
                            //Text := DelChr(Text, '=', '"'); //TODO: Remove single quotes from filter on request form for Lot No. Filter in Report Whse. Get Bin Content (7391)
                            exit(true);
                        end else
                            exit(false);
                    end;
                }
     
     
  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,312 Super User 2025 Season 1 on at
    Reporting - Filter Totals By - Single Quotes Problem
    Hi,
     
    Please show the code where it's generating the filter.
     
    If it's your code, you can just use DELCHR to delete single quotes from string.
     
     
    Regards,
    Saurav Dhyani

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.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,997 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,831 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans