Hi,
I am copying rows with smart markers into a worksheet, and then processing them, however it doesn't insert the data, even when there is definitely data in the dataset with the right tablename
a snippet of my code is below, and I have attached the template:
Dim x As Integer = designer.Workbook.Worksheets.AddCopy("Competency")
Dim r As Range = designer.Workbook.Worksheets(x).Cells.CreateRange("A5", "V6")
Dim ds3 As DataSet = SqlHelper.ExecuteDataset(System.Configuration.ConfigurationSettings.AppSettings("DB"), CommandType.Text, "GetOutlineCodeValues 14")
Dim sdr As DataRow
Dim row1 As Integer = 5
Dim row2 As Integer = 6
For Each sdr In ds3.Tables(0).Rows
Dim r2 As Range = designer.Workbook.Worksheets(1).Cells.CreateRange("A" & row1, "V6" & row2)
r2.Copy(r)
Dim ds2 As DataSet = SqlHelper.ExecuteDataset(System.Configuration.ConfigurationSettings.AppSettings("DB"), CommandType.Text, "pGetCompetencyDailyReport '" & sdr("FieldValue") & "'")
ds2.Tables(0).TableName = "Projects"
designer.SetDataSource(ds2)
designer.Process(1, False)
row1 = row1 + IIf(ds2.Tables(0).Rows.Count = 0, 1, ds2.Tables(0).Rows.Count) + 1
row2 = row2 + IIf(ds2.Tables(0).Rows.Count = 0, 1, ds2.Tables(0).Rows.Count) + 1
Next