473,546 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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 fillReportToFil e method, I can view the report.

Map phyIDMap = getPhysicianId( );//fills with 3 values
System.out.prin tln("Hashmap Size--->"+phyIDMap.siz e());
//filled Hashmap and open connection
JasperFillManag er.fillReportTo File("C:/iReport-2.0.1/Working.jasper" ,phyIDMap,getCo nnection());
System.out.prin tln("Saved the file into the directory.");
System.out.prin tln("\nPlease wait.Report is loading ....");
JasperViewer.vi ewReport("C:/iReport-2.0.1/classic.jrprint ", false);
closeConnection ();//closing connection
System.out.prin tln("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 "JasperFillMana ger.fillReportT oFile("C:/iReport-2.0.1/Working.jasper" ,phyIDMap,getCo nnection());" , 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 3410

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

Similar topics

1
5017
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 double-checked the path to my error log. It is in /var/www/logs/php_error_log Thanks. :) -Wayne Stevenson
3
8874
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 a empty value instead of returning the browser type. Here is the line which i am using in my code and from manual: <?php echo $_SERVER; ?>
3
2654
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 <Server>\Netscape\Server4\bin\https\jar folder. But I am not sure whether it is the right location to put the class file. Also I would like to know how to put the class...
0
957
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 storing that data. 3) Detail info, based on a different RTF file with that data.
3
5252
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 junitreport. I created a simple Math.java class which contains: package test; public class Math { public int add(int a, int b) { return a +...
2
1260
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 class ProjectEnergyUsageReportValues { private double defaultUsage; public double DefaultUsage { get { return defaultUsage; }
0
1574
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 method from a commandButton of a jsp page. The java code executed successfully: ******************************************* getpdf() { ...
0
1795
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; public class project { public static void main( String args ) {
2
5933
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 created reports. Jasper and IReport running on Windows, Oracle on a different UNIX server.
0
7507
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7435
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7698
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7794
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3492
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3472
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.