Showing posts with label expression. Show all posts
Showing posts with label expression. Show all posts

Friday, March 23, 2012

Reporting services parameter([rsFieldReference] The Value expression for the...)

@.StartDate is a report parameter and CustomerNo is the field I want to render on the report,I want to combine the sql ,but it display the error message below when I preview the report.If I query in the design form and input the value of the parameter ,it run correctly .

Data sql:

declare @.sql nvarchar(4000)
declare @.sqlWhere nvarchar(4000)

set @.sql='select CustomerNo from table1 '
set @.sqlWhere=''

if @.StartDate<>''
begin
set @.sqlWhere =@.sqlWhere + ' StartDate=''' +@.StartDate + ''''
end

if ltrim(rtrim(@.sqlWhere))<>''
begin
set @.sqlWhere =' where ' + @.sqlWhere
end
set @.sql=@.sql+@.sqlWhere

exec sp_executeSQL @.sql

Error message:

[rsFieldReference] The Value expression for the textbox ‘CustomerNo’ refers to the field ‘CustomerNo’. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.

I'm a beginner .Help me.

|||

Please give me a answer.

|||

I wrote a procedure and the problem is resolved.

Wednesday, March 7, 2012

Reporting Services Expression syntax - please

Can anybody point me to some book or site with Reporting Services
expression syntax reference or set of examples. I was able to find
only few.
Need it asap.
Please. Please. Please.
JuliaA couple I like are:
http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=Yf7CSmq9LR&isbn=0072232161&itm=3
Microsoft SQL Server 2000 Reporting Services - Chapters 7 & 8
Brian Larson, Nancy Maragioglio (Editor)
http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=Yf7CSmq9LR&isbn=1932394222&itm=8
Microsoft Reporting Services in Action - Chapter 5
Teo Lachev
Also, searching this alias for keywords like iif, .Value, expression can
turn up some amazing nuggets of informtion.
--
-- "This posting is provided 'AS IS' with no warranties, and confers no
rights."
jhmiller@.online.microsoft.com
"Julia" <esadov@.yahoo.com> wrote in message
news:d7f1a78b.0410280819.6a414203@.posting.google.com...
> Can anybody point me to some book or site with Reporting Services
> expression syntax reference or set of examples. I was able to find
> only few.
> Need it asap.
> Please. Please. Please.
> Julia

Reporting Services Expression

I am also having trouble with the expressions in reporting services visual studios business intelligent suite. I am tring to format a date as just the mm/dd/yyyy without the time.there are several built-in date/time functions that should help you
format(<date>, "MM/dd/yyyy")

the uppercase M is important, otherwise u will get minutes