This topic is locked
[SOLVED]

 Print from a view

11/8/2009 8:36:42 AM
PHPRunner General questions
N
netmedia59 author

Hello,
I want to know if the is a way to add a button (or something else) to print the record straight from a view ?

Thanks
Olivier

Lille (FRANCE)

C
chinwag 11/8/2009

To print the actual view page add:

<INPUT class=button onclick="window.location.href='JavaScript:window.print();'" type=button value="Print">
N
netmedia59 author 11/9/2009

Hello and thanks chinwag,
But that's not exactly what I want,

I want to print the associated report of a record in a view (don't know if it's clear enough ?)
Thanks again
Olivier



To print the actual view page add:

<INPUT class=button onclick="window.location.href='JavaScript:window.print();'" type=button value="Print">


J
Jane 11/9/2009

Olivier,
here is a sample:

<INPUT class=button onclick="window.open('tablename_print.php?editid1={$show_key1}');" type=button value="Print">


Then check $_REQUEST["editid1"] in the Print page: Before SQL query event:

if (@$_REQUEST["editid1"])

$strWhereClause = whereAdd($strWhereClause,"FieldName=".$_REQUEST["editid1"]);
N
netmedia59 author 11/12/2009

Thanks Jane,

It works as expected !!!
Olivier



Olivier,
here is a sample:

<INPUT class=button onclick="window.open('tablename_print.php?editid1={$show_key1}');" type=button value="Print">


Then check $_REQUEST["editid1"] in the Print page: Before SQL query event:

if (@$_REQUEST["editid1"])

$strWhereClause = whereAdd($strWhereClause,"FieldName=".$_REQUEST["editid1"]);


S
swanside 11/13/2009

SOrry to jump on the back of this, but would it also be possible from the tablename_list.php view to select a number of lines in the list page and be able to print the view pages directly, instead of going into the view page and printing from the file>print options?