View Single Post
  #1  
Old 11th September 2015, 16:05
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,320
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
CSV to Bar-Graph Converter Utility

Watching a lot of posts regarding Bar-Graph creation in Baan/LN, I thought to develop a generic utility which will be available in any version of Baan/LN.

So, this utility is based on Java but is easily integrated with Baan/LN.

Basic Working

1. A jar file is placed on the server
2. CSV file is created using Baan/LN tools functions
3. Jar file is called with parameter as CSV file name
4. That's it!

I have attached 2 versions of JAR file with this post. One can use whichever required, based on the requirements.

Version 1: (BarGraphGenerator1.jar)
The Bar-Graph is displayed in a window. (Check-Snapshot1.jpeg)

Version 2: (BarGraphGenerator2.jar)
The Bar-Graph can be placed in a PDF file or can be displayed in a window depending upon an additional parameter (Check-my_graph.pdf)

Usage

The scripts will explain it pretty well!

Minimum Requirements

Java Version
Java Version 6 Update 6 or higher.
Baan/LN Version
Should work on any versions of Baan/LN with right functions
i.e. app_start(worktop)/start.application.local(webtop)/client.download.file(HTML UI)

Example
I am generating a CSV with 10 items from whinr100 table with inventory on hand less than 1000 in descending order. The Item Code is 1st column and is considered as X-Axis. On hand is 2nd column and is considered as Y-Axis.

Note that, the separator should be a comma(,). You can modify the jar in case you want another separator or you can even make it a parameter.

All the files are attached as zip. The java source is attached as well.
Any questions, changes, modifications, advancements, improvements are welcomed.

Have fun!
Attached Images
File Type: jpg Snapshot1.JPG (51.2 KB, 33 views)
Attached Files
File Type: pdf my_graph.pdf (97.0 KB, 50 views)
File Type: zip BarGraphGenerator.zip (2.05 MB, 56 views)
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote