Printing problem with big data file

Hi,

I have a inventory item master file of 100K records, everytime I
generate HTML report format using SQL command with 5K to 10K
records selection and pass it to HTML type global fields attached to
a report form for print preview, the system always hanged and I have
to close the form.

If the SQL dataset is less than 2000 records, the report is printed out
perfectly. The no. of pages is less than 50 pages.

If the dataset is more than 2000 records and the no. of HTML report
is more 70 pages, ONLY 66 pages is printed out.

I try to output to PDF format, the result is the same. The system is
either hanged or printed out max of 66 pages with the rest of data
missing but I check my HTML text file the data is there.

My monthly report need to print out at least 400 to 1000 pages with
diffrent sorting and subtotal.

Needs solution URGENTLY as my client is chasing for thier monthly
report and had been debuging for few days.

Any suggustion or other 3rd party tools can help ?

Thanks in advance.

Kelvin

This is not going to help you much I think, I don’t know what the reason is for this, but you could consider Crystal Reports or Jasper (java). The last is going to be part of Servoy for (when I am correct) 3.1.
You can also try http://www.guptaworldwide.com/Products/Report.aspx?gclid=CJP9q8S0t4gCFRpTZwod42PJ0A.

I have tested iReport a little, based on Jasper. It is a stand alone java app and really looks nice. You can get it here http://jasperforge.org/sf/projects/ireport

I encountered this problem and wrote this post about it:

In my case the problem was solved by defining a SQL query as a variable (in this case named ‘query’) and using

controller.loadRecords( query )

instead of creating a dataset from a query and using

controller.loadRecords( dataset )

The HTML report not printing more than 70 pages seems to be a different issue, and one that I have encountered and not found a solution for yet. I am hoping that a little face time with Bob Cusick at the LA Users Group meeting in a couple weeks might yeild some answers, since he is the resident Servoy/HTML master.

I hope this helps you.

SteveInLA

There is obviously some kind of issue here. I will check with the dev team to see if they have any ideas.

Here is a bit more info if it helps. When I first encountered the 70 or so page limit of an HTML report, I thought it might have something to do with a character limit issue. Maybe the global that was containing the HTML text could only hold so many characters. So I reduced the point sizes in the style definitions of my HTML text. With the smaller fonts, I saw more lines of the report, but it still ended at 70 pages.

Hi All,

Thanks for the help. As SteveinInLA mentioned, I also reduced the size
of the HTML format file by removing the the style format befire pass it
to the global field. This will produce more line of report but still limit
to maximun of 67 pages only and the rest of data is missing.
The SQL query to 50k+ records and HTML formating took less than 1
min but the generating of preview is very slow (20 to 30 min and
sometime the system just hanged).

Marcel, I tested out the Jasper Report using iREPORT designer to
procude all the 50k+ records with 3 grouping and subtotal, it tooks less
than 3 mins to produce 1995 pages of PDF format report, amazingly
fast when compare with SERVOY report. I now faced the problem of
integrate the Jasper Report with SERVOY. How can I call the compiled
Jasper Report and pass parameters to Jesper Report from within
SERVOY. Can you show us some example how to write the Servoy
method to call the Jasper Report with parameters passing.

I hope SERVOY can solve the 70 pages limitation fast, as the SQL
query dataset come in handy for manupulating data before pass it to
HTML format with different formating output.

Thanks.

Kelvin
SAN

Marcel, I tested out the Jasper Report using iREPORT designer to
procude all the 50k+ records with 3 grouping and subtotal, it tooks less
than 3 mins to produce 1995 pages of PDF format report, amazingly
fast when compare with SERVOY report. I now faced the problem of
integrate the Jasper Report with SERVOY. How can I call the compiled
Jasper Report and pass parameters to Jesper Report from within
SERVOY. Can you show us some example how to write the Servoy
method to call the Jasper Report with parameters passing.

Nope, I can not. Have not tested it but I guess it is the same as starting an external application. The thing is that it will become part of Servoy so I think too much work at present is somewhat obsolete… But glad it works so well!

I am very interested in connecting Servoy to Jasper and I do need to implement some kind of reporting function in my solution shortly. I would love to use the Jasper. Please post here if you find any solutions to this.

(May be a jasper javabean could do the thing?? fingers crossed)

Thanks a lot!

SV-Kelvin:
If the dataset is more than 2000 records and the no. of HTML report
is more 70 pages, ONLY 66 pages is printed out.

Servoy renders the pages using java swing panels.
This library has a limitation of 32K pixels causing the report to be cut off after a number of pages (depending on your page size)

When the html is split over multiple records this limitation is not a problem since one record would probably only span a couple of pages.

Rob

I have got a mail from servoy with the subject “Servoy announces Jasper Reports training and plugin”. In that mail they have announced the new Jasper reporting plugin (which will be available for free for those who attend the reports training). Since I am in Hong Kong I could not attend it. I just wanted to buy the plugin and use.

I have mailed sales@servoy.com / support@servoy.com many times but I have got no reply. I am wondering someone else out here knows about how to get the plugin or how to use the open source jasper bean (or something). I would like to buy it as soon as possible since I need it very urgently for my client.

Any help would be highly appreciated in this matter.

Dear Marcel,

I guess you must have the experience integrating jasper report with the Servoy.

I have created a small plugin to test the jasper report from servoy but it does not show the jasper viewer.
I can see in the log file it has processed the report (xml reading etc). Here is the method for the generating the report.
There were no error thrown as well. I could send you the log if needed.

    public void js_runReport(String databaseName, String userName, String password, String reportFile) {
        try{
            JasperDesign jasperDesign = JRXmlLoader.load(reportFile);
            JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
            Connection jdbcConnection = JasperPluginProvider.connectDB(databaseName, userName, password);
            JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, null, jdbcConnection);
            JasperViewer.viewReport(jasperPrint);
        } catch(Exception ex) {
            String connectMsg = "Could not create the report " + ex.getMessage() + " " + ex.getLocalizedMessage();
            System.out.println(connectMsg);
        }
    }

The above code worked and jasper report viewer showed if I run it standalone. Please see my main method below.

    public static void main(String[] args) {
        String databaseName = "jdbc:mysql://localhost/test1";
        String userName = "root";
        String password = "xxxx";
        String reportFile = "D:\\.......\\JasperReport\\test1.jrxml"; (full path not shown here)
       
        JasperPluginProvider jasper = new JasperPluginProvider();
        jasper.js_runReport(databaseName, userName, password, reportFile);
      
    }

Thanks for your kind help.

I can give you some pointers/questions to guide you:

  1. so the plugin works standalone and does all as expected
  2. that means your classpath is ok
  3. is the plugin visible within Servoy
  4. is the method visible within Servoy
  5. is your database the same inside and outside of Servoy
  6. do you have jasper in your classpath

My guestimate is that 6 is the important question to ask, assuming 1-5 are answered with a yes…

BTW to make this work within a ‘real-world’ solution you need to create a client-server plugin and should work with the database connections provided by Servoy instead of using your own (for your convenience).

Hope this helps

Hi Marcel,

First of all thanks for your guide.

Basically for all the points 1 to 6 the answer is Yes.

I can see the logs being generated (processing the xml…) when I clicked a button to run the runReport() function of the plugin.

I have attached the log file for you to have a look.
Eveything seems ok but the jasper viewer does not show up.

Thanks!

servoy_log.txt (179 KB)

Hi Marcel,

I am a bit new to Servoy plugin. First I want to achieve previewing the report from Servoy through the client plugin access with the current setup (which I can do without using servoy). Then of course I must make the plugin real world one. For that I need to create the plugin as a client-server plugin.

Since I do not have a vast experience doing it, I need some pointers / help on how to create it. I think there must be some sample plugin out there. Can you please let me know where I can find such a plugin source code. Also where can find the latest javadoc for the latest servoy version 3.1.

Thanks a lot for your valuable help.

Hameed,

You will find basic documentation at developer.servoy.com. The rest is for you to find out via the trial and error method. I can tell you that it is not too difficult but really something that you will have to invest your time into.

Imho you are better of buying the plug-in from Servoy. No learning to build a (client-server) plug-in, no issues with bugs you need to solve yourself and, as far as I know, the training is about Jasper and not the plug-in itself since that can’t be too difficult…

Hi Marcel,

Thanks for your info.
Actually we were planning to buy the plugin from servoy. But the thing is they do not have any beta version of the plugin. We want to test it before we buy it since it is quite expensive for our little firm. They even do not provide a documentation (a pdf) of how it will work and how it can help us solve our reporting problems. So I wanted to take this opportunity to improve my little knowledge in Java by doing servoy plugins since I have little more time to deliver this reporting module to our clients.

Thanks!