Column name problem with template for SQL reports

Column name problem with template for SQL reports

by Yuka Chen -
Number of replies: 1

Hello dear Moodle developers and users,

when I was using the template to make my SQL reports look better, I noticed this problem: the HTML codes in "Report template" part control only the style of one single row. That means, if I add <tr><th>column_name</th></tr> here, it will repeat with every row. Did anyone have any idea how to do it properly?


Thank you in advance!

Average of ratings: -
In reply to Yuka Chen

Re: Column name problem with template for SQL reports

by Yuka Chen -

Hi all,

to make my question more clear, what I expected is:

+======+======+

|name   |course  |

+-----------+-----------+

|foo        |bar       |

+-----------+-----------+

|baz       |qux       |

+-----------+-----------+


What it actually is:

+======+======+

|name   |course  |

+-----------+-----------+

|foo        |bar       |

+======+======+

|name   |course  |

+-----------+-----------+

|baz       |qux       |

+-----------+-----------+

With HTML code:

<tbody>

<tr>

<th>name</th>

<th>course</th>

</tr>

<tr>

<td>[ [name] ]</td> 

<td>[ [course] ]</td>

</tr>

</tbody>

Average of ratings: Useful (1)