![]() |
#1 |
Участник
|
When designing RDLC reports it is an advantage to have all the report controls which you often use close at hand. As many you know I give out my template reports when you attend one of my many RDLC Reporting Training classes, but after multiple requests I now also place these Template Reports on my public SkyDrive. If you want to use or modify them it is of course up to you, but these template reports increases my speed when I create RDLC reports, so maybe they can also help you become faster when designing RDLC reports.
Here is an image of my Portrait Letter template report for NAV 2013 R2: ![]() Every time I design a new report I will get this report shown to me. To accomplish this I replaced the existing report.rdlc file found in the ReportLayout folder in the RTC folder. As you see I have quite a few elements on this report. Notice that all elements are using the rules outlined in the Report UX Guidelines released by Microsoft now almost 2 years ago. A bunch of standard reports in NAV 2013 and NAV 2013 R2 have been designed after these guidelines. Please notice that the Report Guidelines says that you need to use textbox height of 10 pt. This is a unfortunately a mistake. If you use 10 pt. height in your textboxes AND 8 pt font size you will in some cases have the bottom of the letters: j, g and p cut of. To avoid this I’m now using 11pt. in height for all my cell heights, except the title which needs to be 20pt. in height and 14pt. font size. For font I’m using Segoe UI. Segoe UI, is the standard font use in Windows. If you are curious about the guidelines for Windows read mere here: http://msdn.microsoft.com/library/wi...sktop/aa511440 And specific for the font Segoe UI, read here: http://msdn.microsoft.com/library/wi...sktop/aa511440 In the Page Header I have the following textboxes: 1. Title which says INSERTTITLE. Title is unique to each report so you need to change this. 2. Company name. Here you need to insert Company name information. Since I cannot have data bound fields in my template report you will need to add this as well. 3. Execution Time. This field is not data bound, so you can just leave this field 4. Page Caption and PageNumber. Here PageNumber is not data bound while the PageCaption is, so you will need to add the PageCaption to your dataset and add this to this textbox. Notice that you will need to delete “INSERTPAGECAPTION” and create a new placeholder to add you new PageCaption from dataset, since I already have 2 Placeholders in this Textbox. If you don’t like this, just modify the template report, so it fit your needs. 5. Spacer. Just below the CompanyName I have a spacer which is 20pt in height as outlined in the Report UX Guidelines. In some standard reports this spacer has been removed after the report developer has designed the report, but I find it good practice to keep this, since it is much easier to keep this space between the header and body when you make modifications. I often just open my Template report and copy the page header part over to an existing report where Page header is missing or not designed correct. Therefore I have place a rectangle around all my elements in the page header so it easy to copy the rectangle, since this will just include all of the above fields. In the Body I have added the 3 different tablixes all with the correct dimensions according to the Report UX Guidelines. Correct height 11pt. for cell height, font set to Segoe UI, just like I have in my page header. When I create RDLC report I constant need 1 or more of these Tablixes in my report. And having these tablixes setup correctly is a huge time saver for me. I.e. I have set the following up the Tablix used for list reports:
![]() Also in my template I have few code snippets I use:
You can find my template reports for NAV 2013 and 2013 R2 here on my SkyDrive, and if you prefer to have them as objects in your database instead you can also import them. These reports have a little more added since the data bound compared to single Report.rdlc which we just copied into “C:Program Files (x86)Microsoft Dynamics NAV71RoleTailored ClientReportLayout” I hope your speed of creating reports will increase by using my Template reports. If the do not fit your setup, I urge you to create your own, because these are a huge help when creating and modifing reports. You can also just have different report.rdlc files places in a folder which you can just open in Visual Studio and copy from when needed. /Thanks, Claus Lundstrøm, MVP for Microsoft Dynamics NAV Abakion.com & Supplychainbox.com Читать дальше
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|