This topic is locked

Printer friendly of specific record

10/31/2006 2:57:44 PM
PHPRunner General questions
M
mmponline author

I have created a proforma invoice on a table's printer friendly page.
Is there a way to put a link next to the record that will show the printer friendly version page for only that specific record. IOW a hyperlink including a specific OrderID
http://www.thedomain.com/_Orders_print.php and then the specific OrderNo. for that record.
Further, is it possible to add a value to a field to create a Orderno automatically:
IOW say GOV001 for OrderID1, GOV002 for OrderID2, GOV003 for OrderID3, etc.

Alexey admin 11/1/2006

Stephan,
you can apply a filter to Printer-friendly page modifying generated _Orders_print.php file.

Find this line there:

$strSQL=$_SESSION[$strTableName."_sql"];

and add the following code just after:

if(@$_GET["orderid"])

$strSQL = AddWhere($strSQL,"orderid='".@$_GET["orderid"]."'");



Then use this link to call filtered page

http://www.thedomain.com/_Orders_print.php?orderid=12


To add a letters to order number you can modify SQL query in PHPRunner.

I.e.

select

...

concat('GV',orderID) as OrderNo,

...

M
mmponline author 11/1/2006

Alexey
I've replaced the code in the _Orders_print.php file. That made no change to the Printer friendly link generate by PHPRunner, and I prosume rightly so.
I then added the hyperlink next to the total filed, so it displays on every record. When clicking the record's hyperlink however, it still displays both the fields even though they have different IDs.
I tried:
http://govadress.co.za/govademploy/_Orders....php?OrderID=12

http://govadress.co.za/govademploy/_Orders...nt.php?OrderID=

http://govadress.co.za/govademploy/_Orders...ID=""

Alexey admin 11/1/2006

Stephan,
make sure you applied code changes properly.
If this doesn't help post it here

D
daniel 11/28/2006

Alexey,
I tried this one and think there is a problem with an ORDER BY. In my case the resulting SQL is
select * From `fct_wareneingangskontrolle` left join dim_lieferant on dim_lieferant.lieferant=fct_wareneingangskontrolle.lieferant ORDER BY `datum_wareneingang` DESC where wareneingangskontrolle=1 limit 0,20
and produces and error. I don't have any order in my project, so where does it come from? Is there a chance to erase it?
Thanks

Daniel