send datasour pragmatically stimulsoft report with relation
Posted: Mon Dec 09, 2013 1:52 pm
i need to send the data source via Regdata but i get error ,note : i use relation table i use this code
Dim stiReport1 As New Stimulsoft.Report.StiReport
stiReport1.Load("D:\Rpt_test.mrt")
Dim ds as dataset= SqlHelper.ExecuteDataset(My.Settings.Payroll2009ConnectionString, "Rpt_Sp_Arrival",
Dtp_FromDate.Value, Dtp_ToDate.Value, Nothing, Cbo_Deps.SelectedValue)
Dim ds2 as dataset= SqlHelper.ExecuteDataset(My.Settings.Payroll2009ConnectionString, "Rpt_Sp_ArrivalTotal",
Dtp_FromDate.Value, Dtp_ToDate.Value, Cbo_Deps.SelectedValue)
stiReport1.Dictionary.Clear()
ds2.Tables(0).TableName = "Rpt_Sp_ArrivalTotal"
ds.Tables(0).TableName = "Rpt_Sp_Arrival"
stiReport1.RegData("Rpt_Sp_ArrivalTotal", ds2.Tables(0))
stiReport1.RegData("Rpt_Sp_Arrival", ds.Tables(0))
stiReport1.Dictionary.Synchronize()
stiReport1.Compile()
stiReport1.Render()
stiReport1.ShowWithRibbonGUI()
Dim stiReport1 As New Stimulsoft.Report.StiReport
stiReport1.Load("D:\Rpt_test.mrt")
Dim ds as dataset= SqlHelper.ExecuteDataset(My.Settings.Payroll2009ConnectionString, "Rpt_Sp_Arrival",
Dtp_FromDate.Value, Dtp_ToDate.Value, Nothing, Cbo_Deps.SelectedValue)
Dim ds2 as dataset= SqlHelper.ExecuteDataset(My.Settings.Payroll2009ConnectionString, "Rpt_Sp_ArrivalTotal",
Dtp_FromDate.Value, Dtp_ToDate.Value, Cbo_Deps.SelectedValue)
stiReport1.Dictionary.Clear()
ds2.Tables(0).TableName = "Rpt_Sp_ArrivalTotal"
ds.Tables(0).TableName = "Rpt_Sp_Arrival"
stiReport1.RegData("Rpt_Sp_ArrivalTotal", ds2.Tables(0))
stiReport1.RegData("Rpt_Sp_Arrival", ds.Tables(0))
stiReport1.Dictionary.Synchronize()
stiReport1.Compile()
stiReport1.Render()
stiReport1.ShowWithRibbonGUI()