Need some hep with a Report

Guys, I am not so good at complicated reporting with variables and $1, $2…

I have this report:

[Sales:1,3, 2, 2, 2]
>Tkt|Bairro|KMTS|Taxa|Taxa Extra
{REPORT TICKET DETAILS:T.TicketNumber,EN.Bairro,EC.Customers.Distance,EC.Bairros.Taxa,EC.Bairros.TaxaExtra:(TEN.Deliverer=Janilson MB)}
>SubTotal|||R$ {REPORT TICKET DETAILS:EC.Bairros.Taxa.Sum:(TEN.Deliverer=Janilson MB)}|R$ {REPORT TICKET DETAILS:EC.Bairros.TaxaExtra.Sum:(TEN.Deliverer=Janilson MB)}
>Total||||R$ [=F(TN('{REPORT TICKET DETAILS:EC.Bairros.Taxa.Sum:(TEN.Deliverer=Janilson MB)}')+TN('{REPORT TICKET DETAILS:EC.Bairros.TaxaExtra.Sum:(TEN.Deliverer=Janilson MB)}'),'0.00')]

I would like to automate it to report all the Deliverers in Deliverer Entity

Thos fancy reports with $1 that I did not learn yet to do…

Thanks in advance!!!

G.

Hey 'dog! - I am still a bit sleepy but here is a quick example:

@{REPORT TICKET DETAILS:T.DepartmentId,T.TotalAmount.sum::{0}:,}
>Dept: {REPORT SQL DETAILS:SELECT [Name] FROM Departments WHERE Departments.Id = $1:F.Name::{0}}
{REPORT TICKET TYPES:!PreOrder && TotalAmount >= 0 && DepartmentId = $1}

Use “@” line to create your list of parameters - so for you probably use a @{REPORT ENTITY … bla bla}
Then in the “>” line you reference your “$1” - first parameter.
The last line I have referenced it again.

The format at the end of the 1st line creates the output.
You can also just list $1 on the next line to see if the list was created.

1 Like

in this case I will not know how many deliveres i will have… so $1…$2 $3…

and what is that ::{0}:,?

Thanks!!!

G.

Do not work like that - Emre’s tricky thing is "$1 " should be “Jamie,Freddy,Bill,Alfredo,…” The report itself will see that “$1” contains a list and then replicate the report line for each “Name”.

1 Like

so the

@{REPORT ENTITY DETAILS:E.Name:(ET=Deliverers)(EN=$1)}

would be the list, correct?

and the report would be something like:

[Sales:1,3, 2, 2, 2]
@{REPORT ENTITY DETAILS:E.Name:(ET=Deliverers)(EN=$1)}
>Tkt|Bairro|KMTS|Taxa|Taxa Extra
{REPORT TICKET DETAILS:T.TicketNumber,EN.Bairro,EC.Customers.Distance,EC.Bairros.Taxa,EC.Bairros.TaxaExtra:(TEN.Deliverer=$1)}

and… of course… does not work, LOL!!!

1 Like

Drop the (EN=$1) as you want the full list and that is wrong syntax.
Try this.

@{REPORT ENTITY DETAILS:E.Name:(ET=Deliverers)::{0}:,}

To create a comma delimited INPUT list you need the full REPORT with “Formatting” command to create the list output.

You OK now?
I just tried this in my data:

@{REPORT ENTITY DETAILS:E.Name:(ET=Suppliers)::{0}:,}
>$1

I got a list list: Supplier1,Supplier2,Supplier3 - its a great way to check you are creating a list.

Ok, getting close…

note that i changed the >$1 position…

Get rid of the >$1 line as that was a test. Put the $1 back to where you had it.
I think you have it now…

where I had it? di not understand

G.

I thought that was correct above.
If its working I assume you still have it there as I cannot see the GIF end. You can use it in a header like:

