Processing Reports vs. Codeunits

Mike_HWG
Member Posts: 104
Hey all,
I'm trying to increase my knowledge of best practices.
I thought I had seen a discussion on this before, but I can't find it.
Codeunits vs Processing-Only Reports
1. Is there any performance difference?
2. Is there a clear reason to use one over the other?
My guesses is that a codeunit would have a smaller object size and lower memory footprint - not enough to matter in this day and age, just something to think about. I'm also betting the codeunit runs faster. My guesses is because there's less to compile - no pre-defined properties settings, etc., that get front-loaded by the code.
Lastly, a codeunit frees up licensing space for other reports that may not have a direct codeunit translation.
Thoughts?
I'm trying to increase my knowledge of best practices.
I thought I had seen a discussion on this before, but I can't find it.
Codeunits vs Processing-Only Reports
1. Is there any performance difference?
2. Is there a clear reason to use one over the other?
My guesses is that a codeunit would have a smaller object size and lower memory footprint - not enough to matter in this day and age, just something to think about. I'm also betting the codeunit runs faster. My guesses is because there's less to compile - no pre-defined properties settings, etc., that get front-loaded by the code.
Lastly, a codeunit frees up licensing space for other reports that may not have a direct codeunit translation.
Thoughts?
Michael Hollinger
Systems Analyst
NAV 2009 R2 (6.00.34463)
Systems Analyst
NAV 2009 R2 (6.00.34463)
0
Comments
-
Most end users have report development licenses but not codeunits.
Reports have a built in processing cycle so are very easy compared to codeunits. (Though some reports ignore the processing cycle - no data sections).
Most end users have 100 custom report objects but not always codeunits.
Codeunits can be much faster because you control the processing.
For best speed, you can't beat SQL. SQL updates should be used only in special situations where the processing is not using hard to reproduce NAV business logic and is best checked out a test database first, since you can really mess up a database wit SQL done wrong.David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
If you don't know what you're doing, use Process only reports.
Performance wise, they're both the same.Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
If you don't know what you're doing, use Process only reports.
Now that sounds like an invitation to disaster!
(I know that is not what you meant, but someone who shouldn't may take it literally....)David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
I'd say if you don't know what you're doing, use neither and let a professional take care of it. Even then, there are so-called 'professionals' in here that don't know what they're doing either, so that's a complete wash too
The biggest advantage of a report object is that it provides a very easy way to get user input, which is very difficult to do with a codeunit. If you need user input, use a report. If you don't need user input it's up to you. Some people like how a report objects is an easy looping mechanism. It kind of visualizes the nesting in the data, so it is a little bit easier to program. It's a feel thing I think, more than anything, personal preference.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