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

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

Subst

  • Sr. Member
  • ****
  • Posts: 450
    • 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: 1005
    • 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: 450
    • 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: 1005
    • 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: 1005
    • 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: 1005
    • 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: 1005
    • 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: 1005
    • 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  ;)