Page 1 of 1

Event only fired in preview mode

Posted: Wed Mar 28, 2018 7:40 am
by sidco
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?

Re: Event only fired in preview mode

Posted: Wed Mar 28, 2018 9:00 pm
by HighAley
Hello, Sid.

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

Posted: Thu Mar 29, 2018 5:23 am
by sidco
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.

Re: Event only fired in preview mode

Posted: Thu Mar 29, 2018 1:57 pm
by HighAley
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.

Re: Event only fired in preview mode

Posted: Wed Apr 04, 2018 1:41 am
by sidco
Hello,

I have tested your solution with the attached report, however it does work.

Re: Event only fired in preview mode

Posted: Thu Apr 05, 2018 7:20 pm
by Lech Kulikowski
Hello,

In this report, you set value for the variable in the BeginRender. In the Interpretation mode, events are not supported.

Thank you.

Re: Event only fired in preview mode

Posted: Tue May 12, 2020 6:01 pm
by jhonalkaiser
HighAley wrote: Thu Mar 29, 2018 1:57 pm There is no Compilation mode in .Net Core at this moment.
Hi, I beg your pardon for resurrecting this post but are events supported in .Net Core now?

Thanks in advance.

Re: Event only fired in preview mode

Posted: Tue May 12, 2020 9:31 pm
by HighAley
Hello,

No, the events are not supported in .NET Core.

Thank you.