2013-02-19 20 views
2

我工作的公司使用DataDynamics的活動報告生成他們的報告,他們問我是否可以在報告的Web瀏覽器中移動周圍的田野。如何訪問活動報告(Data Dynamics)的控件

所以我認爲我可以做到這一點的方式是在div中加載空的報告(只有像他們在VS2012設計師出現的字段),並使用Jquery的動作,而不是動態創建報告。

事情是,我找不到訪問報表控件的方法。我一直在Google上搜索一整天,但似乎找不到解決方案。

我們使用Active Reports 6,VS2012和vb.net。

回答

4

報告中的每個部分都有一個Controls集合,它顯示了該部分中的控件集合。 The topic on the Sections collection有一個很好的示例,說明如何以編程方式將控件添加到集合中。有一些意見,以幫助解釋摘錄低於:

' 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這是建立在構建代碼的報告佈局整個應用程序。這是瞭解如何通過代碼操作報表的好方法。

+1

很好的發現,感謝這個答案! =) – 2013-09-27 17:17:32

+1

不幸的是,兩個鏈接都死了:'( – Michael 2014-10-01 15:16:35

+0

Bummer Michael。我再也看不到文檔了。如果你安裝了ActiveReports的第6版(或者可能是v7),你應該能夠找到名爲「Run時間佈局「,如果您有特定的問題或問題回覆,我會盡力幫助。 – 2014-10-08 02:06:59

2

@activescott & @Michael,文檔鏈接已更改,但它們仍可用。對於ActiveReports 6文檔,請轉至here,並且運行時佈局的演練爲here