4

I have a layer with about 28000 points. What I'm trying to do is create a report showing just the information of the selected points, but looking at the report manager options I have not found an option to make a filter of this type.

Is it possible to make a filter like this? Maybe programatically?

3
  • "show the information" as in "reduce the attribute table to only the selected points"?
    – Erik
    Sep 1, 2020 at 7:37
  • That is, I have tried to do so by filtering the reference layer used by the report, but all the records still come out. Sep 1, 2020 at 7:57
  • have you triede the answer suggested here? gis.stackexchange.com/questions/314198/…
    – sn1ks
    Nov 11, 2020 at 7:31

1 Answer 1

1

Correct me if I'm wrong, but even in 3.28 there seems to be no checkbox "Use only selected feature" (like in the processing tools) that causes only the selection to be passed to the report tool and not the whole layer.

This is a solution closely related to the suggested answer, but be aware, it's quite painful for a large number of features with a few of them selected.

Right click into some body page and select "Page properties....":

enter image description here

Note the appearing panel on the right, click the "Data defined override" button right to the "Exclude page from exports" and select "Edit...".

enter image description here

In the expression string builder enter the expression

not(is_selected(@feature))

enter image description here

And hit "Ok".

The Button turns yellow:

enter image description here

Take some time to prepare a coffee when you do the export (for my test layer with ~40k features it runs about 25min), because of course the expression is evaluated for each feature - which seems little time consuming - but it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.