This topic is locked
[SOLVED]

 show the value of the query on the page print

8/20/2013 8:29:03 AM
PHPRunner General questions
O
onlline author

HI,
I need to show the value of the query on the page print


Thanks In advanced

C
cgphp 8/20/2013

Search parameters are stored in the global SESSION array. Check this article http://xlinesoft.com/phprunner/docs/print_search_parameters_on_list_page.htm

O
onlline author 8/20/2013



Search parameters are stored in the global SESSION array. Check this article http://xlinesoft.com/phprunner/docs/print_search_parameters_on_list_page.htm


Hi Cristian,
Would you like to display custom labels for each field, also would like to display between dates


Thank you in anticipation

C
cgphp 8/21/2013

You can add labels manually.

O
onlline author 8/23/2013



You can add labels manually.


Cristian,
I used the following code
...............................................................................

global $strTableName;

if (isset($_SESSION[$strTableName.'_advsearch']))

{

$searchClauseObj = unserialize($_SESSION[$strTableName.'_advsearch']);

}
$fieldSearchData = $searchClauseObj->getSearchCtrlParams("FieldName");

$fieldSearchData = $searchClauseObj->_where[$strTableName."_srchFields"];
for($i=0; $i<count($fieldSearchData); $i++){

$fName = $fieldSearchData[$i]['fName'];

$val1 = $fieldSearchData[$i]['value1'];

$val2 = $fieldSearchData[$i]['value2'];

$srchCat = $fieldSearchData[$i]['opt'];

$srchNot = $fieldSearchData[$i]['not'];

echo "<B> ".$fName." ".$val1." -".$val2."</B>
";
}

...............................................................................
I would like to customize the label of the field is possible?
Thanks in advanced

C
cgphp 8/24/2013

$fName contains the name of the field. You can replace it with your custom label.

O
onlline author 8/24/2013



$fName contains the name of the field. You can replace it with your custom label.


Christian,

I modified the script and achieved the expected result
Thank you for attention
Result

PERÍODO: 01/08/2013 A 25/08/2013

TIPO DE MOVIMENTO: CRÉDITO

TIPO DE CONTA: DESPESAS ADMINISTRATIVAS
The Code

//////////////////////////////////

global $strTableName;

if (isset($_SESSION[$strTableName.'_advsearch']))

{

$searchClauseObj = unserialize($_SESSION[$strTableName.'_advsearch']);

}
$fieldSearchData = $searchClauseObj->getSearchCtrlParams("Data");

$fieldSearchData3 = $searchClauseObj->getSearchCtrlParams("Tipo");

$fieldSearchData4 = $searchClauseObj->getSearchCtrlParams("Descricao");
for($i=0; $i<count($fieldSearchData); $i++){

$val1 = $fieldSearchData[$i]['value1'];

$val2 = $fieldSearchData[$i]['value2'];

$val3 = $fieldSearchData3[$i]['value1'];

$val4 = $fieldSearchData4[$i]['value1'];

echo "<B> ".$fName."PERÍODO: </B> ".date("d/m/Y",strtotime($val1))." A ".date("d/m/Y",strtotime($val2))."
";

echo "<B> TIPO DE MOVIMENTO: </B> ".$val3."
";

echo "<B> TIPO DE CONTA: </B> ".$val4."
";

}
//////////////////////////////////