Load Report by clicking button
Load Report by clicking button
Hi,
i'm using last version of ASP.NET MVC Viewer.
I got a jquery plugin for building a SQL where statement. (http://querybuilder.js.org/index.html)
Then when i click a button, i get sql from jquery plugin, then request to an stored procedure where apply this SQL-where-statement and retrieve all rows and display them to a grid.
Id like the same funcionality with reports, so when i click button it loads report.
So id like to know how to:
- Initial Load view -> doesnt load report.
- Click button, recover sql from pluging and then request report
- In Action GetReportSnapshot i must get sqlwhere statement and load report
Do you have any sample similar?
Thanks in advance.
i'm using last version of ASP.NET MVC Viewer.
I got a jquery plugin for building a SQL where statement. (http://querybuilder.js.org/index.html)
Then when i click a button, i get sql from jquery plugin, then request to an stored procedure where apply this SQL-where-statement and retrieve all rows and display them to a grid.
Id like the same funcionality with reports, so when i click button it loads report.
So id like to know how to:
- Initial Load view -> doesnt load report.
- Click button, recover sql from pluging and then request report
- In Action GetReportSnapshot i must get sqlwhere statement and load report
Do you have any sample similar?
Thanks in advance.
Re: Load Report by clicking button
Hello,
You can use the following code to change sql query after loading report in GetReportSnapshot event:
Thank you.
You can use the following code to change sql query after loading report in GetReportSnapshot event:
Code: Select all
((StiSqlSource)report.Dictionary.DataSources[ "DataSourceName"]).SqlCommand = newSqlCommand;
Re: Load Report by clicking button
hi for your answer but i think you didnt understand what i need:Aleksey wrote:Hello,
You can use the following code to change sql query after loading report in GetReportSnapshot event:Thank you.Code: Select all
((StiSqlSource)report.Dictionary.DataSources[ "DataSourceName"]).SqlCommand = newSqlCommand;
1) how can i show a report when i click a button that is outside from report, i dont want report is showed when view is loaded.
2) how can i pass some parameter to GetReportSnapshot controller action when i click the button from point 1.
Thanks in advance.
Re: Load Report by clicking button
Hello,
Could you send us a simple project which shows your we will try to find a solution for you.
Thank you.
Could you send us a simple project which shows your we will try to find a solution for you.
Thank you.
Re: Load Report by clicking button
Hi, thanks for your answer,
finally for
1) i have created a partial view with code for viewer. Partial is called from ajax function that is triggered when user make click to a button and its merged to a div into view. It works right
2) I have passed parametter creating a Session variable. For me it's not the best option nor solution, i think it could be a good enhanced for future versions.
finally for
1) i have created a partial view with code for viewer. Partial is called from ajax function that is triggered when user make click to a button and its merged to a div into view. It works right
2) I have passed parametter creating a Session variable. For me it's not the best option nor solution, i think it could be a good enhanced for future versions.
Re: Load Report by clicking button
Hello,
Thank you for your information.
Please let us know if you need any additional help.
Thank you.
Thank you for your information.
Please let us know if you need any additional help.
Thank you.