繁体   English   中英

如何访问活动报表的控件(数据动态)

[英]How to access the controls of an Active Reports (Data Dynamics)

我工作的公司使用DataDynamics的Active Reports生成他们的报告,他们问我是否可以对报告进行Web查看,以便可以在其中移动字段。

因此,我认为可以执行此操作的方法是在div中加载空报表(仅包含VS2012中显示在设计器中的字段),并使用Jquery进行移动,而不是动态创建报表。

关键是,我找不到访问报表控件的方法。 我整天都在忙着这样做,但是似乎找不到解决方案。

我们正在使用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)

ActiveReports 6文档提供了一个名为“运行时布局”的演练,该演练将构建整个应用程序,该应用程序将在代码中构建报表布局。 这是学习确切地如何通过代码操作报表的好方法。

@activescott和@Michael,文档链接已更改,但仍然可用。 对于ActiveReports 6文档,请转到此处 ,而运行时布局的演练在此处

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM