I could make two different queries fro the report:
include condition to virtual table
Code |
---|
SEL ECT ContabilidadTurnovers.ValorTurnover, ContabilidadTurnovers.CantidadTurnover, ContabilidadTurnovers.Empresa, ContabilidadTurnovers.ExtDimension1 FR OM AccountingRegister.Contabilidad.Turnovers(, , , Account = &SlaesAccount, , Empresa = &Empresa, , ) AS ContabilidadTurnovers |
or just use a filter in data composition schema for filtering Empresa.
The first option should work faster, but it have a problem if the Empresa parameter is not defined - the query ended with an error. The second one is more versatile and give us more options. Are there any optimizations which make use of second method as effective as the first one. And how is recommendable?