Subreport的ServerFilter在ADP项目中不起作用 [英] ServerFilter of Subreport not working in ADP project

查看:62
本文介绍了Subreport的ServerFilter在ADP项目中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,

我有一个表单,根据表单上的两个输入字段(开始结束日期&  unitID)为报表提供where子句。生成的报告正确显示数据(如where子句中所定义),但子报告显示所有记录(没有
where子句应用)。

I have a form that provides a where clause for a report based on two input fields on the form (start end dates & unitID). The resulting report shows the data correctly (as defined in the where clause) but the subreport shows all records (no where clause applied).

我试过保存在哪里表单中的子句,然后使用ServerFilter属性将其应用于On Open事件中的子报表。代码工作正常,我可以看到where子句是正确的,但子报告仍然没有反映过滤的
数据。

I've tried saving the where clause from the form and then applying it to the subreport in the On Open event using the ServerFilter property. The code works fine and I can see the where clause is correct yet the subreport still doesn't reflect the filtered data.

有谁知道是什么原因造成的?  ;

Does anyone know what could be causing this? 

非常感谢。

 

 

推荐答案

Lilliumz,

Lilliumz,

我的问题是:*当*在过程中是子窗体的SQl设置 - 之前或者在父报告的_open / load事件完成后?

the question I have is this: *when* in the process is the subform's SQl getting set up - before or after the parent report's _open/load event(s) complete?

我问,因为我从来没有把代码放到sunreports初始化类型的事件中,但我很奇怪他们是否像子表单一样,可以加载和处理他们的数据*之前*父表单甚至将其_Open事件清空。

I ask because I've never had to put code in to sunreports initialization-type events, but I am wonderinf if they act like subforms, which can load and process their data *BEFORE* the parent form even finshes its _Open event STARTS.

您可能需要让子报表拥有_open代码并获得修订/更新的查询SQL - 不要等待父报告的代码事件,因为这可能是"太晚了"。 (如果报告/子报告启动事件与表单/子表单事件一样堆叠,则表示
。)

You may need to have the subreports own _open code go and get the revised/updated query SQL - don't wait on the Parent report's code events as that may be "too late" (if, the report/subreport startup events stack up like the form/subform events do, that is).

 


这篇关于Subreport的ServerFilter在ADP项目中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