web
You’re offline. This is a read only version of the page.
close
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.
 
I have the same question (0)
  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,380 Super User 2025 Season 2 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,116

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 764 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 635 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans