Topic: Report Defaults

Since the reports are numbered and so are the various option pull-downs,
it might be easy to have the report remember the last options selected,
cookies might be easiest or something in the account.

Since it is just a convenience, cookies may be best

tom

Re: Report Defaults

Yes, Tom, this is a good idea. Is now implemented in 2.3 CVS. However a global variable in file config.php needs to be set, f.i. $save_report_selections = 0.
A positive value X will save the report selections from report center in X days. 0 = no saving.

This way we are backwards compatible. So remember to set this value when you download 2.3 next time.

/Joe

Re: Report Defaults

I set it to 30 :

    /* Save Report selections (a value > 0 means days to save. 0 = no save) */
        $save_report_selections = 30;

but the pull down selections stay at the defaults...

Here are they headers I get, I see the cookie data, but it is not being
recognized as a cookie

http://www.gotgrit.com/admin/fa23/reporting/reports_main.php?JsHttpRequest=0-xml



POST /admin/fa23/reporting/reports_main.php?JsHttpRequest=0-xml HTTP/1.1

Host: www.gotgrit.com

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20110701 Iceweasel/3.5.16 (like Firefox/3.5.16)

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Content-Type: application/octet-stream; charset=UTF-8

Referer: http://www.gotgrit.com/admin/fa23/reporting/reports_main.php?Class=0

Content-Length: 165

Cookie: osCAdminID=1376b6670caf3b3e93f55ce65b1352; osCsid=3327e28d2e6e08425773892ec6319; FA11ff01cdb0d50479fa1a3c3a5d808b3=2aa40a80dd5e76989240261260a8

Authorization: Basic xxxxxxxx

Pragma: no-cache

Cache-Control: no-cache

Rep303=Display%3A%20Stock%20Check%20Sheets&REP_ID=303&PARAM_0=-1&PARAM_1=&PARAM_2=0&PARAM_3=0&PARAM_4=1&PARAM_5=1&PARAM_6=&PARAM_7=0&Class=2&_random=357859.914609811

HTTP/1.1 200 OK


I tried a different report and it did the same thing

tom

Re: Report Defaults

Yes, it doesn't seem to work any more. I will consult Janusz. I think he has changed something here.

/Joe

Re: Report Defaults

tom, please change the line 17 in /reporting/prn_redirect.php to:

global $page_security, $save_report_selections;

It was earlier only: global $page_security;

Then it should work.

/Joe