Hide column if is null or empty

Stimulsoft Reports.JS discussion
Post Reply
guilhermetti
Posts: 14
Joined: Tue Oct 11, 2022 4:56 pm

Hide column if is null or empty

Post by guilhermetti »

Hello,
All good? I need help to hide the 'Empresa' column in case the data is null or empty.
Image
Image

My data source is in JSON form!

Code: Select all

{
   "header": {              
	 "titulo": "Relatório de Identificação",
               "subtitulo": "Filtrado pelo Nome (MARIA OLIVEIRA), pelo Documento (RG 12345678) e ordenado por Data/Hora Identificação",
               "periodo": "Periodo: 11/04/2021 08:00 - 11/04/2021 23:59",
	 "organizacao": "NEXCODE SYSTEMS",
               "contador": "Total de registros: 1000",
	 "logoAplicacao": "",
               "logoOrganizacao": "" 
            },
   "data": {
    "controleIdentificacao": {
      "totalCount": 29,
      "nodes": [
        {
          "identificacaoDataHora": "2023-01-24T10:17:39.343-03:00",
          "pessoaNome": "NEXTESTEPE04",
          "pessoaGrupo": "VISITANTE",
          "pessoaReparticao": "",
          "visitadoNome": "NEXTESTEPI11",
          "visitadoAreaNome": "AREA 01 - SETOR 01  "
        }
      ]
    }
  }
}
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide column if is null or empty

Post by Lech Kulikowski »

Hello,

You can hide that column by Enabled expression option and set for the Text components the DocStyle=Left.

Thank you.
guilhermetti
Posts: 14
Joined: Tue Oct 11, 2022 4:56 pm

Re: Hide column if is null or empty

Post by guilhermetti »

I really don't understand :? , could you show me an example?

Image
Attachments
Ex.mrt
(19.91 KiB) Downloaded 110 times
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide column if is null or empty

Post by Lech Kulikowski »

Hello,

The DockStyle=Left for all text components on the DataBand.

Thank you.
Attachments
Ex_v1.mrt
(22.45 KiB) Downloaded 107 times
guilhermetti
Posts: 14
Joined: Tue Oct 11, 2022 4:56 pm

Re: Hide column if is null or empty

Post by guilhermetti »

Thank you very much!
Have a good day
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide column if is null or empty

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply