Hug*_*del 2 vb.net asp.net activereports
我工作的公司使用 DataDynamics 的 Active Reports 来生成报告,他们问我是否可以创建一个报告的 Web 查看器,您可以在其中移动字段。
因此,我认为可以做到这一点的方法是在 div 中加载空报告(仅包含与 VS2012 中的设计器中出现的字段类似的字段),并使用 Jquery 进行移动,而不是动态创建报告。
问题是,我找不到访问报告控件的方法。我一整天都在谷歌上搜索 hwo 来执行此操作,但我似乎找不到解决方案。
我们使用 Active Reports 6、VS2012 和 vb.net。
报告中的每个部分都有一个控件集合,显示该部分中的控件集合。有关“Sections”集合的主题提供了一个很好的示例,说明如何以编程方式向集合添加控件。下面摘录了一些有助于解释的评论:
' Insert Group Header and Footer Sections:'
Me.Sections.InsertGroupHF()
' Set some proprties to configure those sections:
CType(Me.Sections("GroupHeader1"), GroupHeader).DataField = "CategoryID"
Me.Sections("GroupHeader1").BackColor = System.Drawing.Color.SlateBlue
Me.Sections("GroupHeader1").CanGrow = True
Me.Sections("GroupHeader1").CanShrink = True
CType(Me.Sections("GroupHeader1"), GroupHeader).RepeatStyle = RepeatStyle.OnPageIncludeNoDetail
Me.Sections("GroupHeader1").Height = 0
' Create a TexBox control & Set some properties to configure that control
Dim txt As New TextBox()
txt.DataField = "CatagoryID"
txt.Location = New System.Drawing.PointF(0.0F, 0)
txt.Width = 2.0F
txt.Height = 0.3F
txt.Style = "font-weight: bold; font-size: 16pt"
' Add the TextBox to the GroupHeader section:
Me.Sections("GroupHeader1").Controls.Add(txt)
Run Code Online (Sandbox Code Playgroud)
ActiveReports 6 文档有一个名为“运行时布局”的演练,它构建了一个在代码中构建报表布局的整个应用程序。这是准确学习如何通过代码操作报表的好方法。
归档时间: |
|
查看次数: |
5409 次 |
最近记录: |