Event only fired in preview mode
Event only fired in preview mode
Hi Guys,
When I deploy my report to a Asp.Net Core based App, I encountered the a problem, let me describe the context firstly.
I created a report which contains one List variable, at the beginning, I want use this variable in my SQL script directly, however I found it seems not possible, so I created another variable as the placeholder in my SQL script, and I set up the event handling script to splice the SQL where condition, and as I wish, it works fine, I filter the data by selecting one or more or all departments.
BUT, when I deploy that report into my Web App, the 'Department filter' not work, which I guess the event is not fired after deployed.
Has anyone encountered the same problem?
When I deploy my report to a Asp.Net Core based App, I encountered the a problem, let me describe the context firstly.
I created a report which contains one List variable, at the beginning, I want use this variable in my SQL script directly, however I found it seems not possible, so I created another variable as the placeholder in my SQL script, and I set up the event handling script to splice the SQL where condition, and as I wish, it works fine, I filter the data by selecting one or more or all departments.
BUT, when I deploy that report into my Web App, the 'Department filter' not work, which I guess the event is not fired after deployed.
Has anyone encountered the same problem?
Sid
Re: Event only fired in preview mode
Hello, Sid.
What event do you use?
How do you pass the value of the variable to your SQL query?
Thank you.
What event do you use?
How do you pass the value of the variable to your SQL query?
Thank you.
Re: Event only fired in preview mode
Thanks for your reply.
I use BeginRender event of Report object, and in SQL I use the following format
Select * From aTable Where flag=1 {AdditionalConditions}
And I wrote the script in event handler to generate the value of variable AdditionalConditions.
In preview mode, it works fine, which means it only display the data for the selected departments.(I have another varialble named SelectedDeptIDs, which is a List variable)
In short, I want to implement the IN operation in my SQL.
I use BeginRender event of Report object, and in SQL I use the following format
Select * From aTable Where flag=1 {AdditionalConditions}
And I wrote the script in event handler to generate the value of variable AdditionalConditions.
In preview mode, it works fine, which means it only display the data for the selected departments.(I have another varialble named SelectedDeptIDs, which is a List variable)
In short, I want to implement the IN operation in my SQL.
Sid
Re: Event only fired in preview mode
Hello, Sid.
I think I understand why you are getting this issue.
There is no Compilation mode in .Net Core at this moment.
So the events and any code there are not working.
To check it in the StandAlone Designer change the Calculation Mode property of the report to Interpretation.
Thank you.
I think I understand why you are getting this issue.
There is no Compilation mode in .Net Core at this moment.
So the events and any code there are not working.
To check it in the StandAlone Designer change the Calculation Mode property of the report to Interpretation.
Thank you.
Re: Event only fired in preview mode
Hello,
I have tested your solution with the attached report, however it does work.
I have tested your solution with the attached report, however it does work.
- Attachments
-
- Report.mrt
- (3.57 KiB) Downloaded 355 times
Sid
-
- Posts: 6247
- Joined: Tue Mar 20, 2018 5:34 am
Re: Event only fired in preview mode
Hello,
In this report, you set value for the variable in the BeginRender. In the Interpretation mode, events are not supported.
Thank you.
In this report, you set value for the variable in the BeginRender. In the Interpretation mode, events are not supported.
Thank you.
-
- Posts: 3
- Joined: Tue May 12, 2020 3:47 pm
Re: Event only fired in preview mode
Hello,
No, the events are not supported in .NET Core.
Thank you.
No, the events are not supported in .NET Core.
Thank you.