How to pass Parameter into SQL base Report
How to pass Parameter into SQL base Report
Hi,
I am trying to generate the report by passing parameter from Web Form,
Example, I want to pass @DateStart and @DateEnd parameter into a SQL query..
I using the method,
Me.stiReport1.Item("@DateStart")
Me.stiReport1.Item("@DateEnd")
compilation is no problem, the only problem I face is no result return, and Stimulsoft Report is not generated.
Anything I miss over here?
---
If I set a query without passing any parameter into the SQL, the Stimulsoft Report work fine.
Anyone can help me on this?
Thanks,
I am trying to generate the report by passing parameter from Web Form,
Example, I want to pass @DateStart and @DateEnd parameter into a SQL query..
I using the method,
Me.stiReport1.Item("@DateStart")
Me.stiReport1.Item("@DateEnd")
compilation is no problem, the only problem I face is no result return, and Stimulsoft Report is not generated.
Anything I miss over here?
---
If I set a query without passing any parameter into the SQL, the Stimulsoft Report work fine.
Anyone can help me on this?
Thanks,
How to pass Parameter into SQL base Report
Hello,
Do you use Stimulsoft Reports.Fx for Flex?
Thank you.
Do you use Stimulsoft Reports.Fx for Flex?
Thank you.
How to pass Parameter into SQL base Report
Hi,
Thanks for the quick reply.
I am using StiWebViewerFx..
Below is my coding
Thanks for the quick reply.
I am using StiWebViewerFx..
Below is my coding
That the full code of it, but it when come to generating the report, it give a blank..Dim ReportDateStart As DateTime = cDateStart.SelectedDate
Dim ReportDateEnd As DateTime = cDateEnd.SelectedDate
Dim Report As StiReport = New StiReport
Dim applicationDirectory As String = HttpContext.Current.Server.MapPath(String.Empty)
Dim reportFileName As String = applicationDirectory & "\Reports\reportTimeShifts.mrt"
Dim TagID As String = dlistUserName.SelectedItem.Text
Report.Load(reportFileName)
Report.Item("@TagID") = TagID
Report.Item("@DateStart") = ReportDateStart
Report.Item("@DateEnd") = ReportDateEnd
Report.Compile()
Report.Render(True)
Me.StiWebViewerFx1.Report = Report
How to pass Parameter into SQL base Report
Hello,
Please check following sample project:
www.stimulsoft.com/private/WebSqlParameters.zip
This project use WebViewer but code for WebViewerFx will be same.
Thank you.
Please check following sample project:
www.stimulsoft.com/private/WebSqlParameters.zip
This project use WebViewer but code for WebViewerFx will be same.
Thank you.
How to pass Parameter into SQL base Report
Hi,
Thanks for the reply, I will give this method a try . Will let you know is it working or not..
:biggrin:
Thanks for the reply, I will give this method a try . Will let you know is it working or not..
:biggrin:
How to pass Parameter into SQL base Report
Thank you!
How to pass Parameter into SQL base Report
Hi,
I tried the method
Note: reportTimeShift is the name for the DataSource in MRT file
Any Idea why?
---
Another Error I encounter is when i user webreportviewer I get the error on reportTable is null, and there is no return on offsetWidth. It stop at the debug mode.. If I click on continue, nothing will get generate as well.
reportFrame.width = reportTable.offsetWidth;
reportFrame.height = reportTable.offsetHeight - heightDelta;
I tried the method
And it still giving me a blank page, as far as I know the loading value stop when it reach around 33%, then the report page turn blank. Event I try just put a title (textblock) in the report, it doesn't turn out as well.Dim ReportDateStart As DateTime = cDateStart.SelectedDate
Dim ReportDateEnd As DateTime = cDateEnd.SelectedDate
Dim Report As StiReport = New StiReport
Dim applicationDirectory As String = HttpContext.Current.Server.MapPath(String.Empty)
Dim reportFileName As String = applicationDirectory & "\Reports\reportTimeShifts.mrt"
Dim TagID As String = dlistUserName.SelectedItem.Text
Report.Load(reportFileName)
Report.Compile()
Report.CompiledReport.DataSources("reportTimeShift").Parameters("@DateStart").ParameterValue = ReportDateStart
Report.CompiledReport.DataSources("reportTimeShift").Parameters("@DateEnd").ParameterValue = ReportDateEnd
Report.Render()
Me.StiWebViewerFx1.Report = Report
Note: reportTimeShift is the name for the DataSource in MRT file
Any Idea why?
---
Another Error I encounter is when i user webreportviewer I get the error on reportTable is null, and there is no return on offsetWidth. It stop at the debug mode.. If I click on continue, nothing will get generate as well.
reportFrame.width = reportTable.offsetWidth;
reportFrame.height = reportTable.offsetHeight - heightDelta;
How to pass Parameter into SQL base Report
I sent the email hope to hear from you all soon