I am not sure why I get this error. Set up datasource in my .mrt form connection is PM1 with datasource of synopsis_deliverables.
Dim sql1 As String
Dim da As SqlDataAdapter
Dim ds As New DataSet
sql1 = "select ID,Deliverables,To_PM from PM70.Synopsis_Deliverables where(Estimate_Number=" & test & ")"
da = New SqlDataAdapter(sql1, sqlcon)
da.Fill(ds)
report.Load(Server.MapPath("~/Forms/Work_Orders/Photoworkorderprint.mrt"))
ds.Tables.Item(0).TableName = "Synopsis_Deliverables"
report.DataSources.Clear()
report.Dictionary.Databases.Clear()
report.RegData("PM1", ds.Tables("Synopsis_Deliverables"))
report.Dictionary.Synchronize()
report.Render(False) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Errors right here saying error BC30451: Name 'DataSource1' is not declared.
StiWebViewer1.Report = report
Datasource1 not declared?
Datasource1 not declared?
Hi
Please make sure that the name of the 'NameInSource' property in the report Dictionary is "PM1.DataTableName" or "DataSet.DataTableName". Also try to pass to RegData() command ds dataset, instead of the table.
To find a problem, before 'Render' command, save report template to file:
report.Save()
Then you can open the report file in the designer and to find out where the problem was.
Thank you.
Please make sure that the name of the 'NameInSource' property in the report Dictionary is "PM1.DataTableName" or "DataSet.DataTableName". Also try to pass to RegData() command ds dataset, instead of the table.
To find a problem, before 'Render' command, save report template to file:
report.Save()
Then you can open the report file in the designer and to find out where the problem was.
Thank you.
Datasource1 not declared?
Here is full code. Wondering why my query is not showing up in the report? When saving and I reopen report its blank. I am using the DEMO to test out software to determine if we want it but can't get this to work.
Dim sql1 As String
Dim da As SqlDataAdapter
Dim ds As New DataSet
sql1 = "select ID,Deliverables,To_PM from PM70.Synopsis_Deliverables where(Estimate_Number=" & test & ")"
da = New SqlDataAdapter(sql1, sqlcon)
da.Fill(ds)
'report.Load(Server.MapPath("~/Forms/Work_Orders/Photoworkorderprint.mrt"))
'ds.Tables.Item(0).TableName = "Synopsis_Deliverables"
'report.DataSources.Clear()
'report.Dictionary.Databases.Clear()
'report.RegData("PM1", ds.Tables("Synopsis_Deliverables"))
'report.Dictionary.Synchronize()
'report.Render(False)
'StiWebViewer1.Report = report
Dim stireport1 As New Stimulsoft.Report.StiReport
stireport1.Load(Server.MapPath("~/Forms/Work_Orders/Photoworkorderprint.mrt"))
Dim sqlDB As Stimulsoft.Report.Dictionary.StiSqlDatabase
sqlDB = stireport1.Dictionary.Databases("PM1")
If Not IsDBNull(sqlDB) Then
sqlcon.Open()
End If
stireport1.Dictionary.Databases.Clear()
stireport1.Dictionary.DataSources.Clear()
stireport1.RegData("Synopsis_Deliverables", ds)
stireport1.Dictionary.Synchronize()
report.Save("Photoworkorderprint.mrt")'''''''''''''''''''''''''''DID THIS NOTHING SHOWS
stireport1.Compile()
StiWebViewer1.Report = stireport1
Dim sql1 As String
Dim da As SqlDataAdapter
Dim ds As New DataSet
sql1 = "select ID,Deliverables,To_PM from PM70.Synopsis_Deliverables where(Estimate_Number=" & test & ")"
da = New SqlDataAdapter(sql1, sqlcon)
da.Fill(ds)
'report.Load(Server.MapPath("~/Forms/Work_Orders/Photoworkorderprint.mrt"))
'ds.Tables.Item(0).TableName = "Synopsis_Deliverables"
'report.DataSources.Clear()
'report.Dictionary.Databases.Clear()
'report.RegData("PM1", ds.Tables("Synopsis_Deliverables"))
'report.Dictionary.Synchronize()
'report.Render(False)
'StiWebViewer1.Report = report
Dim stireport1 As New Stimulsoft.Report.StiReport
stireport1.Load(Server.MapPath("~/Forms/Work_Orders/Photoworkorderprint.mrt"))
Dim sqlDB As Stimulsoft.Report.Dictionary.StiSqlDatabase
sqlDB = stireport1.Dictionary.Databases("PM1")
If Not IsDBNull(sqlDB) Then
sqlcon.Open()
End If
stireport1.Dictionary.Databases.Clear()
stireport1.Dictionary.DataSources.Clear()
stireport1.RegData("Synopsis_Deliverables", ds)
stireport1.Dictionary.Synchronize()
report.Save("Photoworkorderprint.mrt")'''''''''''''''''''''''''''DID THIS NOTHING SHOWS
stireport1.Compile()
StiWebViewer1.Report = stireport1
Datasource1 not declared?
Hi
Please attach your report template (mrt) file in this topic ('attach' button).
Was the report template completely blank or just the data from dataset has not been shown?
Thank you.
Please attach your report template (mrt) file in this topic ('attach' button).
Was the report template completely blank or just the data from dataset has not been shown?
Thank you.
Datasource1 not declared?
Resolved. Had my datasource all wrong. Should be datasource1 not syncronize_deliverables.
Datasource1 not declared?
Hi
Thank you for your feedback, please let us know if any help is required.
Thank you.
Thank you for your feedback, please let us know if any help is required.
Thank you.