@{REPORT ENTITY bl bla..
>Salesman Name: $1
{REPORT TICKET bla bla:TEN=$1}

yes its working great!!! thanks!!!

[Sales:1,3, 2, 2, 2]
@{REPORT ENTITY DETAILS:E.Name:(ET=Deliverers)::{0}:,}
>Tkt|Bairro|KMTS|Taxa|Taxa Extra
>$1:
{REPORT TICKET DETAILS:T.TicketNumber,EN.Bairro,EC.Customers.Distance,EC.Bairros.Taxa,EC.Bairros.TaxaExtra:(TEN.Deliverer=$1)}
SubTotal|||R$ {REPORT TICKET DETAILS:EC.Bairros.Taxa.Sum:(TEN.Deliverer=$1)}|R$ {REPORT TICKET DETAILS:EC.Bairros.TaxaExtra.Sum:(TEN.Deliverer=$1)}
>Total $1||||R$ [=F(TN('{REPORT TICKET DETAILS:EC.Bairros.Taxa.Sum:(TEN.Deliverer=$1)}')+TN('{REPORT TICKET DETAILS:EC.Bairros.TaxaExtra.Sum:(TEN.Deliverer=$1)}'),'0.00')]

the only thing missing here is trying to add some space between one deliverer and the next

Thanks!!

G.

umm that “|” after your total line should of done it? You may need to experiment with “|” plus space or open quote, close quote - it is anyones guess what Emre’s report parser will do :grinning:

what kind of drugs are you using??? LOL!!! I could not understand a single word in the last post… LOL!!!

sorry… bad joke…

G.

Every possible drug I can find! - just joking.
I have not slept very much over the last few weeks sorry about.

1 Like

LOL!!!
jajajajajajajajjajaja

I am still trying to understant your post, jajajajajajajjajajajajja

something with my "" and my |

G.

Yes to get a blank line in my reports I also added a pipe “|” which you have done - so I thought yours should of worked as well. I think because the very last line is a pipe “|” Emres report parser just omits it, so you could try using the pipe “|” before Deliverer Name…

a pipe did not the trick…

[Taxas:1,3, 2, 2, 2]
@{REPORT ENTITY DETAILS:E.Name:(ET=Deliverers)::{0}:,}
>Tkt|Bairro|KMTS|Taxa|Taxa Extra
>$1:
{REPORT TICKET DETAILS:T.TicketNumber,EN.Bairro,EC.Customers.Distance,EC.Bairros.Taxa,EC.Bairros.TaxaExtra:(TEN.Deliverer=$1)}
SubTotal|||R$ {REPORT TICKET DETAILS:EC.Bairros.Taxa.Sum:(TEN.Deliverer=$1)}|R$ {REPORT TICKET DETAILS:EC.Bairros.TaxaExtra.Sum:(TEN.Deliverer=$1)}
>Total $1||||R$ [=F(TN('{REPORT TICKET DETAILS:EC.Bairros.Taxa.Sum:(TEN.Deliverer=$1)}')+TN('{REPORT TICKET DETAILS:EC.Bairros.TaxaExtra.Sum:(TEN.Deliverer=$1)}'),'0.00')]
| 

or maybe I am using it wrong

Move the parameter to top line and use @1 for name of report heading.

mmmmmmmmmmmmmmmmmmmmm
did not understand… but will try

something like this:

[Taxas:1,3, 2, 2, 2]
@{REPORT ENTITY DETAILS:E.Name:(ET=Deliverers)::{0}:,}

$1
Tkt|Bairro|KMTS|Taxa|Taxa Extra
{REPORT TICKET DETAILS:T.TicketNumber,EN.Bairro,EC.Customers.Distance,EC.Bairros.Taxa,EC.Bairros.TaxaExtra:(TEN.Deliverer=$@1)}
SubTotal|||R$ {REPORT TICKET DETAILS:EC.Bairros.Taxa.Sum:(TEN.Deliverer=@1)}|R$ {REPORT TICKET DETAILS:EC.Bairros.TaxaExtra.Sum:(TEN.Deliverer=@1)}
Total @1||||R$ [=F(TN(’{REPORT TICKET DETAILS:EC.Bairros.Taxa.Sum:(TEN.Deliverer=@1)}’)+TN(’{REPORT TICKET DETAILS:EC.Bairros.TaxaExtra.Sum:(TEN.Deliverer=@1)}’),‘0.00’)]
|

No i mean befpre [taxas] and replace taxas woth $1