Custom report question!

Hello i have this custom report made

[Consumtion Materials:3, 3, 3, 3, 3]
>Name|U/M|Qty|Price|Total Price
{REPORT CONSUMPTION DETAILS:C.Name,C.Unit,C.Consumption, ([C.Cost]*[C.Consumption])}

I want to exclude products where C.COnsumtion value = 0 … How can i do that ?

Did you tried this?

{REPORT CONSUMPTION DETAILS:C.Name,C.Unit,C.Consumption, ([C.Cost]*[C.Consumption]):C.Consumption != 0}

Yep I tried but didn’t worked … Is there any other solution for doing that ?

Can you explain how it didn’t worked? Does report still displaying items with 0 consumption?

No … if i use !=0 it doesnt show me anything (no table)… . if i use it like this

{REPORT CONSUMPTION DETAILS:C.Name,C.Unit,C.Consumption,([C.Cost]*[C.Consumption])!=0}

it shows me the same values but instead of numeric value it will show me true or false …

i tried what emre sugested but as i told in my reply no table is appearing …

first screen shot is with what emre sugested and as you can see no table is appearing

Can you paste the actual code from the first screen instead of a cut off screenshot?

[Materiale Consumate:3, 3, 3, 3, 3]

>Denumire Prod.|U/M|Cantitate|Pret Unitar|Valoare Totala

{REPORT CONSUMPTION DETAILS:C.Name,C.Unit,C.Consumption, ([C.Cost]*[C.Consumption]):C.Consumption != 0}

if i use this code no table is appearing if i use it without :C.Consumption != 0 … it will appear all the values but i want to see only the values that are different than 0

It appears that is broken atm. @emre will probably need to look at that specific tag. Those expressions work on other tags but that one they dont. Until he fixes it you would need to use SQL to generate this report.

Ok thanks again … i am looking for this to be fixed … i will use sql :frowning: till then

You can use sql script and call that script in the report.

i know thanks … i thought it will be more simple :slight_smile:

It is and Emre will probably fix it fast. I prefer report tags myself.

I think there is an issue with abbreviating. Can you try changing expression as…

:ConsumptionItem.Consumption != 0

1 Like

Thanks a lot emre … it is working now !

1 Like

fyi. C.Consumption will also work fine on next update.

1 Like

i got another problem emre … and i dont know what is causing this
i have this report

[Raport Productie:5, 3, 3, 3, 3, 3, 3]

>Denumire Prod.|Cant.|Pret in|Pret out|Pret in TOT|Pret out TOT|Rata 

{REPORT COST DETAILS:[C.Name],C.Quantity.Sum,[([C.Cost]*[C.Quantity]).Sum]/[C.Quantity.Sum],[([C.AvgPrice]*[C.Quantity]).Sum]/[C.Quantity.Sum],[([C.Cost]*[C.Quantity]).Sum],[([C.AvgPrice]*[C.Quantity]).Sum],[($6-$5)/$5];%##.00;-%##.00;-:CostItem.Cost!=0}

>Total|{REPORT COST DETAILS:C.Quantity.Sum}| | |{REPORT COST DETAILS:[([C.Cost]*[C.Quantity]).Sum],[([C.AvgPrice]*[C.Quantity]).Sum],[($2-$1)/$1];%##.00}

and the output of the code is the following

The total quantity is not displaying correctly …
is this also an error ? or i am doing something wrong ?

Shouldn’t totals also include Cost != 0 expression?

Oh yes … thanks it’s working now ! You are the best !
Here is the corected report maybe someone else want to use it :smile:

[Raport Productie:5, 3, 3, 3, 3, 3, 3]

>Denumire Prod.|Cant.|Pret in|Pret out|Pret in TOT|Pret out TOT|Rata 

{REPORT COST DETAILS:[C.Name],C.Quantity.Sum,[([C.Cost]*[C.Quantity]).Sum]/[C.Quantity.Sum],[([C.AvgPrice]*[C.Quantity]).Sum]/[C.Quantity.Sum],[([C.Cost]*[C.Quantity]).Sum],[([C.AvgPrice]*[C.Quantity]).Sum],[($6-$5)/$5];%##.00;-%##.00;-:CostItem.Cost!=0}

>Total|{REPORT COST DETAILS:C.Quantity.Sum:C.Cost != 0}| | |{REPORT COST DETAILS:[([C.Cost]*[C.Quantity]).Sum],[([C.AvgPrice]*[C.Quantity]).Sum],[($2-$1)/$1];%##.00:C.Cost != 0}
1 Like

Hey there, could you possible give the English translation for this?

"Denumire Prod.| Cant.| Pret in |Pret out| Pret in TOT| Pret out TOT |Rata "

1 Like