Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

点击在线打印报错“Report preview data has expired,can not do load pages for print” #48

Closed
308503664 opened this issue Aug 21, 2017 · 6 comments

Comments

@308503664
Copy link

308503664 commented Aug 21, 2017

现象就是点击在线打印报错“Report preview data has expired,can not do load pages for print”。
UReport都是最新的2.0.9版本。在线打印仍然报数据过期的这个错误。
调试发现,

  1. 当打开报表时ExportManagerImpl.exportHtml中的parameters参数经过reportRender.render之后就被清空了,于是在缓存报表的时候,缓存的键就是file+{};
    qq 20170821150812
    qq 20170821150919

  2. 当点击在线打印时,HtmlPreviewServletAction.loadPrintPages(HttpServletRequest, HttpServletResponse)中parameters不为空,此时从缓存中获取报表的键是file+{xxx},那么肯定是找不到缓存数据的,于是就报错了。

qq 20170821150938

总结,就是存的时候的键与获取的时候的键不同。

@youseries
Copy link
Owner

请将问题描述清楚,不用给我贴源码,我看得懂源码!

@308503664
Copy link
Author

308503664 commented Aug 21, 2017

预览报表时传的有其他参数,如:ureport/preview?u=my:test.ureport.xml&cachedatakey=adfaoqiwueorqew
在点击在线打印报错“Report preview data has expired,can not do load pages for print”。
UReport都是最新的2.0.9版本。

@youseries
Copy link
Owner

你传了哪些参数?

@308503664
Copy link
Author

预览报表时传的有其他参数,如:ureport/preview?u=my:test.ureport.xml&cachedatakey=adfaoqiwueorqew
在点击在线打印报错“Report preview data has expired,can not do load pages for print”。
UReport都是最新的2.0.9版本。

@youseries
Copy link
Owner

我这边测下来是好的,2.0.9以前的版本没有问题?

@308503664
Copy link
Author

我检查下我这边的数据源吧,可能是数据源处理的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants