Jump to content

Recommended Posts

Posted

I am trying to show the Parameter selected value in the Header of a report. Everything works fine for when a value is selected, however I want to show the value as All if nothing is selected (aka _FOC_NULL).

I have tried different variations and continue to get the error noted below.

Can this be done If not, is there another idea of how to accomplish the same thing

Below shows what I have coded for a Define field to include in the Header.

 

It looks like it passes as I expect:

 

Error received:

 

Thanks,

Kristi Carter

Posted
If all youre trying to do is show this value in the Header, use a -SET to evaluate it in front of the report/chart rather than in a DEFINE - the DEFINE will be calculated for every row returned from your DB query and that will be rather inefficient vs a 1 time evaluation before the report query is run
Posted

Hi Kristi

Looks like @nycbabak and @pawan.vuppala have you pointed in the right direction to fix the problem.

I thought it might help to talk for a second about WHY that error is occurring. In other words, WHAT is WebFOCUS thinking that makes it throw this error

When WF throws an error, try to think of what it is trying to say - in particular, read the message and pay attention to what follows the colon (:). In this case, it tells you FIELDNAME is not recognized: _FOC_NULL.

Apparently WebFOCUS thinks there needs to be an actual FIELDNAME (like one from a Master file or maybe DEFINE / COMPUTE) called _FOC_NULL. Its not understanding that you wanted _FOC_NULL to be treated as a literal.

Thats why Babak brought up the single quotes so it would read _FOC_NULL as a string instead of field name.

The reason for setting the MISSING ON is to make sure the empty value gets filled in with your _FOC_NULL instead of just laying there as either a blank or a zero if its a number.

Just throwing in my 2 cents.

Later!

Toby

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