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:
=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
Comments
/Claus Lundstrøm
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 :-)
The textbox I am dealing with is in the header of the report...
=iif(Code.GetData(14,6) = "",true,false)
is working
Gunnar Gestsson
Microsoft Certified IT Professional
Dynamics NAV MVP
http://www.dynamics.is
http://Objects4NAV.com
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'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 :-)
I've already tried that, it didn't work
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 ](*,) ](*,) ](*,)
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.com
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'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 :-)
But do remember that the Page Header is not dynamic, so Page Header has to be big enough.
/Claus Lundstrøm
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 :-)
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:
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øm
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 :-)