thinreports-examples
thinreports-examples copied to clipboard
Code examples for Thinreports
Thinreports Examples
The official examples for Thinreports.
Features
TextBlock tool
Here are some sample codes on how to use the Generator to insert values dynamically using the text block tool. The samples include basic usage, date and number formatting and text formatting.
ImageBlock tool
Here are some sample codes on how to use the Generator to insert images dynamically using the image block tool.
Use Event
Thinreports is a utility that offers a “simple event model” for generating reports. By using events, full reports can be generated more efficiently by centralizing and sharing common functionalities.
Use multiple layouts
Methods for generating a single report with different page sizes and different layouts is outlined here.
List
Thinreports offers list layout functions, which handles page breaks automatically when content overflows the page. Methods for generating a simple list document with a footer is outlined.
PDF Security
Methods for encrypting, setting password locks and setting security and restrictions for the generated PDF document is outlined.
Usage Examples
Rails Example
The links provide the source code to a simple task management application using Rails and Thinreports. The thinreports-rails gem is used in these projects.
Embed graph using GoogleChartAPI
Examples for using the “Image Block” functionality of 0.7.0
and Google Chart API in order to insert graphs and QR codes into the report.
Embed barcode
Examples for using the “Image Block” functionality of 0.7.0
and the barcode generation library barby to dynamically insert simple bar codes into the report.
Estimate
Example of a typical estimate form.