Skip to Main Content
InterSystems Ideas
We love hearing from our users. Tell us what you want to see next and upvote ideas from the community.
* Bugs and troubleshooting should as usual go through InterSystems support.
Status Community Opportunity
Categories InterSystems IRIS
Created by Yuri Marx
Created on Aug 1, 2023

Programmatic reports

The report creation is a tedious and non-productive task. You need an IDE, create a connection, create a SQL query, define report bands, drag-and-drop/design report columns, fields, labels, summarizations, margins, charts and prepare perfect pixel reports for print. To create a tradicional report the effort takes 4 to 12 hours.

The idea is to define reports using object script instructions. With some minutes and with writing a few object script lines you can get a report equivalent to a tradicional report, with the benefit to create dynamic content for the reports (productivity).

The idea includes yet the feature to allows to the developer set print restrictions for the PDF report generated (reduce carbon emission, not allowing print, only read).

Benefits of this idea:

1 - Productivity - develop a report in minutes not in hours

2 - Reduce carbon emission - is possible restrict the PDF print

3 - Create dynamic reports using ObjectScript

4 - No need to install a report server, saving processor and memory resources (decreasing emissions)


To create a report using source code, see this sample with Java, but could be in ObjectScript too:


TextColumnBuilder<String> itemColumn = col.column("Item", "item", type.stringType());

TextColumnBuilder<Date> orderDateColumn = col.column("Order date", "orderdate", type.dateType());

TextColumnBuilder<Integer> quantityColumn = col.column("Quantity", "quantity", type.integerType()).setFixedWidth(50);

TextColumnBuilder<BigDecimal> unitPriceColumn = col.column("Unit price", "unitprice", type.bigDecimalType());

ColumnTitleGroupBuilder titleGroup2 = grid.titleGroup("Group 2", quantityColumn, unitPriceColumn);

ColumnTitleGroupBuilder titleGroup1 = grid.titleGroup("Group 1", orderDateColumn, titleGroup2).setTitleFixedWidth(450);

report()
.setTemplate(Templates.reportTemplate)
.columnGrid(itemColumn, titleGroup1)
.columns(itemColumn, orderDateColumn, quantityColumn, unitPriceColumn)
.title(Templates.createTitleComponent("ColumnTitleGroup"))
.pageFooter(Templates.footerComponent)
.setDataSource(createDataSource())
.setSecurityRule(PrintRule.READ_ONLY) //if you want restrict print
.printPDF();


  • ADMIN RESPONSE
    Sep 14, 2023

    Thank you for submitting the idea. The status has been changed to "Community Opportunity".

    Stay tuned!

  • Admin
    Vadim Aniskin
    Reply
    |
    Nov 15, 2023

    @Yuri Marx, you have a comment on your idea. Please answer it to help your idea to be promoted.

  • Timo Lindenschmid
    Reply
    |
    Aug 10, 2023

    Isn't this essentially zenreports again? Also, this really sound like a community project.

    1 reply