Reports Versus Printer Templates

Calling Report & Template Guru’s:

So the goal is to product a A4 style Supplier Purchase Order, or Email or CSV output but starting at the A4 report. Below is a report which I can get almost right with a bit more tinkering.

My question is what formatting can be done in a Report? Basically these are easy to product but have limited formatting features right?

Printer Templates:
So I can move this to a Printer Template similar to @QMcKay Customer Account Statements but the draw backs are:

  1. No Screen Preview (if your using generic TAGS i.e. no SQL);
  2. Need to use “Print Entity Action”;
  3. More importantly I do not know what the heck I am doing with Templates!

Like if a try the most simplistic Template I get blank on a preview? (Note hardcoded Entity Name “BR2”):

[ENTITY]
<J00>Just a Test Line
<J00>{ENTITY NAME}

{REPORT ENTITY DETAILS:EC.Company Name,EC.Address,EC.Email:(EN=BR2): <J00> {0} | {1} | {2}:::}

Need some guidance, please :confused:

In general, Ticket Templates only work for Tickets, or in the case of a Loaded Entity, they can be used to produce output for that Entity such as Entity Details (custom data fields) and associated Account Details (balance, transactions, etc).

Note the keyword is Loaded, which in the Account Statement Tutorial is performed by a Load Entity Action. This is why the Print Entity Action works.

So in most cases, Report Templates are the only way to go.

No one really know for sure :wink: LOL … just experimentation.

For the first part of your Report, if you give it a header, you can define the columns so that it doesn’t center the Company data - instead it aligns left or right.

[Supplier:1]
Fosters\r2 Street\r2@2.com

Yes that what I was afraid of, but at least you have confirmed my observations!

Yes, I tried this but you get the inverse video and box table. I was trying to format the address so it would fit into a window faced envelope or sent to a PDF.

The only tool we seem to have is good old faithful "\r" :disappointed:

PS:

I thought the Print Entity Action allows a Entity Name parameter? So if all else failed using Reports I reluctantly was going to use a template - pass the widget value (Entity Name) to the Print Action, I thought there would be no need to Load Entity?

Nup! The Printer Template fails in so many ways…

Old faithful \r not supported!
Interesting also, have nominate Windows Printer with 100 char width but <F>- stops out like a Receipt Printer?

Tons of formatting options with reports. What kind are you looking for? Btw my internet is down until Friday so I can’t post from my computer :frowning: means I can’t really test anything for you.

Everything you’ve got - load me up please!
Left Justification
Indent
Bold
(See top image)

:scream: :cold_sweat: :sob: - so many posters reaching for the drug cabinet right now…

You can try inline formatting for fields. Wish I could show you lol.

In your layout try things like this:
[test:1, 1, 1 ]

Notice second one has space after comma third 1 has space after comma and after the 1

Hey @QMcKay
Sorry to bug you but I never did really understand Emre’s reply at:

The reference to the Data Exports feature also does not reference those last few “pesky” colons in the following syntax:

{REPORT ENTITY DETAILS:[EC.Company Name] + '\r',EC.Address,EC.Email:(EN=$1):{0}\r{1}\r{2}:::}

I just cannot find your latest summary posted not so long ago! Have been looking and looking!

Questions:

  1. The 1st Colon position after the {2} place holder is used for what and how?
  2. The 3rd Colon position after the {2} place holder is used for what and how?

I understand the 2nd colon can be used for addition expressions like $2 > 0 (never have got this to work but have seen it).

This is not a syntax Witch hunt - I am trying to see if any of the above formats might help Left Justify the Supplier Address and also if I can put them to use anywhere else?
Many Thanks…

PS:The Linked post has a image a few posts above which explains my questions.

Honestly, you’re asking the wrong person, sorry. I mainly use SQL for my reports, so my Report Tag syntax understanding is rather limited.

Lets see if we can summarize this:

So we have:

{TAGNAME:Fields:PosNegFormat:TagExpression:Col/LineFormat:RowFormat:Expression:delimiter}

or to try to break it down more visibly:

{TAGNAME
:Fields
:PosNegFormat
:TagExpression
:Col/LineFormat
:RowFormat
:Expression
:delimiter}

That is my understanding from previous posts.

Except some Report Tags have different valid sections, but @emre has made an attempt to “normalize” them all. I’m not certain this holds true for all Report Tags or not.

The example you might be referring to that I recently posted about was REPORT SQL DETAILS …

{REPORT SQL DETAILS
:<handler or sql>
;<parameters,1,2> -- yes there is a leading semi-colon here
:<fields>
:<TagExpressions>
:<Col/LineFormat>

the rest probably can be used as wel...

:<RowFormat>
:<Expression>
:<delmiter>
}

@emre has stated in the past that it is not necessary to “placehold” all sections if you want to specify the last section for delimiter, which is probably why this works:

{REPORT SQL DETAILS
:SELECT DISTINCT [GroupCode] FROM [MenuItems] ORDER BY [GroupCode]
:F.GroupCode
:<TagExpression> left empty 
:{0},}

Can you show an example I am not sure I understand what you mean.

EDIT: Oh nevermind I saw it. That is hard coded I believe. You could not use that for address and instead use a different report layout.

1 Like

You are probably correct. But again, that is when using Actions rather than Preview.

This craziness shows ROW format. I cannot get the second expression to work however …

@{REPORT ENTITY DETAILS:E.Name:(ET=Customers):{0}:,}
{REPORT ENTITY DETAILS:E.Type,E.Name,E.Balance
:(EN=$1)
:\r{0}     \rName\: {1}    \rBalance\: {2}     \r
:\r$1 {0}\r---------------------------------------------------
:'$1'!='Chas'
:}
1 Like

Brilliant thanks, book marked and straight to the “pool room” with that - (Aussie term for trophy cabinet). Yes have only seem the last :Expresson working once. Not sure if you use the :(EN=$1) whether it negates the second one?

Thanks again for making the time :smile:

1 Like