on 09-15-2016 1:40 PM
Pessoal bom dia.
Criei um relatório no crystal e queria permitir que o usuario selecione os dados no filtro ou não, ou seja que o filtro na seja obrigatório para fazer isso fiz a seguinte formula:
com obrigatoriedade:
{?Vendedor} = {Comando.SlpName} and
{?Cidade} = {Comando.CityS} and
({?Dataate}>= {Comando.DocDate} and
{?Datade}<= {Comando.DocDate})
sem obrigatoriedade:
(not(hasvalue({?Vendedor})) = {Comando.SlpName}) and
(not(hasvalue({?Cidade})) = {Comando.CityS}) and
(not(hasvalue(({?Dataate}))>= {Comando.DocDate}) and
(not(hasvalue({?Datade}))<= {Comando.DocDate})
Porem o crystal diz que faltam "()" parenteses.
Como posso resolver isso?
Bom dia,
Hasvalue é uma função, ela retorna verdadeiro ou falso, pra você usar ela deve fazer dois testes distintos (quebrei as linhas só pra ver melhor).
(
(not(hasvalue({?Vendedor}))) or
{?Vendedor} = {Comando.SlpName}
) and ...
Veja esse post que tem outro exemplo de filtro
Também esse, tem o guia completo SAP Crystal Reports 2013 – SAP Help Portal Page
[]'s
Fabio
SAP 9.1 PL11
Crystal Reports 2013 SP7 (runtime 13.0.10.1385)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.