LimeReport Forum

General Category | Основное => Discussion | Обсуждение => Topic started by: maurosanjo on December 06, 2016, 05:13:19 PM

Title: Empty field on a band with auto height
Post by: maurosanjo on December 06, 2016, 05:13:19 PM
Hello Arin,

Still investigating LimeReport hehehe  :D

In previous posts here regarding the option to supress empty fields, it is only for warnings or for also the space that geometry of the field takes on the report?

I did some testing and the field is still present but empty. Is there any way to supress the field so the band with autoheight that contains it will have its height decreased?

Regards
Title: Re: Empty field on a band with auto height
Post by: Arin Alex on December 07, 2016, 08:28:13 PM
I will thinking about it  :)
Title: Re: Empty field on a band with auto height
Post by: maurosanjo on December 26, 2016, 10:32:53 PM
Hello Arin,

There is no other way of achieving that?

Also, do you have a development documentation to ease the study of LimeReport sources? This would help code contributions :)

Regards!
Title: Re: Empty field on a band with auto height
Post by: Arin Alex on December 27, 2016, 09:24:48 PM
Hi
I can offer the following solutions:
put fields that you want to suppress on subdetail band and set visibility of the band to false when you want to hide this fields
it wil work on latest (1.4) version. Example is attached.

Quote
Also, do you have a development documentation to ease the study of LimeReport sources?
Unfortunately there is no development documentation :(
Title: Re: Empty field on a band with auto height
Post by: maurosanjo on January 09, 2017, 02:12:45 PM
Hello Arin,

Unfortunately the subdetail won't do the trick, they appear for each row on the data band, what I want is only once per group so GroupHeader would be the one. The fields will be customized by the user regarding visibility.

Thanks for your kind attention.
Title: Re: Empty field on a band with auto height
Post by: Kiko on June 07, 2018, 08:02:16 PM
Hello everyone,

The property "autoHeight" still does not suppress the text field when it is empty.
Is it supposed to do this or is there another function or property to make the text field suppress?

Regards.
Title: Re: Empty field on a band with auto height
Post by: Subst on June 08, 2018, 11:50:33 AM
To Kiko:

Is the textitem inside band?
In this case set autoHeight property to true for the band also
Title: Re: Empty field on a band with auto height
Post by: Kiko on June 08, 2018, 12:48:08 PM
Yes, the textitem is inside a band and both have the property "autoHeight" checked and doesn't work. The space still appears for each textitem when it is empty.
Title: Re: Empty field on a band with auto height
Post by: Subst on June 08, 2018, 01:02:31 PM
It's so strange. Are u've built LR from source or have downloaded binary?
Title: Re: Empty field on a band with auto height
Post by: Subst on June 08, 2018, 01:03:20 PM
Can I see your report file?
Title: Re: Empty field on a band with auto height
Post by: Kiko on June 08, 2018, 05:19:16 PM
I built from source.
Here is my report file.
Title: Re: Empty field on a band with auto height
Post by: Subst on June 08, 2018, 05:40:07 PM
Try to upload again. The file looks like corrupted
Title: Re: Empty field on a band with auto height
Post by: Kiko on June 08, 2018, 06:08:26 PM
My bad.
Title: Re: Empty field on a band with auto height
Post by: Subst on June 08, 2018, 07:16:37 PM
Well, look. You try to place all data in one band, and at bottom the text is exists. Therefore the band don't adjust it's size according the empty strings.
You need to place the strings in separate bands as variant.

Look the file I attached.
Title: Re: Empty field on a band with auto height
Post by: Arin Alex on June 09, 2018, 03:20:52 AM
Kiko
Look at this sample maybe it can help you
Title: Re: Empty field on a band with auto height
Post by: Subst on June 09, 2018, 05:39:22 AM
To Alex:

не вполне канает, невозможно убрать полностью этот кусок текста, если даже все переменные будут пустые, то высота Итема уменьшится до размеров, указанных в дизайнере, но не меньше :( Потому как общие размеры банда в сторону минимума ограничены итемама внизу, которые содержат текст
Title: Re: Empty field on a band with auto height
Post by: Arin Alex 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 :)
Title: Re: Empty field on a band with auto height
Post by: Subst on June 09, 2018, 10:34:45 AM
To Alex:

Канеш, можно, и такая мысль приходила в голову. Но вот в том письме, что у тебя пустым пришло, я как раз описал подобный случай, как у меня голову снесло в одном отчете который поправили девочки подобным образом. Но там обратный случай, у бэнда автовысота, у итема нет, итем в конце по вертикали. Они выставили высоту его принудительно, а у меня скриптом определяется пустое содержимое. 2 часа не мог понять откуда у меня пустое место появляется :D
Title: Re: Empty field on a band with auto height
Post by: Kiko 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?
Title: Re: Empty field on a band with auto height
Post by: Arin Alex 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
Title: Re: Empty field on a band with auto height
Post by: Arin Alex 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     
Title: Re: Empty field on a band with auto height
Post by: solomon78 on June 21, 2018, 11:16:56 PM
please can your share the link?
Title: Re: Empty field on a band with auto height
Post by: Arin Alex on June 22, 2018, 12:37:28 AM
https://github.com/fralx/LimeReport/tree/develop
Title: Re: Empty field on a band with auto height
Post by: Kiko 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.
Title: Re: Empty field on a band with auto height
Post by: Arin Alex 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.
Title: Re: Empty field on a band with auto height
Post by: Kiko 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.
Title: Re: Empty field on a band with auto height
Post by: Arin Alex 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
Title: Re: Empty field on a band with auto height
Post by: Kiko on June 29, 2018, 02:32:50 PM
Hello Axel,

It works now, thank you  ;)