Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

How to autofill Item n° after launch the report + save local

Posted on by 20

Hi everyone,

I have created an action on my card page that lauch the report

No problem...

But i try to autofill the field "code article" with the value from the main card page...

And i dont see how to do it...

pastedimage1683582306429v1.png

My code in my main page

        // Add the action called "TDS PRINT" to the action menu
        area(Processing)
        {
            action("TDS PRINT")
            {
                Promoted = true;
                PromotedCategory = Process;
                ApplicationArea = All;
                Image = Print;
                RunObject = report TDS;
            }
        }

And the code on report page

report 95120 TDS
{
    DefaultRenderingLayout = "TDS-SO-FR";
    dataset
    {
        dataitem(TDS; TDS)
        {
            RequestFilterFields = "Code article";
            column(Acidite; Acidite)
            {
            }
            column(Bio; Bio)
    ...

Also, is it possible to add a second action ( next to "TDS print" action ) to save locally the report in pdf but with a custom filename ?

Thanks in advance for your help.

  • Neodep Profile Picture
    Neodep 20 on at
    RE: How to autofill Item n° after launch the report + save local

    Thanks Zhu, and on your website i also find how to do with my multiple layout choice before print

    https://yzhums.com/25943/

  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 73,339 Super User 2024 Season 2 on at
    RE: How to autofill Item n° after launch the report + save local

    Hi, Please try the following.
    Report.Run() Method: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/report/report-run-method

    pastedimage1683592150760v1.png

    pastedimage1683592162126v2.png

    pastedimage1683592171935v3.png

    Hope this helps.

    Thanks.

    ZHU

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templates⚡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans