Hi,
I have a report with a table (I'm using in loop function).
I want to add an auto-numbring(index) to the table first column.
could you please help me?
Regards,
Refael
Hi Refael,
You can use HTML Template report.
Example:
<html> <head> <style> body { counter-reset: Serial; /* Set the Serial counter to 0 */ } table { border-collapse: separate; } tr td:first-child:before { counter-increment: Serial; /* Increment the Serial counter */ content: counter(Serial); /* Display the counter */ } </style> </head> <body> <table border="1"> <thead> <tr> <th>Automatic Serial number</th> <th>Name</th> <th>Email</th> </tr> </thead> <tbody> {!#LOOP_BEGIN.all#apauBWFJQgacMUL2i8yEZg} <tr> <td></td> <!--leave it blank--> <td>{!lastName#value}</td> <td>{!email#text}</td> </tr> {!#LOOP_END.all} </tbody> </table> </body> </html>
Sample output:
Automatic Serial number | Name | |
---|---|---|
Emp2 | Emp2@yopmail.com | |
Emp1 | emp1@yopmail.com | |
Emp3 | Emp3@yopmail.com |
Hi,
thanx on your answer.
It's Working just only in html template
but in action "render as pdf" is not
can you have a solution for this?
regards,
Refael.