4

is it possible to arrange header and content of an inserted attribute table in qgis print composer? I want to create a custom datasheet with a small map and listed feature information as follows:datasheet with header and content aof an attribute table arranged side by side

I thought to change header font into white (and insert a label for each attribute content) but apparently this is not possible in qgis 2.0.

1
  • I'm not sure if I understand what you are trying to do. Do you want to show just one feature per page? Or you really want to show more than one line of the attribute table? Can you make a draw to clarify your question? Dec 10, 2013 at 10:35

1 Answer 1

10

If you want to do a datasheet for each feature in a table, then you can use the atlas generation functionality in the print composer.

In the atlas generation tab, set the coverage layer to the layer where you have your features. Make sure you uncheck the Hidden coverage layer box in Visibility. And set the scaling according to your needs.

Entering a new label, you can access your features attribute values by using [%yourFeatureAttributeName%]. See the image below for a example:

enter image description here

You can even render your label as HTML to create a table. Something like this:

<table>
    <tr>
        <td>Code</td>
        <td>[%code%]</td>
    </tr>
    <tr>
        <td>Page number</td>
        <td>[%"page_number"%]</td>
    </tr>
    <tr>
        <td>district</td>
        <td>[%district%]</td>
    </tr>
</table>

After you set the composer layout as you please, all you need is to do is create the outputs or print. You will get one output per feature, the map will be centered or zoomed on each feature, and the labels will show the features attributes.

0

Your Answer

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

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