This topic is locked

custom print or export

3/5/2008 5:26:05 AM
PHPRunner General questions
J
jccanut author

Hi (sorry for my english),

I've two different probleme with export dan printing list of records.

  1. I try to custom the export and the print of a list of records.

    I add event on Before SQL Query (on export page and printer friendly pags).

    I just change the $strSQL but it makes no change.

    What's wrong?
  2. I 'd like to have different lists if i click on the export button of the page and the export button on the top. But i don't know if I can use differente event for each of them.
    THanks
    JC

J
Jane 3/6/2008

Hi,
print your queries on the export and print pages to make sure queries are changed:

echo $strSQL;


Regarding the second question.

You can pass parameters in URL and check it in your event.

For example modify link to print page on the Visual Editor tab in the following way:

<a href="tablename_print.php?custom=yes">...</a>



Then check $_REQUEST["custom"] in your event:

if ($_REQUEST["custom"]=="yes")

{

//some actions

}

else

{

//another actions

}