If you want to generate a tabular structure in you rml report you can use <blockTable> .. </blockTable> tag, so you can compare this with the html <Table>..</Table> tag. But the thing is while creating the <blockTable> you need to specify how many columns would be there under it using "colWidths" attribute. See example
This width values depends upon the width specified for your rml report under the <frame> tag, so generally you have to distribute your columns width accordingly, whatever no of columns you have. If there is a mismatch in specifying no of colWidths and columns designed under <blockTable> then system will throw and error as "Attribute Erro".
Also there is another attribute like "colWidths", that is "style" where you can specify which style will be applied to the specific <blockTable>. See Example
<blockTable colWidths="55.0" style="tbl_labels">
So here you can see that style name "tbl_labels" is been applied to this blockTable. Now this style is to be defined above the <blockTable> under <stylesheet> .. </stylesheet> tag where you will have to define the tag <paraStyle>. See Example
<paraStyle name="tbl_labels" fontName="Courier" fontSize="12.0" leading="15" alignment="CENTER"/>
So, by defining style you can set the text alignment, text-colour, leading space, spacebefore and spaceafter blocktable ,font name, font size.
Under the blocktable you can iterate the loop using <section>.. </section> and <repeatIn> tag.
<blockTable> --> Its a simple tag which indicates that now you are going create a table like structure i.e. you are going to work with a table. Simply it is the starting point tag to workwith table in or creating tables in rml. This is similar to <table> tag in html, if you are familiar with basic html. We can write as many as desire <tr> and <td> tags between the <blockTable> </blockTable>.where <tr>creates rows and we keep <td> inside <tr> </tr> to create columns. All tags should be closed propely</ ...>.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 7/6/14, 11:53 PM|
|Seen: 2333 times|
|Last updated: 3/16/15, 8:10 AM|