Sunday, February 19, 2012

error in as with rs samples

hi,
I'm using the sample RS code for my cube. I just copied
from the sample code and replaced the cube name with my
cube name ...its working fine with the code given by them
and for microsoft's reports. but when i run my reports its
giving an error msg like ... The expression for the
query 'Selection' contains an error: [BC30648] String
constants must end with a double quote.
here selection is my dataset name... i'm running this thru
report designer in vs.net... could any one tell me wht's
my wrong ...
=IIF(Parameters!pParamIn.Value="", "WITH MEMBER
MEASURES.DIMNAME AS 'NULL' MEMBER MEASURES.UNAME AS 'NULL'
MEMBER MEASURES.PUNAME AS 'NULL' MEMBER MEASURES.LABEL
AS 'NULL' MEMBER MEASURES.SYMBOL AS 'NULL' SELECT
{MEASURES.DIMNAME, MEASURES.UNAME, MEASURES.LABEL,
MEASURES.SYMBOL, MEASURES.PUNAME} ON 0 FROM [Purchase
Order]", "WITH MEMBER MEASURES.DIMNAME AS '" & Parameters!
pMember.Value & ".DIMENSION.NAME' MEMBER MEASURES.UNAME
AS '" & Parameters!pMember.Value
& ".DIMENSION.CURRENTMEMBER.UNIQUENAME' MEMBER
MEASURES.PUNAME AS '" & Parameters!pMember.Value
& ".DIMENSION.CURRENTMEMBER.PARENT.UNIQUENAME' MEMBER
MEASURES.SYMBOL AS 'IIF(" & Parameters!pMember.Value
& ".DIMENSION.CURRENTMEMBER IS " & Parameters!
pMember.Value & ", 1, IIF(COUNT(INTERSECT({" & Parameters!
pMember.Value & ".DIMENSION.CURRENTMEMBER}, {" &
Parameters!pMember.Value & ".SIBLINGS}))=1, 2, 3))' MEMBER
MEASURES.LABEL AS '" & Parameters!pMember.Value
& ".DIMENSION.CURRENTMEMBER.NAME' SELECT
{MEASURES.DIMNAME, MEASURES.UNAME, MEASURES.LABEL,
MEASURES.SYMBOL, MEASURES.PUNAME} ON 0, DRILLDOWNMEMBER({"
& Parameters!pMember.Value & ".SIBLINGS}, {" & Parameters!
pMember.Value & "}) ON 1 FROM [Purchase Order]")
Thanks in advance..You have a typo in the query around one of the IIFs: MEASURES.SYMBOL AS
'IIF(" & Parameters!pMember.Value
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"alex" <anonymous@.discussions.microsoft.com> wrote in message
news:520501c48089$bbaa46b0$a401280a@.phx.gbl...
> hi,
> I'm using the sample RS code for my cube. I just copied
> from the sample code and replaced the cube name with my
> cube name ...its working fine with the code given by them
> and for microsoft's reports. but when i run my reports its
> giving an error msg like ... The expression for the
> query 'Selection' contains an error: [BC30648] String
> constants must end with a double quote.
> here selection is my dataset name... i'm running this thru
> report designer in vs.net... could any one tell me wht's
> my wrong ...
>
>
> =IIF(Parameters!pParamIn.Value="", "WITH MEMBER
> MEASURES.DIMNAME AS 'NULL' MEMBER MEASURES.UNAME AS 'NULL'
> MEMBER MEASURES.PUNAME AS 'NULL' MEMBER MEASURES.LABEL
> AS 'NULL' MEMBER MEASURES.SYMBOL AS 'NULL' SELECT
> {MEASURES.DIMNAME, MEASURES.UNAME, MEASURES.LABEL,
> MEASURES.SYMBOL, MEASURES.PUNAME} ON 0 FROM [Purchase
> Order]", "WITH MEMBER MEASURES.DIMNAME AS '" & Parameters!
> pMember.Value & ".DIMENSION.NAME' MEMBER MEASURES.UNAME
> AS '" & Parameters!pMember.Value
> & ".DIMENSION.CURRENTMEMBER.UNIQUENAME' MEMBER
> MEASURES.PUNAME AS '" & Parameters!pMember.Value
> & ".DIMENSION.CURRENTMEMBER.PARENT.UNIQUENAME' MEMBER
> MEASURES.SYMBOL AS 'IIF(" & Parameters!pMember.Value
> & ".DIMENSION.CURRENTMEMBER IS " & Parameters!
> pMember.Value & ", 1, IIF(COUNT(INTERSECT({" & Parameters!
> pMember.Value & ".DIMENSION.CURRENTMEMBER}, {" &
> Parameters!pMember.Value & ".SIBLINGS}))=1, 2, 3))' MEMBER
> MEASURES.LABEL AS '" & Parameters!pMember.Value
> & ".DIMENSION.CURRENTMEMBER.NAME' SELECT
> {MEASURES.DIMNAME, MEASURES.UNAME, MEASURES.LABEL,
> MEASURES.SYMBOL, MEASURES.PUNAME} ON 0, DRILLDOWNMEMBER({"
> & Parameters!pMember.Value & ".SIBLINGS}, {" & Parameters!
> pMember.Value & "}) ON 1 FROM [Purchase Order]")
>
> Thanks in advance..
>

No comments:

Post a Comment