Parameters with stored proc
Parameters with stored proc
Created a stored proc on the designer side and passing a param to it only I can't seem to figure out why its getting this error.
error CS0117: 'Reports.Report' does not contain a definition for 'Estimate_Number'
My code I think is pretty much right on.
Dim test As String = Request.QueryString("ID")
'sqlcmd.Parameters.Add("@MJH_Number", SqlDbType.VarChar).Value = CType(ddlMJH_Number.SelectedValue, String)
Dim rootWebConfig As System.Configuration.Configuration
rootWebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/PM2")
Dim connString As New System.Configuration.ConnectionStringSettings
If (0 < rootWebConfig.ConnectionStrings.ConnectionStrings.Count) Then
connString = rootWebConfig.ConnectionStrings.ConnectionStrings("PM1ConnectionString")
End If
Dim sqlcon As New SqlConnection(connString.ConnectionString)
Dim report As Stimulsoft.Report.StiReport = New Stimulsoft.Report.StiReport
sqlcon.Open()
report.Load(Server.MapPath("~/Forms/Work_Orders/phtowrkordprint.mrt"))
report.Item("@Estimate_Number") = test
report.Compile()
report.Render(True)
StiWebViewer1.Report = report
sqlcon.Close()
error CS0117: 'Reports.Report' does not contain a definition for 'Estimate_Number'
My code I think is pretty much right on.
Dim test As String = Request.QueryString("ID")
'sqlcmd.Parameters.Add("@MJH_Number", SqlDbType.VarChar).Value = CType(ddlMJH_Number.SelectedValue, String)
Dim rootWebConfig As System.Configuration.Configuration
rootWebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/PM2")
Dim connString As New System.Configuration.ConnectionStringSettings
If (0 < rootWebConfig.ConnectionStrings.ConnectionStrings.Count) Then
connString = rootWebConfig.ConnectionStrings.ConnectionStrings("PM1ConnectionString")
End If
Dim sqlcon As New SqlConnection(connString.ConnectionString)
Dim report As Stimulsoft.Report.StiReport = New Stimulsoft.Report.StiReport
sqlcon.Open()
report.Load(Server.MapPath("~/Forms/Work_Orders/phtowrkordprint.mrt"))
report.Item("@Estimate_Number") = test
report.Compile()
report.Render(True)
StiWebViewer1.Report = report
sqlcon.Close()
Parameters with stored proc
Hello,
Please send to support@stimulsoft.com your report for examination. Also let me know about version of report generator.
Thank you.
Please send to support@stimulsoft.com your report for examination. Also let me know about version of report generator.
Thank you.
Parameters with stored proc
I sent it already. Version of report gen is 2009.3.600
Parameters with stored proc
Hi,
Thank you very much for the report template.
Please delete '@Estimate_Number' variable from the Dictionary. The defined parameter with the same name is enough for sending value for stored procedure.
Thank you.
Thank you very much for the report template.
Please delete '@Estimate_Number' variable from the Dictionary. The defined parameter with the same name is enough for sending value for stored procedure.
Thank you.
Parameters with stored proc
Thanks Edward,
I did that but all I get are the labels and no data. Tested the stored proc in sql and it returns data. Is the code correct?
I did that but all I get are the labels and no data. Tested the stored proc in sql and it returns data. Is the code correct?
Parameters with stored proc
tried everything I know to do and still no data. I can see my parameter is passed but the data is not showing in my form.
Parameters with stored proc
Hi
Thanks for the Email. Please send report template along with the explanation of the latest problem.
Thank you.
Thanks for the Email. Please send report template along with the explanation of the latest problem.
Thank you.
Parameters with stored proc
I got it working but I thought I did not need to drag the data source over to the template but rather drag the fields themselves. So you need a databand which establishes a dataconn and then the datasources over or the columns into the databand? I got used to crystal reports way of thinking sorry.
Parameters with stored proc
Hi
If there is no datasource in the report template, it only means that only first record of the DataSource will be rendered.
You do not have to drag and drop datasource into the page to have that one record rendered. Link to datacolum is enough.
But I think that the error in your case was connected with the name of the DataSource assigned to DataBand. It might happen that the DataSource name was changed in the Dictionary or deleted, but DataSource still contained an old name which caused the exception.
Thank you.
If there is no datasource in the report template, it only means that only first record of the DataSource will be rendered.
You do not have to drag and drop datasource into the page to have that one record rendered. Link to datacolum is enough.
But I think that the error in your case was connected with the name of the DataSource assigned to DataBand. It might happen that the DataSource name was changed in the Dictionary or deleted, but DataSource still contained an old name which caused the exception.
Thank you.
Parameters with stored proc
Thanks, I think your right cause I was able to do it yesterday. Interesting....but thanks for the reply. Great software!! Enjoy the support you guys give and great tutorials.