Custom Template

This public forum is for user-to-user discussions of PHP Report Maker. Note that this is not support forum.

Custom Template

Postby shahparzsoft » Thu Nov 02, 2017 2:10 pm

I am using custom template for a report. Problem is:

When the records in the report is less for example 100 or 110 then the report show the report. But if the records are more then that
then no records are displaying only simple headings displays.

Another problem is if the records are less then 100 then it shows the record properly but also shows the without customized headers.

Kindly advise.
shahparzsoft
 
Posts: 145
Joined: Tue Oct 22, 2013 3:24 am

Re: Custom Template

Postby mobhar » Thu Nov 02, 2017 2:32 pm

Please always post your code in that each "Custom Template" section for more discussion, so others could help you straightforward.
mobhar
 
Posts: 4661
Joined: Wed Jun 05, 2013 2:11 pm

Re: Custom Template

Postby shahparzsoft » Thu Nov 02, 2017 3:13 pm

I am using version 10.0 of php report maker. That code was working fine in previous version.



======================
CustomTemplateHeader
======================
<?php

$result=mysql_query("select header_line1, header_line2 from company_profile");
while ($row=mysql_fetch_assoc($result)) {
$vheader1= $row['header_line1'];
$vheader2= $row['header_line2'];
}
?>

<table border='0' align='center' cellspacing='1' cellpading='1' width='1000'>
<tr>
<td width='100' align='center'>
<img src='custom_uploads/company_logo.gif'>
</td>
<td width='800' align='center'>
<font size='6' face='arial' color='blue'><b><u> <?php echo $vheader1 ?> </b> </u> </font><br>
<font size='3' face='arial' color='blue'><b><u> <?php echo $vheader2 ?> </b> </u> </font>
</td>
</tr>
</table>

<?php

$vlineid = $Page->line_id->ListViewValue();

