Change custom report layout by C/SIDE

Roger
Member Posts: 57
If I have a report with two defined custom reports, how can I choose one of this layouts before printing the report? I wnat to to that by C/SIDE. Is it possible?
Thanks for all answers.
Thanks for all answers.
Many thanks, Roger
0
Comments
-
Hi Roby,
Thanks for answer, i'll check thatMany thanks, Roger0 -
Hi Roger,
Can you say me if the Roger answer helped you and if so can you explain in details how it works ?
Thanks in advance.
Michael0 -
Hi Roger,
Can you say me if the Roby answer helped you and if so can you explain in details how it works ?
Thanks in advance.
Michael0 -
Hi Michael,
No, the way in Robys answer was not that was i have needed. But in BC140, there a a new event who solved exactly what i want.
Codeunit 951 "Document Report Mgt." has the event OnAfterGetCustomLayoutCode. With this event i was able to change the custom layout, which user can choose on an page who i have provided for that, like this:
LOCAL [EventSubscriber] OnAfterSetCustomLayoutCode(ReportID : Integer;VAR CustomLayoutCode : Code[20])
IF SelectionHeader.GET(PrintCode) THEN BEGIN
IF SelectionHeader."To Thank Letter Rep. Lay. Code" <> '' THEN BEGIN
CustomLayoutCode := SelectionHeader."To Thank Letter Rep. Lay. Code";
END;
END;
Hope, this helpsMany thanks, Roger0 -
Hi Roger,
Unfortunately I work on NAV 2017 and not on BC, I think that I will create two different reports in place of two layout.
Thanks for your reply and your help/
Michael0 -
Hi Michael
May it could be a solution to implement your own publisher event "OnAfterSetCustomLayoutCode" in codeuint 9651. Then you'll have the same possibility as in BC.
RogerMany thanks, Roger0 -
Yes I see this codeunit and the function "TryUpdateRdlcLayout". I will try this option.
Thanks again,
Michael0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions