Help with basics in REPORTS

This will most likely be an easy question, its me that don’t know it. So please help me learn more.

I am learning how to work with REPORTS and right now I am having a hard time understanding some parts like:

  • How do you specify a report to show you results split by something
  • For example I’ve seen it split by user, payment type, group

I’ve noticed the use of “@” and I THINK its to specify a sorting?
I’ve also seen “>” and “>>” what does that do?

As a practical example right now I am trying to do a report for inventory sorted into two warehouses, so I want a warehouse name and then the list… So far I havent figured it out.

[Consumo:2,2, 1, 1, 1]
@{REPORT CONSUMPTION DETAILS:C.Warehouse}
Armazem|Item|Entrada|Saida|Resto
{REPORT CONSUMPTION DETAILS:C.Warehouse,C.Name,C.Added.desc,C.Consumption,C.InStock}

That’s what I’ve been doing, obviously the "@ is wrong as I have no idea what I am doing.

Thanks in advance

I see here that “@” is a parameter list which is later used by “$1” or “$2” … I see. Is that right?

Hmmm … Okay I am getting it. Now how would I go about sorting it? Only show items from One warehouse?

1 Like

Yes, but you should also specify format for list with comma, like:

@{REPORT CONSUMPTION DETAILS:C.Warehouse.asc::{0}:,}

That ^ will list Warehouse names that feed into $1 for the next part:

{REPORT CONSUMPTION DETAILS:C.Warehouse,C.Name,C.Added.desc,C.Consumption,C.InStock:(PCW=$1)}

The (PCW=$1) part means “Periodic Consumption Warehouse”.


The >> and > are to indicate a “header style”, with the first being inverse-bold, and the second being regular-bold. But the first line in a Report is always reverse-bold, no matter what.


This should work for you (I removed the C.Warehouse field because it is redundant) …

[Consumo:2, 1, 1, 1]
@{REPORT CONSUMPTION DETAILS:C.Warehouse.asc::{0}:,}
>>Item|Entrada|Saida|Resto
>>$1
{REPORT CONSUMPTION DETAILS:C.Name,C.Added.desc,C.Consumption,C.InStock:(PCW=$1)}

The parts marked by the red arrows are the Warehouse names …

So, where did you get that from? And what exactly it does?

That would be, ascending order and select from column :{0}:?

I got it from another Topic when I searched for Consumption Warehouse.

… later in the Topic Emre mentions the PCW filter. According to that ^ you could use instead something like one of these constraints:

C.Warehouse=="$1" // get var from list
C.Warehouse=="Local Warehouse" // specific warehouse
... or ...
(PCW=$1) // get var from list
(PCW=Local Warehouse) // specific warehouse

The $1 is supplied by the previous list, in this case, a list of Warehouses. For each Warehouse, the second Report Tag runs. The $1 changes for each iteration of the list.


Correct. When we want to specify output delimiter (comma) we must specify the columns from the field-list, starting at 0. So it lists Warehouse names Alphabetically, with a comma separator. Each item in the list is fed to the next Report Tag in the $1 variable, and that next Report runs multiple times - once for each item in the list.

1 Like

Okay, next question.

  [Consumo:3, 2, 1]
    @{REPORT CONSUMPTION DETAILS:C.Warehouse.asc::{0}:,}
    >>Item|Entrada|Unit
    >>$1
    {REPORT CONSUMPTION DETAILS:C.Name,C.Unit,C.Inventory:C.Added>0 and (PCW=$1)}

This works … but this does NOT:

{REPORT CONSUMPTION DETAILS:C.Name,C.Inventory:C.Added>0 and (PCW=$1),C.Unit}

Why? All I wanted is for the unit to appear after the added inventory.

Because C.Unit is in the wrong place in the filter/constraints part. It should go in the field selectors part.

[Consumo:3, 2, 1]
@{REPORT CONSUMPTION DETAILS:C.Warehouse.asc::{0}:,}
>>Item|Entrada|Unit
>>$1
{REPORT CONSUMPTION DETAILS:C.Name,C.Inventory,C.Unit:C.Added>0 and (PCW=$1)}

:open_mouth: aha! So my error was actually thinking that “C.Inventory:C.Added>0” is important to be together, while whatever comes after the double dots is kind of a stand apart constraints. I probably didn’t use the right terms to explain my idea but I understood what you meant and how it works.

Thank you :smiley:

Right, it is like this:

{REPORT <NAME>:<fieldList>:<expressionsContraintsFilters>:<formatting>:<lineDelimiter>}

… so …

{REPORT CONSUMPTION DETAILS:field1,field2,field3,etc:(constraint=blah) and C.otherConstraint>0:{0}|{1}|{2}:,}
                   fieldlist^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^     ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^fields to display
                                bracketed constraints^^^^^^^^^^^^^^^^^     ^^^^^^^^^^^^^^^^^^^field Constraints
1 Like