Parameters & UniqueIdentifiers
Posted: Wed Jun 18, 2008 9:24 am
Hi,
I have created a Parameter in my report which is a GUID called @ProjId
if I try to pass a value into it, I get a variety of errors as follows
If I pass in the GUID in any of these formats
f2ae04b3-ef47-4030-b897-4b005a523e7f
'f2ae04b3-ef47-4030-b897-4b005a523e7f'
{f2ae04b3-ef47-4030-b897-4b005a523e7f}
I get 'Input string was not in the correct format' followed by 'Failed to convert a parameter value from string to a guid.'
However if I embed the value into the report query directly inside single quotes, i.e;
WHERE ProjectId = 'f2ae04b3-ef47-4030-b897-4b005a523e7f'
The report executes as expected. SO my question is, how do I pass a GUID into a parameter?
Thanks,
Jon.
I have created a Parameter in my report which is a GUID called @ProjId
if I try to pass a value into it, I get a variety of errors as follows
If I pass in the GUID in any of these formats
f2ae04b3-ef47-4030-b897-4b005a523e7f
'f2ae04b3-ef47-4030-b897-4b005a523e7f'
{f2ae04b3-ef47-4030-b897-4b005a523e7f}
I get 'Input string was not in the correct format' followed by 'Failed to convert a parameter value from string to a guid.'
However if I embed the value into the report query directly inside single quotes, i.e;
WHERE ProjectId = 'f2ae04b3-ef47-4030-b897-4b005a523e7f'
The report executes as expected. SO my question is, how do I pass a GUID into a parameter?
Thanks,
Jon.