This is a migrated thread and some comments may be shown as answers.

Type mismatch in function arguments. Cannot find an overload of the function Join() that accepts arguments of type (String, String).

5 Answers 238 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
vamshi
Top achievements
Rank 1
vamshi asked on 09 Jun 2017, 12:20 PM

Type mismatch in function arguments. Cannot find an overload of the function Join() that accepts arguments of type (String, String).

 

Maximillian
Top achievements
Rank 1
commented on 06 Sep 2021, 03:00 AM | edited

So is there no way to pass multiple string fields to this function to concatenate them?  It's really frustrating that you "answered" this by referring us back to a page of documentation that is far from useful in this case, having literally a single brief sentence explaining how this is used. 

I really hope Progress starts getting better at their documentation.  I truly can't understand how on Earth we are expected to pay $2,500 per developer for a product while we're left to waste all kinds of time trying to figure out how your tools work, due to your inadequate documentation.  This is an example of what helpful string.join documentation looks like.  We need to understand the various ways this can be used, and some simple examples in the documentation would've been incredibly helpful, and would've literally taken a couple of minutes to add.  Meanwhile, I just wasted 20 minutes trying to figure out what should be a simple function, and I still don't have a clear answer.

Todor
Telerik team
commented on 08 Sep 2021, 11:07 AM

Hi Maximillian,

Let me start with the technical issue. Note that you have to pass the strings in an array - see the attached screenshot JoinTextFunction.PNG. If you would prefer to pass the strings directly, you may do this through the Array Utility function. Here is a sample Expression:

= Join(',', Array("item1", "item2","other"))

Thank you for your feedback regarding our Documentation. I agree that there is a lot to be improved and I assure you that we are constantly working in this direction.

We will update all user functions articles to include information about the arguments, returned types, and examples. We recognize that currently, the information in the different articles is not consistent and not full.

Regards,

Todor

Progress Telerik

5 Answers, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 09 Jun 2017, 12:34 PM
Hello vamshi,

You need to pass an array with elements that you want to concatenate as the second parameter of Join() function. Currently, you are passing a string value.

For more details, check Text Functions.

Regards,
Katia
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
vamshi
Top achievements
Rank 1
answered on 09 Jun 2017, 01:10 PM

Hello Katia,
Thank you for response, could you please see the below code and please try to give solution. 

 

var results = new List<RenderingResult>();

foreach (var p in parameters)
                {
                    using (var report = PrepareReport(telerikReportContent, p))
                    {
                        var reportProcessor = new ReportProcessor();
                        var reportSource = new InstanceReportSource { ReportDocument = report };
                        results.Add(reportProcessor.RenderReport(format, reportSource, p));
                    }
                }

 

we will get invoiceids array(int array) as one of the parameter(values will be there in image1 ) in report , but wont assigning to the stored procedure parameter (i.e  invoiceids). expecting value has to assign to stored procedure result 

on the other hand I have assigned the invoiceids separated with "," (shown in image2) giving the error message of this thread title 

I have to assign the invoiceids value to stored procedure parameter

0
Accepted
Katia
Telerik team
answered on 09 Jun 2017, 03:26 PM
Hi vamshi,

Unfortunately, the provided code is not sufficient in order to identify the cause of the issue.

You can compare the approach you use with the one provided in this KB article. It elaborates on how to use a multivalue report parameter in SQL query.


Regards,
Katia
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
vamshi
Top achievements
Rank 1
answered on 09 Jun 2017, 03:52 PM
Hi Katia,
I'm very much thank full to your response...

like @stringToSplit  parameter in splitstring procedure  in "KB article"
I'm having Invoiceids parameter in my stored procedure, I'm assiging value to it in the form of int array but procedure taking it is Null 
(you can see the value present in procedure parameters in image1)
Could you please see once.
0
Katia
Telerik team
answered on 12 Jun 2017, 12:40 PM
Hello vamshi,

It might be that the value of data source parameter is not set to the corresponding report parameter. This needs to be done on step 4 of SqlDataSource Wizard.

On this step, you can join the selected values of the multivalue report parameter into a single string by using Join() built-in function:
= IIf(Parameters.SelectedValues.Value Is Null,
       Null,
       Join(',',Parameters.SelectedValues.Value))


Regards,
Katia
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
vamshi
Top achievements
Rank 1
Answers by
Katia
Telerik team
vamshi
Top achievements
Rank 1
Share this question
or