Event only fired in preview mode

Stimulsoft Reports.WEB discussion
Post Reply
sidco
Posts: 3
Joined: Wed Mar 28, 2018 7:23 am

Event only fired in preview mode

Post 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?
Sid
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Event only fired in preview mode

Post by HighAley »

Hello, Sid.

What event do you use?
How do you pass the value of the variable to your SQL query?

Thank you.
sidco
Posts: 3
Joined: Wed Mar 28, 2018 7:23 am

Re: Event only fired in preview mode

Post 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.
Sid
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Event only fired in preview mode

Post 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.
sidco
Posts: 3
Joined: Wed Mar 28, 2018 7:23 am

Re: Event only fired in preview mode

Post by sidco »

Hello,

I have tested your solution with the attached report, however it does work.
Attachments
Report.mrt
(3.57 KiB) Downloaded 355 times
Sid
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Event only fired in preview mode

Post 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.
jhonalkaiser
Posts: 3
Joined: Tue May 12, 2020 3:47 pm

Re: Event only fired in preview mode

Post 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.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Event only fired in preview mode

Post by HighAley »

Hello,

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

Thank you.
Post Reply