Converting Reports- OnPreSection() trigger

poppins
Member Posts: 647
Hi everyone,
I am converting some reports from Nav 2009 R2 to Nav 2013...
For some reports, there is several lines of code in the OnPreSection() trigger, which is no longer supported by Nav 2013...
What shall I do to include this code in the converted report???
I am converting some reports from Nav 2009 R2 to Nav 2013...
For some reports, there is several lines of code in the OnPreSection() trigger, which is no longer supported by Nav 2013...
What shall I do to include this code in the converted report???
0
Comments
-
Are the reports having rdlc data in NAV2009R2 and working fine in RTC?0
-
mohana_cse06 wrote:Are the reports having rdlc data in NAV2009R2 and working fine in RTC?
There is RDLC data but the the parts with code on that trigger don't display in RTC...0 -
Here is an example of the code in OnPreSection() trigger:
MyRec.SETRANGE(x1,var1); MyRec.SETRANGE(x2,var2); IF MyRec.FINDFIRST THEN CurrReport.SHOWOUTPUT(TRUE); ELSE CurrReport.SHOWOUTPUT(FALSE);
Where can I put that code???0 -
Is the report running same as classic in NAV2009R2?0
-
mohana_cse06 wrote:Is the report running same as classic in NAV2009R2?0
-
Then you need to modify the report logic in NAV2009R2 first and then import into NAV2013 once it is working fine in NAV2009R2 RTC.0
-
Hi poppins,
Section Designer belongs to Classic reports, and as you know Classic reports are not supported in NAV 2013, so all Section Designer code is deleted when you upgrade your report to NAV 2013. But if your report has RDLC layout in NAV 2009 and working, you should be fine, because the code you have in the Sections Designer is not supported in NAV 2009 either, when running a RDLC report. Only works when running Classic report. So really you should be fine if your RDLC report works.
If not, a good place to put code from the section designer is on the OnAfterGetRecord on the Dataitem which is producing your lines for your dataset.
/Claus LundstrømClaus Lundstrøm | MVP | Senior Product Manager | Continia.com
I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)0 -
Since you try to hide the section based on conditions, you can transfer the result of the condition (the bool result of myRec.Findfirst) to the dataset.
Then you can set the visibility (Property "Hidden") in the RDLC acording to your condition (eg: =Fields!<YourConditionFieldName>.Value)0
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