The jasper report viewer ZkJRViewer renders a PDF file to disk, and then displays in the control. This temporary file is created using the pattern "yyyyMMddHHmmss". Therefore, if 2 users print the same report, in different clients, at exactly the same second, then the user who printed the first report, is presented with the report from the second client.
I have initially set the priority as major, because it is a security risk, and problem is hard to diagnose.
Just adding an idea, what if we add a couple of sysconfig keys:
"FileUtil.getTempMailName.suffix" where we can fill something like "@#AD_User_ID@"
"FileUtil.getTempMailName.dateformat" where we can fill something like "yyyyMMddHHmmss"
Sounds good - although it would also need to cater for the same user logged into multiple sessions.
"FileUtil.getTempMailName.suffix" where we can fill something like "@#AD_User_ID@" --> Also include the session ID, or maybe just the session ID on its own.
Otherwise, use a stream for previewing, and save to disk when the email button is pressed, using the sysconfig settings mentioned above.
Also a suggestion to add a warning in the sysconfig description regarding uniqueness and concurrency.
Thanks , followed better your advice, just added #AD_Session_ID
Sounds good. Thanks Carlos.