This topic is locked

Reports

10/31/2007 12:57:19 PM
PHPRunner General questions
paperhog author

Is there a way to get the date to display on the report?
Say they want the report to be from Sept 1, 2007 to Sept 30, 2007 then it shows that the report is from Sept 1 to Sept 30th at the top?
Thank you

Lori

J
Jane 11/1/2007

Lory,
you can do it using custom event on teh report page.

Here is a sample:

global $strTableName;

echo "Date range: ";

echo date("yyyy-mm-dd", strtotime($_SESSION[$strTableName."_asearchfor"]["datefield"]));

echo " - ";

echo date("yyyy-mm-dd", strtotime($_SESSION[$strTableName."_asearchfor2"]["datefield"]));

paperhog author 11/1/2007

For anyone following this thread This is the solution that worked for my project.

function misc_Jobs_Event1(&$params)

{

global $strTableName,$daterange;

$daterange = $_SESSION[$strTableName."_asearchfor"]["job_post_date"];
if (isset ($daterange)){
echo "Date range: ";
echo date("F d, Y", strtotime($_SESSION[$strTableName."_asearchfor"]["job_post_date"]));

echo " - ";

echo date("F d, Y", strtotime($_SESSION[$strTableName."_asearchfor2"]["job_post_date"]));

}
}


By entering this on the visual editor page this way the date range only shows when one is given on the advanced search page!

And then it reads as Date range: September 01, 2007 - September 29, 2007 <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=22876&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />