Jump to content
We've recently updated our Privacy Statement, available here ×

javator

Members
  • Posts

    12
  • Joined

  • Last visited

javator's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Hi, look through the iReport forum for a How-to concerning "Internationalization". Keywords "internationaization" or "i18n". Post again if no solution found. Good luck
  2. Hi Munga, I think I'll give up and choose between the two solutions, either the exportReportToPdfFile or the JRViewer. I know that Java is quite slow to call and to be called by native applications, maybe the JRViewer cannot be adapted so that the Save-Dialog appear more quicker. Anyway I'm very thankful to you by helping me through this thread. Best greetings
  3. Hi munga, yes exactly, i want to generate and view the report without creating a file. And I used before the method with the JasperViewer, but it seemed to be too slow when I click on the save icon of the JasperViewer Windows, and it took fast a minute in order to get the save dialog, it's why I thought to use another method, which allows to generate an run the report directly into PDF Format: So once I call the report, it would will be generated then willl Acrobat Reader open within the generated report for example and also without creating a file on the directory. Is it possible ? Thanks
  4. Hi munga, thanks again for your answer, I'll try once I'm finished with doing another task with JasperReport, which is the following: I used in the beginning to export JasperReport into a PDF-File through the method: JasperExportManager.exportReportToPdfFile(jasperPrint, "pdfFileName.pdf"); Process p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler pdfFileName.pdf"); p.waitFor(); Which exports (saving then running) the generated report File into PDF Format, but what I 'd like to make is to generate and run the report without saving it to a file, knowing that I'm working on a java desktop application and not a Servlet. I noticed that it exists this method called: JasperRunManager.runReportToPdf() but I couldn't really realize it in my case. Any idea? Thanks in advane. Regards
  5. It works out of the box, thank you very very much munga ! I will use your proposed solution for the moment to distribute the runnable JAR-File alternatively to compiling through ANT-Task, till I'd learn how the Ant-tasks for JasperReports works, then I will try to accomplish it through Ant. Thanks anyway for everyone who has answered me on this thread. Best regards to JasperReports Developping team
  6. Thanks for the answer, but what I'd like to do is to distribute a build of my Java application, as the JAR-File would be "stand-alone", that means that once the user run it, he'd will be also able to run and view the report on his local computer without any problem concernig the pointing path. I hope you'll figure out what I wanted to say (I don't really master english!). Thanks again
  7. javator Wrote: Hello, I'm working with netbeans on a Java Desktop Application, in this application I implemented JasperReports, which are created and compiled with iReport. In the java classes I call directly the compiled jasper file like in code below. the problem is: When I'm working on the IDE, the report running works out-of-the box , but once I make a build for the application, I couldn't start it anymore ( I got this : java.io.FileNotFoundException), I releazied that if I put the folder where the jasper file exist (called "report" in this case) in the same location where the JAR-File is, so it works normally! Knowing that in my Netbeans Project, the "report " folder is inside "src". Is there any way to set up the path to the jasper files , so that they'd be runnable directly from the builded JAR-File? I'm waiting forward to getting your help. Thanks in advance Code: I used double back-slash to give path to the jasper file !
  8. Hello, I'm working with netbeans on a Java Desktop Application, in this application I implemented JasperReports, which are created and compiled with iReport. In the java classes I call directly the compiled jasper file like in code below. the problem is: When I'm working on the IDE, the report running works out-of-the box , but once I make a build for the application, I couldn't start it anymore ( I got this : java.io.FileNotFoundException), I releazied that if I put the folder where the jasper file exist (called "report" in this case) in the same location where the JAR-File is, so it works normally! Knowing that in my Netbeans Project, the "report " folder is inside "src". Is there any way to set up the path to the jasper files , so that they'd be runnable directly from the builded JAR-File? I'm waiting forward to getting your help. Thanks in advance Code:private void printReport(Clients client) throws IOException, InterruptedException { JasperPrint jasperPrint; HashMap<String, String> parameter = setParameter(client); try { jasperPrint = JasperFillManager.fillReport("src\report\client.jasper", parameter, new JREmptyDataSource()); JasperExportManager.exportReportToPdfFile(jasperPrint, "ReportKunde.pdf"); Process p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler ReportClient.pdf"); p.waitFor(); } catch (JRException jre) { jre.printStackTrace(); } }
  9. I'm in need to create a kind of "a table" in a report , so that it has 5 columns, a row on the top with static text titles while the content of the other rows should be filled out through an SQL query with values coming from columns of a db table (See the attached picture for an overview). Please help when there'd be any idea. Thanks
  10. Hello, I created reports for a Java application using iReport, in which are the compiled jasper files directly called in a java application in order to fill the compiled report design, then export it into a PDF format file. Everything worked out of the box! But after making a build of the project, and while running the JAR file it throwed an FileNotFoundException (See the attached picture). After I realized that was a path's problem (I used relativ path to access the compiled jasper files), so I tried another way by copying the package's folder where jasper files are, into the location where the JAR file exist, and it works again. But my purpose is how I can do the same (running the JAR file with pre-compiled JasperReport files), only by executing the single JAR file: So what should I implement in the path? Any idea? Please help. Thanks in advance. In the following I post the code that I used: Code:private void printReport(Kunden k) throws IOException, InterruptedException { JasperPrint jasperPrint; HashMap<String, String> parameter = setParameter(k); try { jasperPrint = JasperFillManager.fillReport("src\report\kunde.jasper", parameter, new JREmptyDataSource()); JasperExportManager.exportReportToPdfFile(jasperPrint, "ReportKunde.pdf"); Process p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler ReportKunde.pdf"); p.waitFor(); } catch (JRException jre) { jre.printStackTrace(); } }
  11. Yes maybe I was mistook by posting the thread in iReport's forums, I will try otherway. Thanks for the hint ! Greetings
  12. Hello, I created reports for a Java application using iReport, in which I compiled the jrxml file to call the jasper file directly in a java application in order to fill the compiled report design, then I generated the report by exporting the file into PDF format and everything worked out of the box! But when I wanted to run the builded JAR file, it throwed an FileNotFoundException (See the attached picture). After I realized that was a path's problem, so I copied the package's folder where jasper files were into the location where the JAR file exist, and it works again. I'd like to know how I can do the same (running the JAR file with pre-compiled report files), by executing everything only from the single JAR file. Any idea? Thanks in advance. Code: private void printReport(Kunden k) throws IOException, InterruptedException { JasperPrint jasperPrint; HashMap<String, String> parameter = setParameter(k); try { jasperPrint = JasperFillManager.fillReport("src\report\kunde.jasper", parameter, new JREmptyDataSource()); JasperExportManager.exportReportToPdfFile(jasperPrint, "ReportKunde.pdf"); Process p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler ReportKunde.pdf"); p.waitFor(); } catch (JRException jre) { jre.printStackTrace(); } }
×
×
  • Create New...