【问题标题】:How to access the controls of an Active Reports (Data Dynamics)如何访问活动报告的控件(数据动态)
【发布时间】:2023-03-10 10:18:01
【问题描述】:

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

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

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

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

【问题讨论】:

    标签: asp.net vb.net activereports


    【解决方案1】:

    报告中的每个部分都有一个控件集合,用于显示该部分中的控件集合。 The topic on the Sections collection 有一个很好的例子,说明如何以编程方式将控件添加到集合中。下面是一些 cmets 的摘录以帮助解释:

        ' 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)
    

    The ActiveReports 6 documentation 具有 a walkthrough named Run Time Layouts,它构建了一个完整的应用程序,该应用程序在代码中构建了一个报表布局。这是准确了解如何通过代码操作报表的好方法。

    【讨论】:

    • 不幸的是两个链接都死了:'(
    • 无赖迈克尔。我也看不到文档了。如果您安装了 ActiveReports 版本 6(或可能是 v7),您应该能够在已安装的文档中找到名为“运行时布局”的演练。如果您有具体问题或疑问,请在此处回复,如果可以,我会尽力提供帮助。
    【解决方案2】:

    @activescott & @Michael,文档链接已更改,但它们仍然可用。 ActiveReports 6 文档转到here,运行时布局的演练是here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多