Calculated column PHP

Stimulsoft Reports.PHP discussion
FTrevisani
Posts: 3
Joined: Thu Apr 16, 2015 3:02 pm

Calculated column PHP

Post by FTrevisani »

Hello,
in order to draw a performance chart, we created a calculated column like this:
rendTemp==-9999999999 ? rendTemp = 100 : rendTemp = rendTemp * (1+ this.ptfRet.PtfPerf);

rendTemp is a variable initialized to -9999999999
ptfRet is a datasource (rendTemp is a column of this datasource)
PtfPerf is a field (type double) of the datasource that represent the serie of performance of an asset (something like this: 0,3%, 0,5%, .0,3%)

With this column we want to draw a line that start from 100 and repesents the performance of the asset.

If we use the .NET designer it works like a charm, but when we migrate this on php nothing works.

We changed also the calculated column to
rendTemp==-9999999999 ? rendTemp = 100 : rendTemp = rendTemp * (1+ ptfRet.PtfPerf);
with no useful results.

In .NET version we can explore the "translation" in C# code (the event used to calculate the column values), but in php I think that's not possible...

Can someone help me?

Thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Calculated column PHP

Post by HighAley »

Hello.

Please, send us a sample report template with sample data for analysis.

Thank you.
FTrevisani
Posts: 3
Joined: Thu Apr 16, 2015 3:02 pm

Re: Calculated column PHP

Post by FTrevisani »

I've created a short example.

Thank you.
Attachments
testStimulsoft.zip
(3.39 KiB) Downloaded 307 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Calculated column PHP

Post by HighAley »

Hello.

Thank you for the sample.
We have reproduced the issue.

The first problem in the expression of calculated column. It should be next:

Code: Select all

rendTemp = rendTemp==-9999999999 ? 100 : rendTemp * (1+ OrigineDati1.values)
The value is shown in text component on the band, but the chart is not shown.

We need additional time to make an improvement.
We will let you know about results.

Thank you.
FTrevisani
Posts: 3
Joined: Thu Apr 16, 2015 3:02 pm

Re: Calculated column PHP

Post by FTrevisani »

Thank you for the answer...
I just wanna say you that with the expression I didn't want to set the value of the rendTemp variable, but I want set the values of the calculated column; I used the rendTemp variable only to set the start value of the column from 100.

Thank you,
Fabrizio
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Calculated column PHP

Post by HighAley »

Hello.

OK. There is something wrong with calculated columns in chart.
We need some time to make an improvement.

Thank you.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Re: Calculated column PHP

Post by Ivan »

Hello,

The problem is solved.
The patch will be available in the next prerelease build.

Thank you.
mrossi
Posts: 5
Joined: Thu Aug 01, 2019 10:04 am

Re: Calculated column PHP

Post by mrossi »

Hi, i have a similar issue for a template already used by my company with the last version of Reports.JS and Reports.FX, it doesn't work on php server. Also the example attached in the post above... It seems that the assignment does not return the calculated value to the chart. If i try to evaluate the code in c# with visual studio it assigns the value to the temp var and return the result. In Stimulsoft Designer it seems to work but in Reports.JS and Reports.FX through PHP no. Someone could test if the bug was reintroduced? Thank you
Lech Kulikowski
Posts: 6199
Joined: Tue Mar 20, 2018 5:34 am

Re: Calculated column PHP

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data for analysis.

Thank you.
mrossi
Posts: 5
Joined: Thu Aug 01, 2019 10:04 am

Re: Calculated column PHP

Post by mrossi »

Hi, I attached the exampled with a modified version of previous example but also the original didn't works. Building the example I noticed that putting it on apache doesn't even seem to load the data from the csv file as it happens with Stimulsoft Designer. I have attached what I see in various cases as Designer and Browser.

P.S: in the preview from Designer it doesn't even show the value given in the x axis...

Thank you
Attachments
stimulsoft_JS_Designer.png
stimulsoft_JS_Designer.png (101 KiB) Viewed 3621 times
stimulsoft_JS_Browser.png
stimulsoft_JS_Browser.png (27.42 KiB) Viewed 3621 times
stimulsoft_html_Designer.png
stimulsoft_html_Designer.png (113.19 KiB) Viewed 3621 times
stimulsoft_Flash_Designer.png
stimulsoft_Flash_Designer.png (92.41 KiB) Viewed 3621 times
stimulsoft_Flash_Browser.png
stimulsoft_Flash_Browser.png (26.37 KiB) Viewed 3621 times
testStimulsoft.zip
(3.28 KiB) Downloaded 210 times
Post Reply