This discussion is archived
1 Reply Latest reply: Sep 27, 2012 8:57 AM by mike_in_budget RSS

Print Empty rows in a Template

954565 Newbie
Currently Being Moderated
Hi All,

my requirement is to create a template for payslip, which contains earnings, deductions & Net Amount.

If an employee has 10 earnings and 6 deductions and another employee has 3 earnings and 2 deductions then the Template is differ's based on the data.

For both the employees, the template should look same, so by inserting empty rows, i think it is solved...

How to insert Empty Rows in the Template?

Did anyone get this working and knows what I am doing wrong?


Regards,
Dilip
  • 1. Re: Print Empty rows in a Template
    mike_in_budget Newbie
    Currently Being Moderated
    I think the query is not returning all the data desired.
    You need a zero value for each deduction/earning per employee in the query results.
    To get the query to give all the necessary zeros I would do a union that is simply all the employees returned in the first part of the query matched up with the table(s) that have all the deduction and earnings fields.
    Of course the amount of the earnings or deductions would simply be an expression - zero.
    Then when the data is run against the xmlp template, it would have to sum the values.
    This would make all the reports come out the same.

    ______

    The way to think about the the xmlp template is that it does a loop/filter through your data.
    If your loop is on employee - it is only going to return the rows with that employee.
    If that employee does not have a certain deduction then it will not show up.
    If your loop is on deduction or earnings - it is only going to return the rows with that employee.

    Now if you have a fixed list of deductions/earnings then you can code this into the xmlp template - tedious, but it will work.
    If your deductions/earnings ever change, you will have to perform maintenance on the report.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points