how can i create a datasource not connected to xml , sql or odbc ?
laurent vialaret
hii want to draw a chart in a report , but data for this chart are not issued from an sql query , but calculated and stored in VB variables , and i need to pass an 2 dim array like this (("cust1",100) , ("cust2",1000) , .....)
how can i do this in coresuitedesigner ?
thanks for your help
Philipp Knecht
hi laurentyou have several options.
if you would like to have design time support (drag & drop fields in the designer) then you should use either:
- queries in the layoutdefinition
- datasource in the layoutdefinition
if you don't need design time support you can create dynamically a System.DataSet or DataTable in the Generatescript of the document.
example:
DataObjects.Remove("Test")
Dim dt As DataTable = New DataTable("Test")
Dim dc As DataColumn = dt.Columns.Add("Col1",System.Type.GetType("System.String"))
dc = dt.Columns.Add("Col2",System.Type.GetType("System.String"))
Dim i,z As Integer
For z = 1 to 2
For i = 1 To 10
Dim dr1 As DataRow = dt.NewRow()
dr1("Col2") = "Group" & z
dr1("Col1") = "Item" & i
dt.Rows.Add(dr1)
Next
Next
DataObjects.Add("Test",dt)if you use coresuite customize you can generate a DataSource by code like described in:
http://www.coresystems.ch/forum.html?&tx_mmforum_pi1[action]=list_post&tx_mmforum_pi1[tid]=3209
You can also do that in a seperate .NET dll and use that but this is out of scope and would need some education or a billable remote session with us.
hth
0
Please sign in to leave a comment.
Comments
0 comments