Infor LN

Infor LN Report Development: Complete Guide

Report development in Infor LN encompasses three distinct approaches: native BShell report sessions (Type 3) for standard operational reports, Crystal Reports integration for pixel-perfect formatted documents like invoices and purchase orders, and Infor Document Output Management (DOM) for enterprise-level document distribution. Each approach serves different use cases, and most LN implementations use all three. This guide covers the technical details of building, testing, and deploying reports in each framework.

BShell Report Sessions (Type 3)

Native BShell report sessions are the workhorse of LN reporting. They are Type 3 sessions that collect parameter input from the user (date range, warehouse, status filter), execute database queries in a processing loop, and generate output to the screen, printer, or file. The report layout is defined using BShell report commands: report.open, report.header, report.detail, report.footer, and report.close. These sessions are fast to develop and maintain because they use the same BShell language as all other LN development.

  • Create a report session: define a Type 3 session in Session Management (ttadv2100m000); the form collects parameters; the BShell script processes data in a while loop with db.select/db.fetch; output is written using report.detail(line.format$) where line.format$ is a formatted string
  • Report layout definition: use report.section() to define named sections (header, detail, subtotal, footer); control column alignment with the format$() function: format$(i.item, "12A") for a 12-character left-aligned string, format$(i.amount, "15.2N") for a 15-digit number with 2 decimals
  • Parameter handling: define range parameters using the from/to pattern: 'domain tcitem i.item.f, i.item.t' for an item range; use the standard LN range validation: 'if i.item.f > i.item.t then mess(3, "From-item must be less than To-item"); return endif'
  • Performance optimization: for reports scanning large tables (>100K rows), add progress reporting: 'progress.bar(current.count, total.count, "Processing items...")' and use db.set.to.read() to avoid row locking; consider adding a temporary work table for complex aggregations instead of in-memory arrays
  • Output routing: use the LN Device Manager to route report output; report.to.screen() for interactive viewing, report.to.printer(device.code) for direct printing, report.to.file(filename$) for file export; configure default devices in Session Properties > Output tab

Crystal Reports Integration

For formatted documents requiring precise layout control—invoices, purchase orders, packing slips, certificates of conformance—LN integrates with SAP Crystal Reports. The integration works by having the LN BShell report session populate a temporary staging table with report data, then launching Crystal Reports with a connection to that staging table. The Crystal Reports .rpt file defines the visual layout with headers, logos, barcodes, and formatted fields. This separation of data (BShell) and presentation (Crystal) enables non-developers to modify report layouts.

  • Architecture: the BShell report session populates a staging table (usually a custom table in your module, e.g., tcspc.rpt.staging) with denormalized report data; the Crystal Reports connection string points to the LN database and the staging table
  • Data staging: in the BShell script, loop through source tables and insert rows into the staging table with a unique report batch ID (session.id + timestamp); this batch ID filters the Crystal report to show only the current user's data
  • Launch Crystal Reports: use the LN Crystal Reports integration API: crystal.report.open("reportname.rpt"); crystal.report.set.param("BatchID", batch.id$); crystal.report.execute() — the report renders as a PDF or sends directly to a printer
  • Barcode fields: for shipping labels and product identification, use Crystal Reports barcode fonts (Code 128, Code 39); the BShell staging table stores the raw barcode value; the Crystal field uses a barcode font to render the scannable barcode
  • Deployment: deploy .rpt files to the LN report server directory configured in System Parameters (ttadv0100m000) > Report Settings; use Crystal Reports Designer for layout modifications and test with sample data before deploying to production

Document Output Management (DOM)

Infor Document Output Management (DOM) is the enterprise document routing layer that sits above both BShell reports and Crystal Reports. DOM controls where reports are sent based on business rules: a customer invoice might be emailed as a PDF to the customer, archived to a DMS (Document Management System), and printed to the accounts receivable department's printer—all from a single print action. DOM configuration is table-driven and does not require BShell programming.

  • Configure DOM rules: navigate to Document Output Management (ttadv3100m000); define output rules based on document type (invoice, PO, packing slip), recipient (customer, vendor, internal department), and delivery method (print, email, archive, EDI)
  • Email integration: DOM sends reports as PDF email attachments using the SMTP configuration in System Parameters; configure email templates with merge fields for personalized subject lines and body text: 'Invoice {invoice.number} for {customer.name}'
  • Archive integration: DOM archives every generated document to the configured DMS (Infor Document Management, SharePoint, or file system); each document is tagged with business key metadata (order number, customer code, document type) for retrieval
  • Multi-format output: DOM can transform a single report into multiple formats simultaneously: PDF for email delivery, ZPL for barcode label printing, XML for EDI transmission, and PostScript for high-quality printing
  • Testing DOM rules: use the DOM Simulation mode (ttadv3150m000) to test output rules without actually sending documents; the simulation shows which rules matched, which delivery methods would be triggered, and the final document routing path

Streamline your Infor LN report development with Netray's AI-powered report design assistance and automated testing—contact us for a demo.