Page 1 of 1
Function in a column using value from other function
Posted: Fri Jul 29, 2016 3:35 pm
by Enrique
Hello.
We have a report whit three columns:
The first one contains a datatable field.
In the second column we have a function that evaluates the first column and fills a value depending on the field.
In the last one we want to use a function to evaluate the second column but we don't know how to retrieve the value or to reference the previous function.
Can you help us with this topic?
Thanks in advance,
Enrique.
Re: Function in a column using value from other function
Posted: Mon Aug 01, 2016 11:04 am
by Alex K.
Hello,
Could you explain your task in more details? If possible, please send us a test data for analysis.
Thank you.
Re: Function in a column using value from other function
Posted: Mon Aug 01, 2016 3:50 pm
by Enrique
Hello.
Thanks for your answer.
In the attached report and Excel file you will find a sample situation. In the first column we have a field from the datasource and in the second a condition based on it. In the third column we want to evaluate the first condition:
Name Condition1 Condition2
{Hello} - If Name = "Hello" then "1" - If {Condition} = "1" then "Hello 1"
Regards,
Enrique.
Re: Function in a column using value from other function
Posted: Tue Aug 02, 2016 5:45 pm
by Alex K.
Hello,
Please check the excel file, second and third columns are empty.
Also, please try to add the additional Calculated column in which set necessary condition and then use it in the report.
Thank you.
Re: Function in a column using value from other function
Posted: Wed Aug 03, 2016 6:53 am
by Enrique
Hello.
Seems that I haven't been clear. The Excel is correct, it's only a sample. In the report we have used the first column ("Name"). In the second column we have used a function:
If "Name" = "Hello" then the "Value" of the column is 1, otherwise the "Value" is 0. This function is working properly.
In other column we want to put another function to evaluate the result of the first function: If "Value" is 1 ...., otherwise ....
We don't find the way to reference the result of the first function in other one, that is the question. If its possible, can you provide us a sample?.
Thank you.
Re: Function in a column using value from other function
Posted: Wed Aug 03, 2016 7:06 pm
by Alex K.
Hello,
> In other column we want to put another function to evaluate the result of the first function: If "Value" is 1 ...., otherwise ...
Could you explain your issue in more details? Which another function do you mean?
Thank you.
Re: Function in a column using value from other function
Posted: Thu Aug 04, 2016 6:15 am
by Enrique
Hello.
Yes, in the first column we have a field from the Excel datasource:
{Hoja1.Name}
In the second column we have a function to evaluate the field:
{Switch(Hoja1.Name == "Hello", 1)}{Switch(Hoja1.Name != "Hello", 0)} (If Name = "Hello" the column value will be 1, otherwise will be 0
In the third we want to evaluate the resulting value of the second. Somethinjg like this:
{Switch("Column2" == "1", "True")}
but we don't find the way to reference the second column
It's now clear?. Thank you.
Re: Function in a column using value from other function
Posted: Thu Aug 04, 2016 9:33 am
by HighAley
Hello.
It's not so easy to get data from text components. There are component on report template and on rendered report. Usually there are many instances of one component on the rendered report.
It's better to use the same expression. Or use variables to save data there.
Thank you.