简体   繁体   English

每次在JasperSoft iReport中打印(预览)时将Mark Report标记为

[英]Mark Report everytime it prints (preview) in JasperSoft iReport

Is it possible to mark a report based on the times we click Preview ? 是否可以根据我们单击Preview的时间来标记报告?

For example, if we preview the report once, it will show 1 . 例如,如果我们preview报表一次​​,它将显示1

If we preview the report twice, it will show 2 . 如果我们两次预览报告,它将显示2

I am using Adempiere and would like to put the report inside the window. 我正在使用Adempiere,并希望将报告放入窗口中。 So, when I click 'Print' once, it will show 1 , the same when I click Print for the second time it will show 2 , etc. 因此,当我单击“打印”一次时,它将显示1 ,而当我第二次单击“打印”时,它将显示2 ,依此类推。

Any suggestion will be useful :) 任何建议将是有用的:)

There is a field in the AD_Process table called Statistic_Count which function is to store how many times the process has been run. AD_Process表中有一个名为Statistic_Count的字段,该函数用于存储进程已运行了多少次。

What I would do is to pass the value of that field as a parameter to the report, so you can print it. 我要做的是将该字段的值作为参数传递给报表,以便可以打印它。

In the process parameter you could add a new numeric parameter called PreviewTimes and in the DefaultValue field set something like: 您可以在process参数中添加一个名为PreviewTimes的新数字参数,并在DefaultValue字段中设置以下内容:

@SQL=SELECT statistic_count FROM AD_Process WHERE AD_Process_ID = @AD_Process_ID@

Then, in the Jasper Report you receive that number and include it. 然后,在“ Jasper报告”中,您将收到该号码并将其包括在内。

Hope it helps. 希望能帮助到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM