Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jas2005
Starting Member
11 Posts |
Posted - 2008-08-04 : 00:47:32
|
Dear All,I have follow an sample Scope statment in SQL2005 online help amended to fit my requirement but i getting below error message, why ?Error message:"Executing the query ...Multiple statements are not allowed.Execution complete"My Code:SCOPE([Customers].[Company].&[MK].MEMBERS, [Measures].[Credit Amount],* ); /* This expression sets the value of the Amount measure */ THIS = [Measures].[Credit Amount] * 1.1;END SCOPE;Cube name: ARMeasurement field : Credit AmountDimension Level: Customer.Company.Members.All.{ML,MK,ABC Co,Zxy Inc}Please advice.thanksregardsJas~j~A~s |
|
dexter.knudson
Constraint Violating Yak Guru
260 Posts |
Posted - 2008-08-04 : 02:36:05
|
Have you put these statements an expression of a report object, for example a text box expression? If so, that is your problem, you can only have one statement. If you want to use logic that requires multiple statements, you need to go to Report -> Report Properties -> Code & create a function & call this function from your expression by entering something like =code.YourFunction(param) |
 |
|
jas2005
Starting Member
11 Posts |
Posted - 2008-08-05 : 02:07:25
|
hiI execute the script in the MDX script windows in SSMS. And, not reporting invloved here. Cause later i will execute the script in my SSAS cube.thanks.~j~A~s |
 |
|
|
|
|