Hack: 100 in 1 Report - Dynamic report layouts in Business Central

Фильм және анимация

Find more information at my blog https:/www.hougaard.com or follow me on / ehougaard

Пікірлер: 40

  • @meriahabdelmoneim1284
    @meriahabdelmoneim12843 жыл бұрын

    Great video. Very clear !

  • @RogerSlides
    @RogerSlides3 жыл бұрын

    Awsome tutorial Erik!

  • @rishichourey
    @rishichourey3 жыл бұрын

    Custom Report Layout is beautiful functionality given by Business Central. We have used the same report ID of Sales Invoice and created 6 different formats of Sales Invoices for 6 countries :), Based on the company it will display to the corresponding layout only.

  • @vineethr2k7
    @vineethr2k73 жыл бұрын

    Thank you Erik for this trick

  • @anada1124
    @anada11243 жыл бұрын

    Thank you, Erik. Microsoft should make your solution as part of the standard report object.

  • @hugo_alves
    @hugo_alves7 ай бұрын

    This is a video i'd like to thumbs up a hundred times if i could!

  • @ercanismail3893
    @ercanismail38933 жыл бұрын

    I'm just starting my journey of learning development in AL. I would be tempted to copy the original request page and add a section there which lists the available layouts for the user to select plus the ability to make a new one. Great video as always!

  • @Hougaard

    @Hougaard

    3 жыл бұрын

    You cannot do that, the layout is selected/fixed when then request page is shown. That's why it has to be done at OnInitReport() - That's the last chance.

  • @francescomollica144
    @francescomollica1443 жыл бұрын

    amazing tutorial

  • @Genius5438
    @Genius54382 жыл бұрын

    Thanks Eric. Great Video. I tried using one report with multiple layouts like you did, however for some reason after running the report it showed me the layout but it also changed all the layouts of standard reports.

  • @Hougaard

    @Hougaard

    2 жыл бұрын

    Really?

  • @Genius5438

    @Genius5438

    2 жыл бұрын

    @@Hougaard Yes. But the solution was to do settemplayoutseletced('') after executing the report and all back to normal.

  • @sonnyjim4047
    @sonnyjim40473 жыл бұрын

    Hi Eric, Great video and tried to change the standard Sales Invoice by changing trigger after creating a copy; trigger OnInitReport() var RLS: Record "Report Layout Selection";//*select custom layout custom begin //custom code Layout.Setrange("Report ID", 61306);//Layout declared as a variable at the end of this page if page.RunModal(61306, Layout) = action::LookupOK then RLS.SetTempLayoutSelected(Layout.Code) else Error('Please select layout'); only thing is once the you select the layout from the new page "Select Layout" it goes to the standard request page and then when run the report (preview) it goes back to "Select Layout" page again and then when selected (for the second time) , report exports to PDF

  • @Hougaard

    @Hougaard

    3 жыл бұрын

    You should be able to control that in a global variable.

  • @ehsanm64

    @ehsanm64

    2 жыл бұрын

    Erik Hougaard Hi Erik , would you please tell me how can we do that with global variable?

  • @bhagwanjijha1146
    @bhagwanjijha11463 жыл бұрын

    Great

  • @ricardo041996
    @ricardo0419962 жыл бұрын

    Hi Erik, thank you for the useful videos. Is it possible to reduce the image size from your video? Sometimes I can't see so well the Problems notification area on VS Code. Thanks

  • @artemkeller2571
    @artemkeller2571 Жыл бұрын

    Hey Erik! Thanks for this video. That helped. One thing - this method involves manually uploading layouts in "custom layouts" each time you want to modify layout. We are using "rendering" section inside report extensions to import different layouts. My question is - is it possible to choose which report to run by uploading them this way? Inside Report Extension it looks like this: rendering { layout("My Sales Order Confirmation") { Type = RDLC; LayoutFile = 'My Sales Order Confirmation.rdl'; } layout("My Sales Order Confirmation Email Text") { Type = Word; LayoutFile = 'My Sales Order Confirmation Email Text.docx'; } layout("My Sales Draft Invoice") { Type = RDLC; LayoutFile = 'My Sales Draft Invoice (for Sales Order).rdl'; } }

  • @Hougaard

    @Hougaard

    Жыл бұрын

    Be aware, that this video was recorded before reportextensions existed, and before BC could do layout selected with the rendering section .... Making this video obsolete :)

  • @vh8000
    @vh80003 жыл бұрын

    👍👍👍 Thanks

  • @Hougaard

    @Hougaard

    3 жыл бұрын

    Welcome 👍

  • @ant1d0te
    @ant1d0te3 жыл бұрын

    Layout is one of the easiest part if customer asks for changes. The main issue for customers is change of logic and grabbing fields from other tables (or even from existing if they weren't added to dataset). I hope MS provide some good looking Report Extension (they promised for next global BC release afair).

  • @Hougaard

    @Hougaard

    3 жыл бұрын

    Yeah, but until we see something like reportextension, you have to use the substitute report functionality as seen here: kzread.info/dash/bejne/o6CZtamDgaeXZJs.html

  • @cioadvise6645
    @cioadvise66452 жыл бұрын

    Eric, my video studio does not show the AL File Wizard. Do I have to install anything to get that to work? I have run AL!Go already. Thanks in advance.

  • @Hougaard

    @Hougaard

    2 жыл бұрын

    Did you install the AZ AL extension in VS Code?

  • @businesscentral-explained1703
    @businesscentral-explained17033 жыл бұрын

    Thanks for the video! Is there any efficient way i can make a page action run a standard report - f.ex. the standard sales order confirmation with a specific layout? In that case i can not modify the init trigger in the report. Or is the only way i can do that by duplicating the report?

  • @Hougaard

    @Hougaard

    3 жыл бұрын

    you can set the layout before calling the report.

  • @chirangaranasinghe8251
    @chirangaranasinghe8251 Жыл бұрын

    As a beginner, from which video I should start to learn ? is there any playlist for beginners. thank you

  • @Hougaard

    @Hougaard

    Жыл бұрын

    kzread.info/head/PLnldREWlGR0vmyMwB5lmqWjK9KBMwn05s

  • @danykanaan286
    @danykanaan286 Жыл бұрын

    Hi Erik thank you for your videos. I started Coding with AL 2 month ago and you are of great help. But saddly i have one problem with this solution right now. If I have set the SaveValues property in the request page to true it will run through the OnInit trigger again when clicking preview and open the Selection page again and then does not give me a proper preview of the report, but instead downloads a file with no doctype. I have set the SaveValues so the requestpage does not close when previeweing the document. Is there a solution to this problem? Should i use a global trigger instead of the onint (Like SelectReportLayoutCode)?

  • @Hougaard

    @Hougaard

    Жыл бұрын

    This solution has actually being adopted by Microsoft, so in version 21 you can select a layout out of the box.

  • @IMAS-vf2ur
    @IMAS-vf2ur Жыл бұрын

    Nice tutorial. Do you know how to change the report layout programmatically which is from "Report Layout List" table? Thanks

  • @Hougaard

    @Hougaard

    Жыл бұрын

    ReportLayoutSelection.SetTempLayoutSelected(LayoutCode);

  • @UweMicha
    @UweMicha11 ай бұрын

    Hi Erik, is it possible to make sub reports in a rdlc layouts for BC? Did you already made a video about that? I did't find it... In the ReportBuilder you can add a sub report but it ask for a URL to a given report.... (???)

  • @Hougaard

    @Hougaard

    11 ай бұрын

    Sorry, I don't think that's possible :(

  • @jnaneshc4302
    @jnaneshc43025 ай бұрын

    can you please do the report amount in words for multiple currencies without hardcoding please

  • @faaizahmed3146
    @faaizahmed31463 жыл бұрын

    Dear Erik, can i preview the report without using run request page??

  • @Hougaard

    @Hougaard

    3 жыл бұрын

    Not that I'm aware of ...

  • @linojrasmolo7161
    @linojrasmolo71613 жыл бұрын

    Hi Eric, Can i directly call this custom layout using an action button?

  • @Hougaard

    @Hougaard

    3 жыл бұрын

    Yes you can! Return.Run works fine with this report...

Келесі