$result=mysql_query("select line_heading, duration_from, duration_to,
semester_from, semester_to
from faculty_head
where line_id='$vlineid'");
while ($row=mysql_fetch_assoc($result)) {
$vlineheading = $row['line_heading'];
$vdurationfrom = $row['duration_from'];
$vdurationto = $row['duration_to'];
$vsemesterfrom = $row['semester_from'];
$vsemesterto = $row['semester_to'];
}


?>



<table border='0' cellspacing='0' cellpading='0' width='100%'>
<br><br><br>
<tr> <td align='center'> <font size = '4' face='arial'> <b> <u> <?php echo $vlineheading ?> </u> </b> </font> </td> </tr>
<tr> <td align='center'> <font size = '2' face='arial'> <b> <u> Duration:&nbsp;&nbsp; <?php echo date_format(date_create($vdurationfrom),'d-M-Y') ?> &nbsp; To &nbsp;<?php echo date_format(date_create($vdurationto),'d-M-Y') ?> </u> </b> </font> </td></tr>
<tr> <td align='center'> <font size = '2' face='arial'> <b> <u> Semester:&nbsp;&nbsp; <?php echo date_format(date_create($semesterfrom),'d-M-Y') ?> &nbsp; To &nbsp;<?php echo date_format(date_create($vsemesterto),'d-M-Y') ?> </u> </b> </font> </td></tr>
</table>

======================
CustomTemplateHeader
======================


===========================
CustomTemplateGroupHeader
===========================

<table>
<br><br>
<tr>
<td align='center'><b> <b> MEMBER NAME:&nbsp&nbsp</b> <u> <i> {{{faculty_mem_name}}} </i> </u></b></td>
</tr>
</table>

<table class="ewTable ewExportTable" width="100%">
<br><br>
<tr>
<td align='center'><b>{{{caption course_desc}}}</b><br>
<i>{{{caption subject_desc}}}</i><br>
<i>{{{caption shift_name}}}</i><br></td>

<td align='center'><b>{{{caption lecture_startdate}}}</b></td>
<td align='center'><b>{{{caption lecture_enddate}}}</b></td>
<td align='center'><b>{{{caption lecture_delivrd}}}</b></td>
<td align='center'><b>{{{caption lecture_other}}}</b></td>
<td align='center'><b>{{{caption lecture_deduction}}}</b></td>
<td align='center'><b>{{{caption lectures_total}}}</b></td>
<td align='center'><b>{{{caption lecture_rate}}}</b></td>
<td align='center'><b>{{{caption amount_payable}}}</b></td>
<td align='center'><b>{{{caption line_remarks}}}</b></td>
</tr>


===========================
CustomTemplateGroupHeader
===========================


===========================
CustomTemplateBody
===========================

<tr>
<td nowrap align='left'><b>{{{course_desc}}}</b><br>
<i>{{{subject_desc}}}</i><br>
<i>{{{shift_name}}}</i><br></td>

<td align='right'>{{{lecture_startdate}}}</td>
<td align='right'>{{{lecture_enddate}}}</td>
<td align='right'>{{{lecture_delivrd}}}</td>
<td align='right'>{{{lecture_other}}}</td>
<td align='right'>{{{lecture_deduction}}}</td>
<td align='center'>{{{lectures_total}}}</td>
<td align='center'>{{{lecture_rate}}}</td>
<td align='center'>{{{amount_payable}}}</td>
<td align='center'>{{{line_remarks}}}</td>
</tr>


===========================
CustomTemplateBody
===========================


===========================
CustomTemplateGroupFooter
===========================

<tr>
<td colspan="3"><div style="text-align: right;"><b>Total</b></div></td>
<td align='right'> <font size='3'> <b>{{{sum lecture_delivrd}}} </font> </b></td>
<td align='right'> <font size='3'> <b>{{{sum lecture_other}}}</b> </font> </td>
<td align='right'> <font size='3'> <b>{{{sum lecture_deduction}}}</b> </font> </td>
<td align='right'> <font size='3'> <b>{{{sum lectures_total}}}</b> </font> </td>
<td align='right'> <font size='3'> <b> </b></td>
<td align='right'> <font size='3'> <b>{{{sum amount_payable}}}</b></td>
</tr>


<tr>
<td colspan='8'>
<br><br><br><br>
<b> Prepared By: _______________</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<b> Verified By: _______________</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<b> Approved By: _______________</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<td>
</tr>
===========================
CustomTemplateGroupFooter
===========================



===========================
CustomTemplateFooter
===========================
<tr>
<td colspan="3"><div style="text-align: right;"><b>GRAND TOTAL: &nbsp;&nbsp;</b></div></td>
<td align='right'> <font size='5' color='red'> <b>{{{grandsum lecture_delivrd}}} </font> </b></td>
<td align='right'> <font size='5' color='red'> <b>{{{grandsum lecture_other}}}</b> </font> </td>
<td align='right'> <font size='5' color='red'> <b>{{{grandsum lecture_deduction}}}</b> </font> </td>
<td align='right'> <font size='5' color='red'> <b>{{{grandsum lectures_total}}}</b> </font> </td>
<td align='right'> <font size='5' color='red'> <b> </b></td>
<td align='right'> <font size='5' color='red'> <b>{{{grandsum amount_payable}}}</b></td>
</tr>
</table>
===========================
CustomTemplateFooter
===========================
shahparzsoft
 
Posts: 145
Joined: Tue Oct 22, 2013 3:24 am

Re: Custom Template

Postby shahparz » Fri Nov 03, 2017 12:56 pm

Please suggest according to above mentioned code.
shahparz
 
Posts: 25
Joined: Sat Nov 24, 2012 7:43 pm

Re: Custom Template

Postby Webmaster » Sat Nov 04, 2017 9:28 am

1. Enable debug mode (Tools -> Advanced Settings -> Debug). See if it gives you any hint.
2. Click view source in browser and see if there is any error message displayed.

If you are a registered user, you can send your project/database to the support email for quicker resolution.
Webmaster
 
Posts: 10731
Joined: Fri Aug 06, 2004 5:59 pm


Return to General Discussion (PHP Report Maker)