问:如何在复合报表(Composite DataWindow)中引用计算域的值? 答:对于一般类型的数据窗口,我们可以用这种办法:先为计算域取名,如“count_id”,取值过程如下(除了分组的数据窗口,一般计算域都用1): long ll_count_id ll_count_id = dw_1.getitemnumber(1,″count_id″) 而对于复合报表,须先用GetChild()函数得到其中的report,再取此report中计算域的值。假设此 report name 为“report_department”(注意不要混淆report name 与子数据窗口本身的名字),计算域名为count_id,则取值过程如下: DataWindowChild dwc_child long ll_count_id dw_1.GetChild(″report_department″ dwc_child) ll_count_id = dwc_child.getitemnumber(1,″count_id″)
|