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

GUID in parameter values editor

6 Answers 283 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 29 Nov 2012, 10:54 PM
How can I enter a GUID in the parameter values editor? I've tried
{F1F613B9-1D64-40E9-B437-A837F0B1BC6D}
'F1F613B9-1D64-40E9-B437-A837F0B1BC6D'
"F1F613B9-1D64-40E9-B437-A837F0B1BC6D"
'{F1F613B9-1D64-40E9-B437-A837F0B1BC6D}'
"{F1F613B9-1D64-40E9-B437-A837F0B1BC6D}"

6 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 30 Nov 2012, 09:37 AM
Hello Joe,

Check the How to use a Guid as value for report parameter or data source parameter KB article for more information.

Regards,
Steve
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Joe
Top achievements
Rank 1
answered on 30 Nov 2012, 02:46 PM
How do you enter a GUID in the editor? That is the question.
0
Steve
Telerik team
answered on 30 Nov 2012, 02:57 PM
Hi Joe,

It should be entered as is directly in the expression editor for the Value like this: F1F613B9-1D64-40E9-B437-A837F0B1BC6D. As noted in the Expressions as Values of Item Properties help article:

To specify that the value of a property is an expression, the value should be a string starting with equal (=) sign. If the equal sign is not present the value will be interpreted as a string literal.

All the best,
Steve
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Paul
Top achievements
Rank 1
answered on 29 Jan 2013, 01:48 PM
Hi,

I'm having the same issue, I've tried implementing the KB article's ConcertToGuid example,  but if I try and put in a design time parameter of :

=ConvertToGuid("14986A65-951D-40D4-964A-99EE3EFF4CD9")

Then I get an "Object Reference not set to an instance of an object." error when I try and execute the query.

I've put in the Built-in/User Functions.

Cheers.
0
Hadib Ahmabi
Top achievements
Rank 1
answered on 01 Feb 2013, 09:21 AM
I think you had it the other way around.
The parameter should be of type string. This expression =ConvertToGuid("14986A65-951D-40D4-964A-99EE3EFF4CD9")
will return guid and not string.
So, the report parameter value should be just 14986A65-951D-40D4-964A-99EE3EFF4CD9
and the sqlDataSource parameter value should be = ConvertToGuid(Parameters.Parameter1.Value) 
0
Paul
Top achievements
Rank 1
answered on 07 Feb 2013, 02:30 PM
Thanks for your help, but I did have it the correct way round, which is actually the same as the way you suggested.

I was referring specifically to the "Design Time" parameter.  There is an issue here that User Functions are not called, which Telerik Support has acknowledged.

A work around, is instead of selecting a stored procedure from the list, you pretend it's a select statement using the following format:

exec storedProcedureName  @GuidParamater = '1ac63fc4-2b63-4d49-ad05-9ccab0087baf'


This will let you execute the query in the designer so you can then design the report.  Once you're finished designing the report, you can select the stored procedure in the drop down list instead.
Tags
General Discussions
Asked by
Joe
Top achievements
Rank 1
Answers by
Steve
Telerik team
Joe
Top achievements
Rank 1
Paul
Top achievements
Rank 1
Hadib Ahmabi
Top achievements
Rank 1
Share this question
or