Skip to main content

Notifications

Community site session details

Community site session details

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

Setting Filters on a Report Request Card

(0) ShareShare
ReportReport
Posted on by 54
Hello,
 
I'm trying to implement some custom code for Batch Draft Invoice previewing.
 
Currently, we're looping through the selected Sales Invoices and then calling DocumentPrint.PrintSalesHeader(Rec)
 
This works OK, but I'd like to remove some of the filters so that the previewer shows all invoices in the selected range. 
 
If I manually remove the Bill To Customer and the Invoice No. I get the correct behaviour. How can I remove these programatically?
 
////////
 
 
Any assistance would be very helpful.
 
Kind Regards,
D
 
 
 
 
  • ManishS Profile Picture
    80 on at
    Setting Filters on a Report Request Card
    The Draft invoice is mapped to be printed from sales invoice page only, if you look into the AL, there is no UsageCategory defined, if it would have been then you might get blank filters.
     
    Why this has been set ,if for accidently printing a bunch of invoice into the printer.
    As these are table filter and not on a request page filters, seems you cannot remove it 
     
    You can try to copy the report & its layout and create your own report with UsageCategory= ReportsAndAnalysis. 
     
  • Suggested answer
    YUN ZHU Profile Picture
    81,304 Super User 2025 Season 1 on at
    Setting Filters on a Report Request Card
    Hi, hope the following can give you some hints.
    Dynamics 365 Business Central: Can we change default options/filters on the request page of Report???: https://yzhums.com/40072/
     
    Thanks.
    ZHU
  • Community member Profile Picture
    54 on at
    Setting Filters on a Report Request Card
    Does that mean I have to extend the request page to control the filters? Is there not a way of setting those when calling?
  • Suggested answer
    Kamal Khakhkhar Profile Picture
    396 on at
    Setting Filters on a Report Request Card
    Hii Every One,
     
    As per the Requirement you need to remove all the filter and need your custom filters only.
    For that you need to put the following code as per below example.
     
    DataItemTableView = sorting("Key Of DataItem"); RequestFilterFields = "Document Type";
     
    where you can write the Required Filter Fields as per your requirement.
     
    Thank You,
    Kamal Khakhkhar

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March 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... 294,075 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,860 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans