Skip to main content

Notifications

Business Central forum
Suggested answer

Reporting - Filter Totals By - Single Quotes Problem

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.
 
Categories:
  • CU21051739-0 Profile Picture
    CU21051739-0 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
    Lazybagsy 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
    Saurav.Dhyani 12,745 User Group Leader 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

Helpful resources

Quick Links

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Blog subscriptions now enabled!

Follow your favorite blogs

TechTalk: How Dataverse and Microsoft Fabric powers ...

Explore the latest advancements in data export and integration within ...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,860 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,155 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans