开发者

how to group fields in crystal reports using vb.net code?

开发者 https://www.devze.com 2022-12-24 16:03 出处:网络
I am using vb.net 2005. i am trying to set report groupings of a crystal report at runtime based on us开发者_运维知识库er defined options. MSDN says this:

I am using vb.net 2005. i am trying to set report groupings of a crystal report at runtime based on us开发者_运维知识库er defined options. MSDN says this:

Dim FieldDef As FieldDefinition
FieldDef = 
Report.Database.Tables.Item(0).Fields.Item(comboBox1().Text)
Report.DataDefinition.Groups.Item(0).ConditionField = FieldDef 

but error shows invalid group number

how to solve this?


CrystalDecisions.CrystalReports.Engine.FieldDefinition fld;

          fld = crReportDocument.Database.Tables[0].Fields[Session["rcbgroupby"].ToString()];
            crReportDocument.DataDefinition.Groups[0].ConditionField = fld
0

精彩评论

暂无评论...
验证码 换一张
取 消