我有一个字段 customerid,它是查询中的一个字段,但我没有在报告中显示这个 customerId。字段 customerid 在 dataset1 中。
我有另一个名为 dataset2 的数据集,并且我有查询“select ordername .... where order.customerId = o_custId”(我需要将 dataset1 中的 customerId 字段传递给参数 o_cust_id)。
因此,我创建了一个参数 c_customer_id 并在参数的向导/属性中设置了“默认值”,在我选择“从查询中获取值”后,值字段为 customerid,数据集为 dataset1。然后我单击 dataset2 的属性并在参数中设置:o_cust_id = [@c_customer_id] (这是参数)。
所以基本上我将 o_cust_id 的值设置为参数 c_customer_id,其值设置为 dataset1 中的 customerid 字段。
问题是我只是为所有 customerid 获得相同的值。id 在 dataset2 中没有得到更新,但在 dataset1 中得到更新。所以同样的参数值被传递给dataset2。这里有什么问题?
谢谢,拉古尔