Thanks for replying, but unfortunately neither of the options does ring a bell to me to get this sorted out.
Here's the page content that should be sent to the printer / PDF:
Code: Select all
{trainingschema_overzicht}
{cms_module module='printing' pdf='true'}
{trainingschema_overzicht} = the UDT that generates the content (see below).
Remember: It does show on the page before I press the "Print (to PDF)" link / button.
The above page is called from another CMSMS page with an HTML-form in it:
Code: Select all
<form action="?page=trainingschema-overzicht-list" method="post">
<table>
<tbody>
<tr>
<td>Startdatum (jjjj-mm-dd)</td>
<td><input name="SchemaOverzichtStart" type="text" /></td>
</tr>
<tr>
<td>Einddatum (jjjj-mm-dd)</td>
<td><input name="SchemaOverzichtEind" type="text" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Genereer Overzicht" /></td>
</tr>
</tbody>
</table>
</form>
What I do see, of the resulting page, is that the only part being printed is the same as using a preview of the page whilst defining it: Only the "Fixed content" is shown, including the header of the generated table, but not the table generated using MySQL.
In fact everything from the below code is printed except for
[*]$report_start & $report_end in the first printed line after the <H3> line
[*]The four print statements taking care of printing the rows with data at the bottom.
Code: Select all
$report_start = '';
if (isset($_POST['SchemaOverzichtStart']))
{
$report_start = $_POST['SchemaOverzichtStart'];
}
$report_end = '';
if (isset($_POST['SchemaOverzichtEind']))
{
$report_end = $_POST['SchemaOverzichtEind'];
}
print "<__html>";
print " <HEAD>";
print " <TITLE>Overzicht Trainingschema - O.S.V. Rosmare</TITLE>";
print " </head>";
print "</__body>";
print "<h3>OSV Rosmare: Overzicht Trainingschema</h3>";
print "Dit overzicht loopt van ".$report_start." tot ".$report_end;
print "<table border=1>";
print " <tr>";
print " <th>Datum</th>";
print " <th>Categorie</th>";
print " </tr>";
$sql = 'select distinct date_format( e.event_date_start , "%d/%m/%Y" ) as eventDate, e.event_title as title
FROM cms_module_calendar_events e,
cms_module_calendar_categories c,
cms_module_calendar_events_to_categories ec
WHERE e.event_date_start >= "'.$report_start.'"
AND e.event_date_start <= "'.$report_end.'"
AND c.category_name like \'Training%\'
AND ec.category_id = c.category_id
AND e.event_id = ec.event_id
ORDER BY e.event_date_start';
$result = mysql_query ($sql);
print mysql_error();
while ($r = mysql_fetch_array ($result)) {
extract ($r);
print ("<tr>");
print ("<td>$eventDate</td>");
print ("<td>$title</td>");
print ("</tr>");
}
print "</table>";
print "<__body>";
[glow]Trying to clarify things, I kind of come to the conclusion that the page appears to be called (again) without passing the data entered in the calling form, so the page is just regerated.[/glow]
Any further help would be greatly appreciated.
Regards,
Rob.