Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: Empty field on a band with auto height  (Read 9539 times)

Subst

  • Sr. Member
  • ****
  • Posts: 444
    • View Profile
Re: Empty field on a band with auto height
« Reply #15 on: June 09, 2018, 05:39:22 AM »
To Alex:

не вполне канает, невозможно убрать полностью этот кусок текста, если даже все переменные будут пустые, то высота Итема уменьшится до размеров, указанных в дизайнере, но не меньше :( Потому как общие размеры банда в сторону минимума ограничены итемама внизу, которые содержат текст

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 992
    • View Profile
Re: Empty field on a band with auto height
« Reply #16 on: June 09, 2018, 09:58:41 AM »
Subst
Полное отсутствие текста в этом айтиме мне видится вырожденным случаем :) да и даже если и так ничего не мешает сделать его высотой в 1 пиксель и пускай растет себе :)

The complete lack of text in this item seems to me a degenerate case :) and even if it does nothing hinders making it 1 pixel high and let it grow :)

Subst

  • Sr. Member
  • ****
  • Posts: 444
    • View Profile
Re: Empty field on a band with auto height
« Reply #17 on: June 09, 2018, 10:34:45 AM »
To Alex:

Канеш, можно, и такая мысль приходила в голову. Но вот в том письме, что у тебя пустым пришло, я как раз описал подобный случай, как у меня голову снесло в одном отчете который поправили девочки подобным образом. Но там обратный случай, у бэнда автовысота, у итема нет, итем в конце по вертикали. Они выставили высоту его принудительно, а у меня скриптом определяется пустое содержимое. 2 часа не мог понять откуда у меня пустое место появляется :D

Kiko

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Empty field on a band with auto height
« Reply #18 on: June 11, 2018, 12:41:33 PM »
Subst thanks for your help but it didn't work for me.

Alex, your solution works but in the future is there a possibility "autoHeight" have the behavior described above?

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 992
    • View Profile
Re: Empty field on a band with auto height
« Reply #19 on: June 11, 2018, 01:14:31 PM »
Kiko, In your case when the elements are located one under the other it is easy to implement, but in most cases the elements are not in such a simple location order and i did not find an universal solution for this task
« Last Edit: June 11, 2018, 01:22:09 PM by Arin Alex »

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 992
    • View Profile
Re: Empty field on a band with auto height
« Reply #20 on: June 21, 2018, 02:54:42 PM »
Good news :) I have found the solution for this task.
1. Vertical layout has been added to limereport (develop branch at github).
2. All layouts from now has property "hideEmptyItems"
3. If you for some reason don't want to hide all empty items then you
can use the TextItem's property "hideIfEmpty" instead  "hideEmptyItems" 

Important: In order for the band size to change,
you do not have to place the report items from the bottom of the vertical layout     
« Last Edit: June 21, 2018, 03:00:19 PM by Arin Alex »

solomon78

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Empty field on a band with auto height
« Reply #21 on: June 21, 2018, 11:16:56 PM »
please can your share the link?

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 992
    • View Profile

Kiko

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Empty field on a band with auto height
« Reply #23 on: June 26, 2018, 02:50:04 PM »
Hello Alex,

I've been trying to update my report after your changes.
I used the propertys "hideIfEmpty" and "hideEmptyItems" in my report and the problem persists.

Can you take a look on my reports ?
Only the variable $V{empresaMorada} have text, the others below are empty.

Regards.

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 992
    • View Profile
Re: Empty field on a band with auto height
« Reply #24 on: June 26, 2018, 06:46:25 PM »
Kiko Hi !

Quote
Important: In order for the band size to change,
you do not have to place the report items from the bottom of the vertical layout
     
I have changed your report to demonstrate how to use vertical layout in your case.
« Last Edit: June 26, 2018, 11:19:18 PM by Arin Alex »

Kiko

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Empty field on a band with auto height
« Reply #25 on: June 27, 2018, 05:55:33 PM »
Hi Alex,

Unfortunately still doesn't work, the report only show the bold label centered in the report with the text "Name:", all items below this label disappears.

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 992
    • View Profile
Re: Empty field on a band with auto height
« Reply #26 on: June 28, 2018, 09:30:32 AM »
Kiko Hi.
Your screenshot looks like you use master branch for render the report, but vertical layout will work only on the develop branch. Check it please. For me it looks like that: First screen - all variables filled, the second all variables empty excetpt for empresaMorada

Kiko

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Empty field on a band with auto height
« Reply #27 on: June 29, 2018, 02:32:50 PM »
Hello Axel,

It works now, thank you  ;)