fluentreports
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -20,2 +20,3 @@ 0.0.1 - [2013/08/15] - Initial Release | ||
1.0.6 - Fix for Minutes = 9 wasn't 0 padded, font issue, additional band options | ||
1.0.7 - Added ability for pageNumber function to print not only current page number but total report pages. | ||
@@ -22,0 +23,0 @@ |
@@ -711,2 +711,4 @@ # fluentReports Commands | ||
* text - the text to print this: defaults to: "Page: {0}" where {0} is the current page number | ||
- You can optionally use {1} for Total number of printed pages; this increases the memory usage as the report system. | ||
Examples: "Page {0} of {1}" will print, Page 1 of 200 on page 1, and "Page 55 of 200" on page 55 if the report had 200 pages. | ||
@@ -713,0 +715,0 @@ <br><br><br> |
@@ -40,5 +40,5 @@ var Report = require('../lib/fluentReports' ).Report; | ||
{data: Current_Date, width: 200}, | ||
{data: '# of Pages:', width: 78, font:"Aparaj"}, | ||
{data: data.number_of_pages || 2, width: 200} | ||
]); | ||
{data: '# of Pages:', width: 78}, //, font:"Aparajita"}, | ||
{data: data.number_of_pages || 2, width: 200, align: 1} | ||
], {font: "Times-Roman", fontBold: true, fontItalic: true}); //"Aparajita"}); | ||
rpt.newLine(); | ||
@@ -81,3 +81,3 @@ rpt.fontNormal(); | ||
.pageFooter(footer) | ||
//.registerFont("Aparajita", {normal: './aparaj.ttf', bold: './aparajb.ttf', 'italic': './aparaji.ttf'}) | ||
.registerFont("Aparajita", {normal: './aparaj.ttf', bold: './aparajb.ttf', 'italic': './aparaji.ttf'}) | ||
.data(options.data); | ||
@@ -84,0 +84,0 @@ |
@@ -22,5 +22,5 @@ 'use strict'; | ||
version_one(); | ||
//version_one(); | ||
//version_two(); | ||
//version_three(); | ||
version_three(); | ||
@@ -54,3 +54,3 @@ | ||
Report.line(Report.currentX(), Report.maxY()-18, Report.maxX(), Report.maxY()-18); | ||
Report.pageNumber({footer: true, align: "right"}); | ||
Report.pageNumber({text: "Page: {0} of {1}", footer: true, align: "right"}); | ||
Report.print("Printed: "+(new Date().toLocaleDateString()), {y: Report.maxY()-14, align: "left"}); | ||
@@ -66,4 +66,5 @@ }; | ||
rpt.printStructure(true); | ||
rpt.render(displayReport); | ||
rpt.printStructure(true); | ||
} | ||
@@ -85,3 +86,3 @@ | ||
Report.line(Report.currentX(), Report.maxY()-18, Report.maxX(), Report.maxY()-18); | ||
Report.pageNumber({footer: true, align: "right"}); | ||
Report.pageNumber({text: "Page {0} of {1}", footer: true, align: "right"}); | ||
Report.print("Printed: "+(new Date().toLocaleDateString()), {y: Report.maxY()-14, align: "left"}); | ||
@@ -88,0 +89,0 @@ columnCounter = 0; |
@@ -20,2 +20,5 @@ "use strict"; | ||
// Add the current working directory to the file so Foxit can find it | ||
reportName = process.cwd() + "\\" + reportName; | ||
for (var i=0;i<PDFApplications.length;i++) { | ||
@@ -22,0 +25,0 @@ if (fs.existsSync(PDFApplications[i])) { |
@@ -14,4 +14,4 @@ { | ||
"main" : "lib/fluentReports", | ||
"version" : "1.0.6", | ||
"version" : "1.0.7", | ||
"engines" : {"node": ">= 0.6.0" } | ||
} |
@@ -35,3 +35,4 @@ # Fluent Reports | ||
* 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. | ||
* Group Headers can be (re)printed on every new page, always, and only once. | ||
* Page Numbers and total number of pages | ||
@@ -128,3 +129,3 @@ See the simple & stupid examples for a overview on how to generate a somewhat complex report. | ||
Report.line(Report.currentX(), Report.maxY()-18, Report.maxX(), Report.maxY()-18); | ||
Report.pageNumber({footer: true, align: "right"}); | ||
Report.pageNumber({text: "Page {0} of {1}", footer: true, align: "right"}); | ||
Report.print("Printed: "+(new Date().toLocaleDateString()), {y: Report.maxY()-14, align: "left"}); | ||
@@ -134,3 +135,3 @@ }; | ||
Now in this function we print a line across the bottom of the page; then we use the "pageNumber" helper function to print the current page number, then we print the current date. | ||
Now in this function we print a line across the bottom of the page; then we use the "pageNumber" helper function to print the current page number and total number of page, then we print the current date. | ||
A couple things to point out; Report.maxY and maxX are the largest location that can be printed to before entering the margins. If you attempt to create your footer beyond the maxY coordinate; it WILL let you; but it WILL send a error to the Report.error system stating that you exceeded the margin by however many pixels so that you can fix your report. | ||
@@ -157,3 +158,3 @@ | ||
Report.line(Report.currentX(), Report.maxY()-18, Report.maxX(), Report.maxY()-18); | ||
Report.pageNumber({footer: true, align: "right"}); | ||
Report.pageNumber({text: "Page {0} of {1}", footer: true, align: "right"}); | ||
Report.print("Printed: "+(new Date().toLocaleDateString()), {y: Report.maxY()-14, align: "left"}); | ||
@@ -160,0 +161,0 @@ }; |
Sorry, the diff of this file is too big to display
747518
7074
208