Jump to content
We've recently updated our Privacy Statement, available here ×

Passing parameters to conditional style


alexal

Recommended Posts

 Hello everyone!

 

I have created a conditional style to use in a crosstab. In this crosstab I have service level data (in %). 

Conditions look something like this: $V{SERVICE_LEVELMeasure}>=0.8

When service level is more then 80% the cell appears blue, else - yellow. It works OK.

Now I want to make 0.8 a parameter so I can vary the point of color change.So I created a double parameter in main report with default value 0.8 and printed $V{SERVICE_LEVELMeasure}>=$P{SLevel}

But I get the following error:

net.sf.jasperreports.engine.design.JRValidationException: Report design not valid : 
     1. Parameter not found : SLevel
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.verifyDesign(JRAbstractCompiler.java:258)
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:140)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:131)
    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:514)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

 

I also tried to create a crosstab parameter with the same name and $P{SLevel} value, but it changed nothing.

Can you give me an advice how to handle it?

Thanks in advamce!

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...