473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Empty report appearing for iReport, when calling from a java class file.

Hi,
I am a new guy in jasper and iReport. I could create a report and subreport successfully with iReport. while running through iReport, it will ask for parameters and after supplying them, the report launches. I had writen a java class which accepts parameters from command prompt and put these into a hashmap. I could created a oracle db connection also which is working successfully. My problem is, while report is executing through java file, I am getting an empty page. But the same thing working fine for iReport. Please see below my code to fill the report and view it. view is working fine since I tried for an existing jrprint file by commenting fill fillReportToFile method, I can view the report.

Map phyIDMap = getPhysicianId();//fills with 3 values
System.out.println("Hashmap Size--->"+phyIDMap.size());
//filled Hashmap and open connection
JasperFillManager.fillReportToFile("C:/iReport-2.0.1/Working.jasper",phyIDMap,getConnection());
System.out.println("Saved the file into the directory.");
System.out.println("\nPlease wait.Report is loading ....");
JasperViewer.viewReport("C:/iReport-2.0.1/classic.jrprint", false);
closeConnection();//closing connection
System.out.println("Done!");

this is the section of the file which is filling and displaying report according to the values from command prompt. hashmap is filling with the correct values from command prompt. connection also true. And the phenomenon happend only for the reports which is expecting parameters. for static queries, I can successfully launch the report. I think the problem is in the code "JasperFillManager.fillReportToFile("C:/iReport-2.0.1/Working.jasper",phyIDMap,getConnection());" , filling is not happening in the case of reports with parameters(I guess). Please advice me what to do in this case. I searched a lot, but couldn't find anything helpful.

Thanks&Regards,
Rakesh
Jan 11 '08 #1
0 3397

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I...
3
by: tornado | last post by:
Hi all, I am pretty new to PHP. I was reading PHP manual and trying out the example from 2nd chapter (A simple Tutorial). When i try to print the variable as given in the example it returns...
3
by: Rajesh | last post by:
Hi, I am using iplanet webserver 4.1. I want to call a java class from ssjs file. But I am not getting the result. I have created a java class file and put it in the folder...
0
by: Neal | last post by:
Hi, I have been trying to get various types of data to print out on a single report. The following kinds of data are to be included: 1) A company logo 2) Company info, based on an RTF file...
3
by: knightsmastergeneral | last post by:
Hi, I'm currently working on getting junit and junireport to take some java files, convert it to xml and then display error messages / success rates etc in html which is one of the features of...
2
by: =?Utf-8?B?UXVpbWJseQ==?= | last post by:
I'm putting together a REALLY simple report for my WinForms app. I use an object data source. Here's the class: -------------------------------------------------------------------------- public...
0
by: gsuns82 | last post by:
Hi all, * I am working on jasper reports,I have successfully generated sample pdf report from a java program. * But i am getting problems when i tend to call that report genarating...
0
by: jebbyleezer | last post by:
Hello, I have source code that builds correctly, however, after the program terminates the output file produced is empty. Here is my source code: import java.io.*; import java.util.Scanner;...
2
by: mkotula | last post by:
Hi, Brand new to jasper and IReport with Oracle. Was able to load and connect IReport to Oracle DB and created my first reports. Unable to connect Jasper to the DB nor import my IReport...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.