NAV 2013 Reports-Avoid blancks with empty text box

poppins
Member Posts: 647
Hi everyone,
I am having an issue with empty text boxes in my reports.
I want to avoid the blanck space generated if the textbox is empty.
I tried to use the visibility property of the textbox this way:
How can I get rid of it?
Thanks in advance
I am having an issue with empty text boxes in my reports.
I want to avoid the blanck space generated if the textbox is empty.
I tried to use the visibility property of the textbox this way:
=iif(Fields!CompanyAddr6.Value="", TRUE,FALSE)and this way:
=iif(isNothing(CompanyAddr6.Value), TRUE,FALSE)but it didn't work both ways, the empty space is still here ](*,)
How can I get rid of it?
Thanks in advance

0
Comments
-
If in the body use a filter instead visibility then it works. You of course need to add a table before you can filter, but just add a table with headers rows only.
/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 -
I am using Code.GetData function for the fields in the header. for me
=iif(Code.GetData(14,6) = "",true,false)
is working________________________________
Gunnar Gestsson
Microsoft Certified IT Professional
Dynamics NAV MVP
http://www.dynamics.is
http://Objects4NAV.com0 -
In headers it is not working, using visibility will not remove the actual space the textbox is using. Try to make 3 textboxes on top of each other and color them i.e. red, yellow and green.
Now hide the yellow textbox and render your report. You will now see that it is not working, since the space of the yellow textbox still renders.
For us to fix this in headers I only see one way to do this.
Solution: You need to put all your Company Address fields in one textbox and use Carriage Return, Chr(10), after each expression, and set the CanGrow property to True.
I have created a small demo report, which illustrate how to do this.
WARNING!!! Page Header is not dynamic, so if you do not leave space in the PageHeader for the amount rows you expect the textbox to grow, the last rows will not be printed.
It may look OK, in Print Preview, but always remember to check Print Layout, which is the actual picture of how the report looks when printed.
You can find the small demo report here in pdf, txt, fob and OfflineReport files:
http://sdrv.ms/12WRcLk
/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 -
clausl wrote:In headers it is not working, using visibility will not remove the actual space the textbox is using. Try to make 3 textboxes on top of each other and color them i.e. red, yellow and green.
Now hide the yellow textbox and render your report. You will now see that it is not working, since the space of the yellow textbox still renders.
For us to fix this in headers I only see one way to do this.
Solution: You need to put all your Company Address fields in one textbox and use Carriage Return, Chr(10), after each expression, and set the CanGrow property to True.
I have created a small demo report, which illustrate how to do this.
WARNING!!! Page Header is not dynamic, so if you do not leave space in the PageHeader for the amount rows you expect the textbox to grow, the last rows will not be printed.
It may look OK, in Print Preview, but always remember to check Print Layout, which is the actual picture of how the report looks when printed.
You can find the small demo report here in pdf, txt, fob and OfflineReport files:
http://sdrv.ms/12WRcLk
/Claus Lundstrøm
I tried your method but it didn't work...
I have four textboxes, with expressions: CompanyAddr3, CompanyAdrr4,CompanyAddr5 andCompanyAdrr6
The problem is that when CompanyAdrr 5 and CompanyAdrr6 are empty, I am left with a blanck space...
Even with your method, the white space is still here...
I tried to put both properties CanGrow and CanShrink to True, but the white space is still here ](*,) ](*,) ](*,)0 -
poppins wrote:thegunzo wrote:I am using Code.GetData function for the fields in the header. for me
=iif(Code.GetData(14,6) = "",true,false)
is working
I've already tried that, it didn't work
if your aim is to remove the white space you will have to move the data from the header section to a table header in the body section. I think that is the only way.________________________________
Gunnar Gestsson
Microsoft Certified IT Professional
Dynamics NAV MVP
http://www.dynamics.is
http://Objects4NAV.com0 -
Ok I did a little more test. I have now modified report 208 to behave as you expect.
I needed to do 3 expresssion in 1 textbox to get it working. This is not possible in Visual Studio 2008, so we need NAV 2013 and VS 2010 to be able to do this trick.
Modified Report 208 is now in the same folder as the other files:
http://sdrv.ms/12WRcLk
I marked the textbox orange to make it clear which textbox I have changed.
/ClausClaus 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 -
It is actual quite simple to do :-)
But do remember that the Page Header is not dynamic, so Page Header has to be big enough.
/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 -
clausl wrote:Ok I did a little more test. I have now modified report 208 to behave as you expect.
I needed to do 3 expresssion in 1 textbox to get it working. This is not possible in Visual Studio 2008, so we need NAV 2013 and VS 2010 to be able to do this trick.
Modified Report 208 is now in the same folder as the other files:
http://sdrv.ms/12WRcLk
I marked the textbox orange to make it clear which textbox I have changed.
/Claus
I tried to design the report 208 to look at the textbox expression but I couldn't get it...
I didn't understand how you put 3 expressions in one textbox...
Can you please put the expression of the orange textbox??
It worked indeed, but I didn't understand how you did it :oops:0 -
A textbox has 2 modes you can select it.
1. Overall select. It is like Excel when just selecting the cell. In this mode Properties for textbox are shown.
2. Inside select. It is like F2 in Excel. In this mode you can create placeholders. Right click and Create Placeholder.
So I used mode 2 and added 3 placeholders. Each placeholder has it's own Expression. This a really cool thing we can do in NAV 2013. You could i.e. also use this if you need different colors on data in one textbox.
My 3 expressions look like this, all in one textbox which has CanGrow=True
First Expression:
=Code.GetData(14,1)
& Chr(10) & Code.GetData(15,1)
& Chr(10) & Code.GetData(16,1)
& Chr(10) & Code.GetData(17,1)
Second Expression:
=iif(Code.GetData(18,1) = "","",Chr(10) & Code.GetData(18,1))
Third Expression:
=iif(Code.GetData(19,1) = "","",Chr(10) & Code.GetData(19,1))
/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 -
Thanks clausl..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