OpenRPT Context Queries, Format Strings and URLs in PDFs

OpenRPT is a Report Write…

Login

Blog History

OpenRPT is a Report Write that is Bundled with xTuple in all it's flavours. It's simple and takes some getting used to in order to use it's power

When creating a custom report there is a thing called a Context Query.  These are the values that are available

  • page_number
  • report_name
  • report_title
  • report_description
  • page_count

This screenshot shows using them:

Screen Shot 2016-06-22 at 6.45.32 PM

Another thing I discovered from the source code is that if you wrap a url in <> then it will become a link in the PDF minus the <> e.g.:

<https://jmits.com.au>

If you put a URL and then some text into a text field / label

<https://jmits.com.au>James McDonald IT Services

 It's supposed to make the following text the link text .... but this seems only to work if you are in the OpenRPT software and you chose save as PDF.

Another tip. Using Qstring Formats. Notice the String Format is "Tax Invoice %1.0f"

Screen Shot 2016-06-22 at 10.54.37 PM

This becomes the following which is better than doing two fields and trying to get them to line up nicely. Not sure if the exact proper way to do it but it works on my Mac using xTuple 4.9.5

Screen Shot 2016-06-22 at 10.55.01 PM

1 Comment

  1. Robert Heitner

    I've been using xTuple Enterprise for about 6 months and have created some pretty powerful reports. I start with pgAdmin 3 (not a fan of pgAdmin 4) to build the query I want and once perfect I move it to a metasql statement which is then used as the query source for the report. As a 30yr FoxPro programmer I get very frustrated with OpenRpt but as you said I get over it's quirkiness and am able to get the job done. I love your %1.0f tip.. where did you find it? OpenRpt documentation is severely lacking so thanks a bunch for this one!

    Reply

Trackbacks/Pingbacks

  1. xTuple Postbooks Edition 4.10.0 RC FTW | The Southern IT Observer - […] Probably my favourite part of Postbooks has been learning to use the Report Writer. Although not as full featured…

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.