This topic is locked
[SOLVED]

 Print Advanced Search Parameter in report and chart page

9/16/2016 12:36:16 PM
PHPRunner General questions
L
leon author

I would really appreciate it if somebody can help me with the following;
I want to print the search parameters as a heading on a chart. The only search option available is a dropdown box of General Ledger Accounts. The link field is the account number and the display field is the account name.
The below code snippet works perfectly, but displays the link field (i.e. the account number) and I want to display the account name.
(Although not critical, it would be even better if this could be used as the header for the chart.)
Any help would be greatly appreciated.
The code is the following;
global $strTableName;
if (isset($_SESSION[$strTableName.'_advsearch']))

{

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

}
$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 "Search Field: ".$fName."
";
//echo "Search Option: ".$val1."
";
echo ("Details for account: "."&nbsp"."<b><FONT color='#ff0000'>"."$val1"."</font></b>");
}

L
leon author 3/5/2017



I would really appreciate it if somebody can help me with the following;
I want to print the search parameters as a heading on a chart. The only search option available is a dropdown box of General Ledger Accounts. The link field is the account number and the display field is the account name.
The below code snippet works perfectly, but displays the link field (i.e. the account number) and I want to display the account name.
(Although not critical, it would be even better if this could be used as the header for the chart.)
Any help would be greatly appreciated.
The code is the following;
global $strTableName;
if (isset($_SESSION[$strTableName.'_advsearch']))

{

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

}
$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 "Search Field: ".$fName."
";
//echo "Search Option: ".$val1."
";
echo ("Details for account: "."&nbsp"."<b><FONT color='#ff0000'>"."$val1"."</font></b>");
}

L
leon author 3/5/2017

Hi Romaldus.
Please accept my apologies for only getting back to you now. As a newbie I was expecting something in my mail, ad only saw your reply today. Your code is great and exactly what I was looking for. Thank you.
Leon