H.C. and Jasper plugin for creating a pdf report.

The forum to discuss the Headless version of Servoy. Web, Java and Servlet development questions can all be posted here.

H.C. and Jasper plugin for creating a pdf report.

Postby adelo » Tue Mar 06, 2012 7:26 am

I have a process in HC for creating a pdf report and save him in the temp folder of the server.

The problem is that the file isn't saved. If I create a tempfile work fine, so the permissions are correct.

The server running in Linux Debian 6.0, but in a Windows server work fine.

Any idea?

Thanks in advance.
adelo
 
Posts: 14
Joined: Tue Sep 30, 2008 6:43 pm

Re: H.C. and Jasper plugin for creating a pdf report.

Postby Manolo_Etec » Mon Mar 12, 2012 11:45 am

To complement the post.

this process is launched in the HC:
Code: Select all

   _temp_file = plugins.file.createTempFile('NameTempFile', '.pdf')

   _athacthment = _temp_file.getParent() + '/Entity.pdf'

   _report = plugins.jasperPluginRMI.runReport(foundset, 'Entity.jrxml',  _athacthment , 'pdf', null, null)



It should create a file path '_temp_file' with the name 'Entity.pdf'

It work properly in Servoy 6.0.5 server with Java 6 (build 1.6.0_31-b05) ,windows 7

but not on a Debian Linux 6.0 with Servoy 6.0.4.

In linux creates the temporary file 'NameTempFile' properly and when launch 'plugins.jasperPluginRMI.runReport' doesn't create the file named 'Entity.pdf'

The temporary folder in linux is read and write permissions enabled.

Please anyone know what could be the problem?

Thanks in advanced
Manuel López
Etec Programación SL
manuel@etecsoft.com
http://www.etecsoft.com
User avatar
Manolo_Etec
 
Posts: 66
Joined: Fri Sep 12, 2008 3:58 pm

Re: H.C. and Jasper plugin for creating a pdf report.

Postby jcompagner » Tue Mar 20, 2012 10:02 am

what is exactly the output of:

_athacthment = _temp_file.getParent() + '/Entity.pdf'

because there you concat a string with a File object. Maybe something is not working there.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: H.C. and Jasper plugin for creating a pdf report.

Postby Manolo_Etec » Tue Mar 20, 2012 5:15 pm

Hi Johan
At the end, it was a stupid problem. :oops:

The report had a font, that the computer didn't had.

The problem was that the log file , hadn´t anything about this error

Thanks
Manuel López
Etec Programación SL
manuel@etecsoft.com
http://www.etecsoft.com
User avatar
Manolo_Etec
 
Posts: 66
Joined: Fri Sep 12, 2008 3:58 pm


Return to Servoy Headless Client

Who is online

Users browsing this forum: No registered users and 5 guests