Microsoft Dynamics NAV 2013 RDLC Reporting RBC Attacks: Part 1 of 10
Ask any NAV developer and they can tell you exactly what an RDLC brain cramp feels like.
It is a pain behind the eyes that causes you to want to stare into space for hours, and bite the heads off innocent gummy bears. This intense pain is preceded by hours wasted searching one forum after another, searching NAV hotfix descriptions, and pillaging through standard NAV reports trying to resolve an RDLC report issue. When the pain grows so strong that you can no longer put into words the issue, you may be heard muttering things like, “Why? Why?” and “I already tried that!” and “I wonder if Wendy’s is hiring?”
After suffering several of these RDLC Brain Cramps myself, muttering the above and several other phrases I won’t dare mention, I’ve made a list of 10 common problems in RDLC (short for “Report Definition Language Client”) report development and their solutions. Think of them as an immunization shot for an R.B.C. (a.k.a. RDLC Brain Cramp, which I am certain will become a medical term once our pain is correctly diagnosed!)
So without further pain and suffering, let’s begin with Part 1 of this 10 part series.
RBC 1: Line Spacing Is Inconsistent Across the Page
I first encountered this on a MICR check layout where the “Pay To The Order Of” line was to be printed in a larger font than the signature lines on the right. When the font on the right is not the same as the left, you can often get inconsistent line spacing, as shown below in a sample report:
Figure 1 – Ship To label showing inconsistent line spacing
Notice the horizontal spacing of the “Ship To:” section above is inconsistent – especially after the Ship To Name field and before the first address line.
The RDLC layout doesn’t show blank spaces between the lines, as you can see below:
Figure 2 – Screenshot showing the RDLC does not show blank spaces
The issue is that, for some reason, the font size on the right wants to attack the spacing on the left. The solution is so simple! CAGE that animal on the left so it cannot attack the right!
In the RDLC report layout, open your toolbox and find RECTANGLE. Drag it onto the report and place it around the entire section on the left, as shown below.
Figure 3 – Line inconsistencies are mitigated by first enclosing the larger font section with a Rectangle
The results are exactly as they should be, with the horizontal spacing on the left having no effect whatsoever to that on the right.
Figure 4 – Final shipping label without the line inconsistencies
Now, here’s the kicker. I’ve seen the exact same thing on other reports and it has no effect at all. What causes it? Heck, I don’t know, but it doesn’t keep me up at night! All I do know is that, by the time I found the cure to this RBC, all I wanted to do was walk away with my report held high feeling like Xena, RBC Warrior Princess!
The rectangle is a valuable tool for isolating data elements on your report. The one drawback is that when you need to modify your fields within the rectangle, you have to move it off the fields. But don’t let that stop you from using it. There are times that the rectangle will save your sanity!
Thanks for reading, and I hope this helps prevent your next RBC. Come back each week, as we will have a new tip in our RBC series aimed at the cure and prevention of RLDC Brain Cramps.
Note: No gummy bears were harmed in the creation of this blog.
ArcherPoint is delighted to offer tips to developers throughout the NAV community, but code samples are not warranted, as all installations are different. It is advised that the developer verify that the solutions work for his or her installation of Dynamics NAV before implementing the code.
Read Part 2 of the RDLC Brain Cramp (RBC) series.
For more information or assistance with NAV development, read more developer blogs by Faithie Robertson or contact ArcherPoint directly.