Before Print event behavior differs between heavy client application and web app
Posted: Wed Feb 28, 2024 4:06 am
Hello,
To give a little bit of context, I use Stimulsoft Designer v2023.2.8 to design reports. The designer is accessible from within a heavy client application. The report viewer is accessible from that same heavy client application, but also from a Web App.
When I design reports for the heavy client app, the data source is sql server. When from web app, it is a JSON object.
For one report generated from the heavy client application, I am using a Before Print event with a simple routine to check if a certain element has to be displayed in color or not. It works. (see pic - for each group of identical left number, it alternates black and white)
I have to design the same behavior in a report generated from the Web app part. I use strictly the same routine, variables and Before Print event. Everything is white.
Say that number is datasource X of integer type. I created 2 variables of integer type, Y and Black, initialized to 0.
That rectangle has a condition on it, if Black = 1 it will be colored in black, otherwise it will remain white.
My before print even in both cases is:
if (Y != X)
{Y = X;
if(Black==0)
{Black=1;}
else
{Black=0;}
}
As I said, this works perfectly in the report generated from the desktop application, but not at all from the Web app.
Any idea why this happens?
Thank you for your help.
To give a little bit of context, I use Stimulsoft Designer v2023.2.8 to design reports. The designer is accessible from within a heavy client application. The report viewer is accessible from that same heavy client application, but also from a Web App.
When I design reports for the heavy client app, the data source is sql server. When from web app, it is a JSON object.
For one report generated from the heavy client application, I am using a Before Print event with a simple routine to check if a certain element has to be displayed in color or not. It works. (see pic - for each group of identical left number, it alternates black and white)
I have to design the same behavior in a report generated from the Web app part. I use strictly the same routine, variables and Before Print event. Everything is white.
Say that number is datasource X of integer type. I created 2 variables of integer type, Y and Black, initialized to 0.
That rectangle has a condition on it, if Black = 1 it will be colored in black, otherwise it will remain white.
My before print even in both cases is:
if (Y != X)
{Y = X;
if(Black==0)
{Black=1;}
else
{Black=0;}
}
As I said, this works perfectly in the report generated from the desktop application, but not at all from the Web app.
Any idea why this happens?
Thank you for your help.