all groups > sql server reporting services > december 2004 >
You're in the

sql server reporting services

group:

guids as query parameters


guids as query parameters andreaandjohn NO[at]SPAM hotmail.com
12/14/2004 9:37:01 PM
sql server reporting services:
Re-Post


Can somebody advise me if there is a known 'issue' with RS in that it
is best not to try and build parameters that are to be used as Guids?

I am getting:
"Default value or value provided for the report parameter 'year' is
not a valid value"


TIA


My rdl snippet:
<Query>


<DataSourceName>TRAN</DataSourceName>
<CommandText>SELECT cToP, interP, plu, med, fun, other, hosp,
statusShortDesc, yearShortDesc, locShortDesc, locTypeShortDesc,
yearID, statusID FROM dbo.viewAnnualSummary WHERE (yearID = @year) AND

(statusID = @status)</CommandText>
<QueryParameters>

<QueryParameter Name="@year">
<Value>=Parameters!year.Value</Value>
</QueryParameter>

<QueryParameter Name="@status">
<Value>=Parameters!status.Value</Value>
</QueryParameter>
</QueryParameters>
</Query>

my code snippet in client:
Dim parameters(1) As ConsumeReportService.ReportService.ParameterValue

parameters(0) = New ConsumeReportService.ReportService.ParameterValue
parameters(0).Name = "yearID"
parameters(0).Value = ddlYear.SelectedValue


parameters(1) = New ConsumeReportService.ReportService.ParameterValue
parameters(1).Name = "statusID"
parameters(1).Value = ddlStatus.SelectedValue


A bit of example SQL:
SELECT cToP, interP, plu, med, fun, other, hosp, statusShortDesc,
yearShortDesc, locShortDesc, locTypeShortDesc, yearID, statusID
FROM dbo.viewAnnualSummary
WHERE statusID = 'AADBC831-8585-4FDC-ABF7-E856E51EA789'
AND yearID = 'C72FCAE6-6202-4731-99BB-619AF62E382C'


Reply
Details: Show quoted text | View source | Unwrap Lines | Forward
Re: guids as query parameters Jeff A. Stucker
12/17/2004 10:35:00 AM
How is the GUID stored in the database? With or without the hyphens? It
might be that you need to present the GUID without any hyphens.

--
Cheers,

'(' Jeff A. Stucker
\

Business Intelligence
www.criadvantage.com
--------------------------------------
[quoted text, click to view]

AddThis Social Bookmark Button