Home
Analytics
Can I use cookies to recall user selected parameters from last visit?
Jenkinsj5
Can I use cookies to recall user selected parameters from last visit?<br />
<br />
I have a report that is available to a few hundred users, and one of the parameters has a couple hundred choices in a list box (<em class='bbc'>multiple allowed</em>). The report is delivered in HTML via Apache Tomcat 7.0. <br />
<br />
I am very new to JavaScript, but it seems like it should be fairly easy to capture the user selected parameters when the report is run, and send them to a cookie. Then on the user?s next visit grab the values from the cookie and preselect them in the list box. <br />
<br />
I searched the forums and the web and did not find anything. <br />
<br />
Apache Tomcat 7.0 <br />
BIRT 4.2
Find more posts tagged with
Comments
mwilliams
You want the previously selected values to be filled out in the parameter page already? Or for the report to run with those values, automatically?
Jenkinsj5
I want them to be filled out in the parameter page already. The user would then select date parameters and run the report.
mwilliams
You could probably modify the parameter js pages to allow you to read in a cookie to fill out the parameter values.
Jenkinsj5
Thanks, I will see if I can make that work.
mwilliams
Let me know if it works for you. I haven't tried it, so it'd be interesting to hear if you get it.
Jenkinsj5
This is my when nothing else is happening project so it may take a while to get it all worked out.
After some research, I am moving in a slightly different direction, to achieve this and a related goal.
1. Auto populate report parameters with last values per user
2. Track report usage
I am using All in one 4.2.1 free version, on a corporate intra-net.
Current plan is to create a SQL data base (on the same server as the reportable data) and populate with time stamps, parameter names, and parameter values using Javascript.
Because we have an ASP application on our intra-net that captures login info, I can (in theory, with Java or Javascript call in the xml) capture the login ID used and include that in my SQL data base also.
This gives me (again in theory) a data base with 'by who', 'when' and 'what' was queried in the reports. I can populate like a cookie, even if cookies are disabled AND I can report on report usage, which will allow me to manage the report farm better. Obvious security applications also.
Feel free to share ideas on how to improve or thoughts on why it won't work.
mwilliams
On first read, I don't see an issue with the idea. Keep me posted, though!