catador Posted November 27, 2006 Share Posted November 27, 2006 Hello, when i write a formula like this: appear this error on logs.. 10:18:02,151 ERROR JSErrorPage_jsp,http-8080-1:128 -org.eigenbase.xom.XOMException: Document parse failed: [Fatal Error] :1:2029: The value of attribute "ifformula" associated with an element type "CalculatedMember" must not contain the '<' character. i can't do it a formula with "<" symbol? how can i do a formula with if it's distinct to zero?? Thanks for your help!! Catador Link to comment Share on other sites More sharing options...
swood Posted November 28, 2006 Share Posted November 28, 2006 Could you post the formula again in Code:code tags? ShermanJasperSoft Link to comment Share on other sites More sharing options...
catador Posted November 29, 2006 Author Share Posted November 29, 2006 this it's the formula: Code: <CalculatedMember name="VarCuLP" dimension="Measures" formatString="#,###.00" formula="Iif([Measures].[CuActual] <> 0, ([FechaDocumento].CurrentMember,[Measures].[CuActual])-([FechaDocumento].CurrentMember.PrevMember,[Measures].[CuActual]),null)"> <CalculatedMemberProperty name="SOLVE_ORDER" value="1"/> </CalculatedMember> Link to comment Share on other sites More sharing options...
swood Posted November 29, 2006 Share Posted November 29, 2006 Looks like something strange with the schema parser. If you define the member in your MDX by adding "with member VarCuLP..." does that work? ShermanJasperSoft Link to comment Share on other sites More sharing options...
catador Posted November 30, 2006 Author Share Posted November 30, 2006 Hi, This begins to be very hard. if i have a formula like this...Code: <CalculatedMember name="CuActual" dimension="Measures" formatString="Currency" ifformula="Iif(([Producto].CurrentMember,[Measures].[ValorTrx],[FechaDocumento].CurrentMember.PrevMember) = 0,null,([Producto].CurrentMember,[Measures].[ValorTrx])/([Producto].CurrentMember,[Measures].[Qty]))"/> with a mdx like this:Code:[code]with member [Measures].[VarCuLPer] as ' ([Producto].CurrentMember,[Measures].[VarCuLP])', FORMAT_STRING = IIf(([Measures].[VarCuLP] <= 100), IIf(([Measures].[VarCuLP] <= 0.0), "|#|style=green", "|#|style=yellow"«»), "|#|style=red"«»)select {[Measures].[Qty], [Measures].[CuActual], [Measures].[CuLP], [Measures].[VarCuLPer], [Measures].[VarCierreLY] } ON COLUMNS, {[Producto].[All Productos], [Producto].[All Productos].[FPC ], [Producto].[All Productos].[PBB ], [Producto].[All Productos].[Producto T], [Producto].[All Productos].[servicio ]} ON ROWSfrom [Existencias]where [FechaDocumento].[All FechaDocumentos].[2006].[10]i'm getting this error:Code:[code]17:52:09,629 WARN OlapConnectionServiceImpl,http-8080-2:188 - Validation Failed for Olap Unit: null[Ljava.lang.StackTraceElement;@1e926fd17:52:09,631 ERROR OlapConnectionServiceImpl,http-8080-2:190 - java.lang.NullPointerExceptionjava.lang.NullPointerException at mondrian.olap.Util.replace(Util.java:195) at mondrian.olap.Util.singleQuoteString(Util.java:751) at mondrian.rolap.RolapCube.preCalcMember(RolapCube.java:643) at mondrian.rolap.RolapCube.createCalcMembersAndNamedSets(RolapCube.java:488) at mondrian.rolap.RolapCube.init(RolapCube.java:398) at mondrian.rolap.RolapCube.<init>(RolapCube.java:236) at mondrian.rolap.RolapSchema.load(RolapSchema.java:309) at mondrian.rolap.RolapSchema.load(RolapSchema.java:229) at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:159) at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:49) at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:802) at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:636) at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:138) at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:73) at mondrian.olap.DriverManager.getConnection(DriverManager.java:120) at mondrian.olap.DriverManager.getConnection(DriverManager.java:87) at com.jaspersoft.jasperserver.api.metadata.olap.service.impl.OlapConnectionServiceImpl.getMondrianConnection(OlapConnectionServiceImpl.java:230) at com.jaspersoft.jasperserver.api.metadata.olap.service.impl.OlapConnectionServiceImpl.validateMDX(OlapConnectionServiceImpl.java:176) at com.jaspersoft.jasperserver.api.metadata.olap.service.impl.OlapConnectionServiceImpl.validate(OlapConnectionServiceImpl.java:165) at com.jaspersoft.jasperserver.war.validation.OlapUnitValidator.validateMdxQuery(OlapUnitValidator.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.webflow.util.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:231) thanks for your help because i'm stuck... bye Link to comment Share on other sites More sharing options...
swood Posted December 6, 2006 Share Posted December 6, 2006 Try "NULL" rather than "null". ShermanJasperSoft Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now