2

我工作的公司使用 DataDynamics 的 Active Reports 来生成他们的报告,他们问我是否可以做一个报告的网络查看器,您可以在其中移动字段。

所以我认为我可以做到这一点的方法是在 div 中加载空报告(只有它们出现在 VS2012 设计器中的字段)并使用 Jquery 进行移动,而不是动态创建报告。

问题是,我找不到访问报告控件的方法。我已经用谷歌搜索了一整天来做这件事,但我似乎找不到解决方案。

我们正在使用 Active Reports 6、VS2012 和 vb.net。

4

2 回答 2

4

报告中的每个部分都有一个控件集合,该集合显示该部分中的控件集合。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)

ActiveReports 6 文档一个名为 Run Time Layouts 的演练,它构建了一个在代码中构建报表布局的整个应用程序。这是准确了解如何通过代码操作报表的好方法。

于 2013-02-19T19:52:00.743 回答
2

@activescott & @Michael,文档链接已更改,但它们仍然可用。ActiveReports 6 文档请点击此处,运行时布局的演练请点击此处

于 2014-10-08T02:56:23.273 回答