npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fluentreports

v1.4.3

Published

A simple, Fluent API for creating PDF Reports

Downloads

2,050

Readme

Fluent Reports

.github/workflows/renderer.yml

npm npm npm GitHub last commit Dependencies


Funding and sponsorship

github

You can now sponsor us on Github: https://github.com/sponsors/NathanaelA


Website and demos

See: https://www.fluentreports.com for more information.

Fluent Reports - Data Driven PDF Reporting Engine for Node.js and Browsers

Try out the reporting engine in your own browser at https://www.fluentreports.com/demo.html

Install

npm install fluentreports

Common JS

Use: const Report = require( 'fluentReports' ).Report;

ESM Support

Please use import { Report } from 'fluentReports/lib/esm/fluentReports.mjs'; as the ESM wrapper is located in the /lib/esm/ folder...

Documentation

Please read the commands.md file for an overview of all the commands. The files in the docs/ folder are generated from the source code via jsdocs, so they might be more up to date.

Please read the examples readme file for a list of examples.

Please read the tutorial.md file for the tutorials.

Features:

  • New: JSON based reports
  • New: Report Generator
  • Testing Harness to verify reports look the same after any updates
  • Completely Data Driven. You pass in the data; you tell it easily how to print the data, and it generates the PDF report.
  • Data agnostic, can be arrays, and/or objects; whatever you prefer.
  • Headers, Footers, Title Headers, Summary Footers - Both built-in and totally customizable
  • Grouping, nested grouping, and yes even more nested groupings...
  • Auto-Summing (and other automatic totals like max/min/count)
  • Sane defaults, and the ability to easily override not only the defaults but pretty much every aspect of the report generation.
  • Images, Gradients, Text, Fonts, Lines, and many other PDF features supported.
  • Data can come from anywhere, and the report engine even support Pageable data loading and related(or sub-query) data loading.
  • Sub-Reports, Sub-Sub-Reports, etc...
  • Bands (Tables/Grids) & Suppressed Bands (w/ column wrapping or column clipping)
  • Free Flow Text
  • Ability to override each part of the report for total customization of your report
  • Fluent API
  • Ability to put data over images; gradients, etc.
  • Quickly generate complex reports with minimal lines of code.
  • Colorization, Font & other changes of text per cell in Bands
  • Synchronous and Asynchronous support. If your report doesn't need to do anything Async, you can just code it without any callbacks.
  • Group Headers can be (re)printed on every new page, always, and only once.
  • Page Numbers and total number of pages
  • Text rotation
  • Cancelling of report

See the simple & stupid examples for a overview on how to generate a somewhat complex report. In these reports I tried to throw in a chunk of the features to try and give you and idea how powerful the engine is and how to use certain features.

Examples

Currently, we ship multiple examples.

Simple Sample Report

This following report is using the a few of the simplest report methods. We can show you how quickly you can create a simple report.
You have the ability to EASILY FULLY override any and all of the Headers, Footers, and Detail bands (and much more).

Really Simple Report:

  // Our Simple Data in Object format:
  const data = [{name: 'Elijah', age: 18}, {name: 'Abraham', age: 22}, {name: 'Gavin', age: 28}];
  
  // Create a Report  
  const rpt = new Report("Report.pdf")        
        .pageHeader( ["Employee Ages"] )      // Add a simple (optional) page Header...        
        .data( data )	 			 	      // Add some Data (This is required)
		.detail( [['name', 200],['age', 50]]) // Layout the report in a Grid of 200px & 50px
        .render();  				          // Render the Report (required if you want output...)

One other sample report using a list type output:

      const data = [
           {item: 'Bread', count: 5, unit: 'loaf'},
           {item: 'Egg', count: 3, unit: 'dozen'},
           {item: 'Sugar', count: 32, unit: 'gram'},
           {item: 'Carrot', count: 2, unit: 'kilo'},
           {item: 'Apple', count: 3, unit: 'kilo'},
           {item: 'Peanut Butter', count: 1, unit: 'jar'}
      ];
      
      const rpt = new Report("grocery1.pdf")      
          .data( data )									 // Add our Data
          .pageHeader( ["My Grocery List"] )    		 // Add a simple header          
          .detail("{{count}} {{unit}} of {{item}}")      // Put how we want to print out the data line.
          .render(); 							         // Render the Report (required if you want output...)

GUI & Browser Implementations

See the generator documentation