水晶报表的问题:该字段名未知,急啊,请大家帮忙!!!!
小弟使用的是CRYSTAL REPORT 9.2的版本
制作一个报表,里面的字段采用动态绑定的方式
但是发现在执行的使用报表出错
strPrint_Sql = "select pin_no abc from rece_data as c"
If PrintRs.State = adStateOpen Then
PrintRs.Close
PrintRs.Open strPrint_Sql, Cn, adOpenDynamic, adLockOptimistic
End If
'crv.Database.SetDataSource rs, 3
report2.DiscardSavedData
report2.Database.SetDataSource PrintRs, 3
================================
report2.UnboundString1.SetUnboundFieldSource ("{c.abc}")
================================
执行到这里出错!"该字段名未知"
但是如果用report2.UnboundString1.SetUnboundFieldSource ("{rece_data.pin_no}")
(没有别名的表名和字段)访问时候,就没有问题
请问如何解决???
因为必须用到表的别名和字段的别名
report2.UnboundString1.SetUnboundFieldSource ("{rece_data.abc}")