Function in a column using value from other function
Function in a column using value from other function
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.
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
Hello,
Could you explain your task in more details? If possible, please send us a test data for analysis.
Thank you.
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
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.
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.
- Attachments
-
- ReportEjemplo.mrt
- Sample report
- (11.18 KiB) Downloaded 280 times
-
- Libro1.xlsx
- Sample datasource
- (8.64 KiB) Downloaded 229 times
Re: Function in a column using value from other function
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.
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
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.
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
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.
> 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
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.
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
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.
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.