If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Using ISNULL or IS EMPTY into a HTML Item

Started by Francus81, 01 Oct 2018 12:16:11 PM

Previous topic - Next topic

Francus81

Hi, I created a report which contains two parameters(pGrupoAgente and pAgente)

I created a HTML item(report expression type) that displays the chosen values for both parameters where pGrupoAgente is required and pAgente is optional:

ParamDisplayValue('pGrupoAgente') + "/" +  ParamDisplayValue('pAgente')

When both parameters are chosen, the HTML Item shows correctly both values; but when only "GrupoAgente" is chosen, the HMTL Item doesn't show anything.

I want to use some function such as ISNULL or ISEMPTY over ParamDisplayValue('pAgente') in order to show the value of pGrupoAgente when Agent is not chosen.

Any suggestions?

Regards




cognostechie

so you are asking a question and saying that you already know the answer ?

Francus81

Hi cognostechie,

My question is if it's possible to apply a function similar to the SQL function ISNULL into a HTML item?

Regards

cognostechie

Create a Layout Calculation and insert something like this:

Case

  When ParamDisplayValue('pGrupoAgente') is null and ParamDisplayValue('pAgente') is not null
   Then ParamDisplayValue('pAgente')

  When ParamDisplayValue('pGrupoAgente') is not null and ParamDisplayValue('pAgente') is null
    Then ParamDisplayValue('pGrupoAgente')

  When ParamDisplayValue('pGrupoAgente') is null and ParamDisplayValue('pAgente') is null
    Then ''

  When ParamDisplayValue('pGrupoAgente') is not null and ParamDisplayValue('pAgente') is not null
     Then ParamDisplayValue('pGrupoAgente')  + '/' + ParamDisplayValue('pAgente')

Else ''

End

Francus81