Jump to content
Changes to the Jaspersoft community edition download ×

formula error with <> symbols


catador

Recommended Posts

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 attribut

e "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

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

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

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 ROWS
from [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: nu
ll
[Ljava.lang.StackTraceElement;@1e926fd
17:52:09,631 ERROR OlapConnectionServiceImpl,http-8080-2:190 - java.lang.NullPointerException
java.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.ge
tMondrianConnection(OlapConnectionServiceImpl.java:230)
at com.jaspersoft.jasperserver.api.metadata.olap.service.impl.OlapConnectionServiceImpl.va
lidateMDX(OlapConnectionServiceImpl.java:176)
at com.jaspersoft.jasperserver.api.metadata.olap.service.impl.OlapConnectionServiceImpl.va
lidate(OlapConnectionServiceImpl.java:165)
at com.jaspersoft.jasperserver.war.validation.OlapUnitValidator.validateMdxQuery(OlapUnitV
alidator.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.jav
a:231)

 

thanks for your help because i'm stuck...

 

bye

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...