web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
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.
 
I have the same question (0)
  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,414 User Group Leader on at
    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
  • Lazybagsy Profile Picture
    2 on at
    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;
                }
     
     
  • CU21051739-0 Profile Picture
    2 on at
    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???

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,850 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,045 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans