This topic is locked
[SOLVED]

 how do I get xt->assign to work with Print Report Page?

10/14/2014 6:27:56 AM
PHPRunner General questions
D
DUKE author

This is for a report on PHPRunner 7.1 :
I am trying to use $xt->assign to pass a variable to the printer friendly report page.
On the report page under "Before Display" I am using the following to test:
$new_variable = "test value";

$xt->assign("new_variable",$new_variable);
Inserting {$new_variable} on the 'Report Page' works, but it does not work on the 'Print Report Page'
The 'Print Report Page' does not have a before display event, so I am not sure how to pass the variable to that page...

Sergey Kornilov admin 10/14/2014

You cannot do this via BeforeDisplay event because it doesn't exist. You do that using PHP code snippet though. Insert it where you need that data to appear and put your code there.

D
DUKE author 10/17/2014

That did the trick!



You cannot do this via BeforeDisplay event because it doesn't exist. You do that using PHP code snippet though. Insert it where you need that data to appear and put your code there.