How do you join all values in a field?

1 Answer 94 Views
Report Designer - Web
Pascal
Top achievements
Rank 1
Iron
Iron
Pascal asked on 08 Sep 2023, 08:54 PM

I have a data source that has geo-coordinates in each record. 

I want to make a request to an API to generate a map out of these geo-coordinates using their static map feature.

To do this I need to aggregate multiple fields in a record and then aggregate these values (from each record) together to form a URL that I can use to populate an image component.

 

I've been able to use the aggregated functions like sum and count but as soon as I try to use Join(", ", Fields.x) I get the error

An error has occurred while processing TextBox 'textBox53':Type mismatch in function arguments. Cannot find an overload of the function Join() that accepts arguments of type (String, Double).

If I use Join(", ", CSTR(Fields.x)) I get the error 

An error has occurred while processing TextBox 'textBox53':Type mismatch in function arguments. Cannot find an overload of the function Join() that accepts arguments of type (String, String).

But if I use Count(Fields.x)

I get the value 9 which is correct.

Why can I use some aggregated functions on a field but not others?

 

1 Answer, 1 is accepted

Sort by
1
Accepted
Momchil
Telerik team
answered on 13 Sep 2023, 11:37 AM

Hi Pascal,

The Aggregate Functions accept an expression as an argument and aggregate the results of this expression against the current data scope.

The Join function is a Text Function and it accepts an array as a second argument.

Considering the above, you should be able to use the AllValues Aggregate Function to combine your data into an array and pass it to the Join function. For example:

= Join(", ", AllValues(Fields.x))

I hope this answers your question.

Best Regards,
Momchil
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Tags
Report Designer - Web
Asked by
Pascal
Top achievements
Rank 1
Iron
Iron
Answers by
Momchil
Telerik team
Share this question
or