Discussion:
What does mean "empty tables" in "attribute table" item properties in a print composer?
Junior Delaz
2014-10-08 11:20:54 UTC
Permalink
Hi all,
I try to understand the use case of empty tables in print composer and am
still confused.

Create a new print composer and add an attribute table item
set its height enough to show more rows than the maximal values of features
you set.
Add a second frame to this item.

Is this second frame considered as "empty table" (as no feature attribute
will be displayed inside)?
According to the answer, I think I'll have many other questions about the
options in "empty tables" combo box.

The only "empty table" I found in my tests is when the first frame displays
nothing (because "maximal rows" is set to 0 or "show only visible features
within a map" is checked and nothing matches). Is it the only situation?

Can somebody explain to me, please?

Thanks in advance.
Harrissou
Nyall Dawson
2014-10-08 20:33:08 UTC
Permalink
Post by Junior Delaz
Hi all,
I try to understand the use case of empty tables in print composer and am
still confused.
Post by Junior Delaz
Create a new print composer and add an attribute table item
set its height enough to show more rows than the maximal values of
features you set.
Post by Junior Delaz
Add a second frame to this item.
Is this second frame considered as "empty table" (as no feature attribute
will be displayed inside)?

No. This behavior only triggers when the entire table is empty. It is
designed for atlas prints, where the table's contents are being filtered by
the atlas. In this scenario it's possible that no records match the filter
for a particular atlas feature and you need to handle empty tables.

Nyall
Junior Delaz
2014-10-08 21:53:00 UTC
Permalink
Thanks Nyall. This is what I suspected.
Then, none of the "empty tables" options should work on the frames in the
example above, right?
But actually, "Draw empty cells" option does have effect on them. Isn't it
a bug?
Post by Junior Delaz
Hi all,
I try to understand the use case of empty tables in print composer and
am still confused.
Post by Junior Delaz
Create a new print composer and add an attribute table item
set its height enough to show more rows than the maximal values of
features you set.
Post by Junior Delaz
Add a second frame to this item.
Is this second frame considered as "empty table" (as no feature
attribute will be displayed inside)?
No. This behavior only triggers when the entire table is empty. It is
designed for atlas prints, where the table's contents are being filtered by
the atlas. In this scenario it's possible that no records match the filter
for a particular atlas feature and you need to handle empty tables.
Nyall
Nyall Dawson
2014-10-09 11:28:46 UTC
Permalink
Post by Junior Delaz
Thanks Nyall. This is what I suspected.
Then, none of the "empty tables" options should work on the frames in the
example above, right?
But actually, "Draw empty cells" option does have effect on them. Isn't it a
bug?
Well - possibly it's a little inconsistent, but I think this behaviour
is desirable. If you're wanting to show empty cells, I think you'd
also want to show them when the table is partially filled, rather than
only when it's totally empty.

Nyall
Post by Junior Delaz
Post by Nyall Dawson
Post by Junior Delaz
Hi all,
I try to understand the use case of empty tables in print composer and
am still confused.
Create a new print composer and add an attribute table item
set its height enough to show more rows than the maximal values of
features you set.
Add a second frame to this item.
Is this second frame considered as "empty table" (as no feature
attribute will be displayed inside)?
No. This behavior only triggers when the entire table is empty. It is
designed for atlas prints, where the table's contents are being filtered by
the atlas. In this scenario it's possible that no records match the filter
for a particular atlas feature and you need to handle empty tables.
Nyall
Junior Delaz
2014-10-11 16:27:24 UTC
Permalink
Indeed, this a desirable behavior: user may want to show empty rows when
there are not enough matching features. This is what I was looking for when
using this option. But having this one working for a table and none among
the three other options is a bit confusing for the user. I spent at least
an hour on testing why these options didn't work and I'm afraid I won't be
the last.

Don't you think that "draw empty rows" can be a separate option (may be a
checkbox)? It'll have its effects on every frame with too higher rows for
the features.
The other three options in the combobox will work only when there is no row
(on real empty tables).
Post by Nyall Dawson
Post by Junior Delaz
Thanks Nyall. This is what I suspected.
Then, none of the "empty tables" options should work on the frames in the
example above, right?
But actually, "Draw empty cells" option does have effect on them. Isn't
it a
Post by Junior Delaz
bug?
Well - possibly it's a little inconsistent, but I think this behaviour
is desirable. If you're wanting to show empty cells, I think you'd
also want to show them when the table is partially filled, rather than
only when it's totally empty.
Nyall
Post by Junior Delaz
Post by Nyall Dawson
Post by Junior Delaz
Hi all,
I try to understand the use case of empty tables in print composer and
am still confused.
Create a new print composer and add an attribute table item
set its height enough to show more rows than the maximal values of
features you set.
Add a second frame to this item.
Is this second frame considered as "empty table" (as no feature
attribute will be displayed inside)?
No. This behavior only triggers when the entire table is empty. It is
designed for atlas prints, where the table's contents are being
filtered by
Post by Junior Delaz
Post by Nyall Dawson
the atlas. In this scenario it's possible that no records match the
filter
Post by Junior Delaz
Post by Nyall Dawson
for a particular atlas feature and you need to handle empty tables.
Nyall
_______________________________________________
Qgis-developer mailing list
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Nyall Dawson
2014-10-11 21:07:18 UTC
Permalink
Post by Junior Delaz
Indeed, this a desirable behavior: user may want to show empty rows when
there are not enough matching features. This is what I was looking for when
using this option. But having this one working for a table and none among
the three other options is a bit confusing for the user. I spent at least
an hour on testing why these options didn't work and I'm afraid I won't be
the last.
Post by Junior Delaz
Don't you think that "draw empty rows" can be a separate option (may be a
checkbox)? It'll have its effects on every frame with too higher rows for
the features.
Post by Junior Delaz
The other three options in the combobox will work only when there is no
row (on real empty tables).

That's a good idea. Can you file a bug report and assign me? I'll tackle it
before 2.6 release.

Nyall

Loading...