Need Help:Problem while closing Jasper Viewer


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Need Help:Problem while closing Jasper Viewer

Hybrid View

  1. #1
    Join Date
    Dec 2005
    Posts
    1

    Need Help:Problem while closing Jasper Viewer

    Hi,
    I am using the Jasper Report for preparing reports. I am developing application in Swing. I write the program for creating the report in Jasper Viewer. And I called that class by creating object in the main program. Everything is working fine and the Report is generated in the Jasper viewer as expected.

    But the Problem is When I close that Jasper Viewer window then total application is getting closed. I don't know how to solve this problem. So please help me in this regard. Now i am in Project Deadline.

    Thanks,

    Sathy,
    EMail Address Removed By Mod
    Last edited by Hack; 01-18-2008 at 08:48 AM.

  2. #2
    Join Date
    Jan 2008
    Posts
    1
    when you'll declare the JasperViewer object, pass to parameter false, like this:

    JasperViewer visor = new JasperViewer(jp,false) ;
    visor.setVisible(true) ;

    The parameter 'false', is the boolean to close all application or not.

  3. #3
    Join Date
    Sep 2009
    Posts
    1
    Quote Originally Posted by gamopu View Post
    when you'll declare the JasperViewer object, pass to parameter false, like this:

    JasperViewer visor = new JasperViewer(jp,false) ;
    visor.setVisible(true) ;

    The parameter 'false', is the boolean to close all application or not.
    please give complete code plz plz plz
    try to send to email Email Address Removed By Mode
    Last edited by Hack; 09-17-2009 at 01:40 PM. Reason: Removed EMail Address

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Sathy,

    I have edited your post and removed your email address.

    You should never post your email address in an open post on an open forum. Mail spam bots can pick that up and before you know it, your mailbox is full of junk mail. If you wish to share your email address with other forum members, please do so via our PM system.

    In addition, we prefer all answers to questions be publically posted rather than sent via EMail or PM. That way, everyone with a similar problem can benefit.

    Thanks.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  5. #5
    Join Date
    Jan 2008
    Posts
    2
    i need help find error in my coding and its due in an hour can someone please help.
    Code:
    import java.text.DecimalFormat;
    
    /**
         Employee superclass and ProductionWorker
         subclass.
     */
    
    
    /**
              Chapter 11
              Programming Challenge 1, Employee and
              ProductionWorker Class Demo Program
     */
    public class WorkerDemo
    {
    public class Employee extends ProductionWorker  
    {
    	private String employeeName;
    	private int employeeNumber;
            private double hireDate;
    
    public Employee(String name, int num, double date);
    {
    		employeeName = name;
    		employeeNumber = num;
                    hireDate = date;
    	}
            public void setName(String name)
    	{
    		employeeName = name;
    	}
     
    	public void setNum(int num)
    	{
    		employeeNumber = num;
    	}
            public void setDate(double date)
    	{
    		hireDate = date;
    	}
            public String getName()
    	{
    		return employeeName;
    	}
            public String getNum()
    	{
    		return employeeNumber;
    	}
            public String getDate()
    	{
    		return hireDate;
    	}
            public String toString()
    	{
              String str;
              str = "Name: " + employeeName 
                             + "\nNum: " + employeeNumber 
                             + "\nDate: " + hireDate;
     
    		return str;
    	}
        }
    
    public class ProductionWorker 
            {
            public String employeeName;
    	public int employeeNumber;
            public double hireDate;
            public double payRate;
            public int Shift;
            }
    public ProductionWorker(String n, int num, double date, double rate, int sh);
     {
    		employeeName = n;
    		employeeNumber = num;
                    hireDate = date;
                    payRate = rate;
                    Shift = sh;
    }
    public void setN(String n)
    	{
    		employeeName = n;
    	}
     
    	public void setNum(int num)
    	{
    		employeeNumber = num;
    	}
            public void setDate(double date)
    	{
    		hireDate = date;
    	}
           public void setRate(double rate)
    	{
    		payRate = rate;
    	}
           public void setSh(double sh)
    	{
    		Shift = sh;
    	}
    public String getN()
    	{
    		return employeeName;
    	}
            public String getNum()
    	{
    		return employeeNumber;
    	}
            public String getDate()
    	{
    		return hireDate;
    	}
            public String getRate()
    	{
    		return payRate;
    	}
            public String getSh()
    	{
    		return Shift;
    	}
    
            public String toString()
    	{
              String str;
              str = "Name: " + employeeName 
                             + "\nNum: " + employeeNumber 
                             + "\nDate: " + hireDate
                             + "\nRate: " + payRate
                             + "\nSh:   " + Shift;
     
    		return str;
    	}
        }
    public class ProductionWorker 
    {
    public static void main(String[] args)
            {
                    String shift;   // To hold a shift value
    
                    // Create a ProductionWorker object and pass the initialization
                    // data to the constructor.
                    Employee pw =
                         new ProductionWorker("John Smith", "123-A", "11-15-2005",
                                              ProductionWorker.DAY_SHIFT, 16.50);
    
                    // Display the data.
                    System.out.println("Here's the first production worker.");
                    System.out.println(pw);
                    System.out.println();
    
                    // Make some changes:
                    pw.setName("Jon Smyth");
                    pw.setEmployeeNumber("123-B");
                    pw.setHireDate("11-15-2004");
                    System.out.println("After making some changes.");
                    System.out.println("             Name: " + pw.getName());
                    System.out.println(
                        "  Employee Number: " + pw.getEmployeeNumber());
                    System.out.println("        Hire Date: " + pw.getHireDate());
                    System.out.println();
    
                    // Create another ProductionWorker object and use the
                    // set methods.
                    ProductionWorker pw2 = new ProductionWorker();
                    pw2.setName("Joan Jones");
                    pw2.setEmployeeNumber("222-L");
                    pw2.setHireDate("12-12-2005");
                    pw2.setShift(ProductionWorker.NIGHT_SHIFT);
                    pw2.setPayRate(18.50);
    
                    // Display the data.
                    System.out.println("\nHere's the second production worker.");
                    System.out.println(pw2);
            }
         }
    Last edited by Hack; 09-17-2009 at 01:39 PM. Reason: Added Code Tags

  6. #6
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    jpreddy_nick: See Post #3 in this thread.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. closing recordset after closing connection
    By Sonia in forum VB Classic
    Replies: 3
    Last Post: 10-11-2005, 07:14 AM
  2. VB.Net Closing From
    By Pyrite90 in forum .NET
    Replies: 1
    Last Post: 05-09-2005, 09:26 PM
  3. Replies: 5
    Last Post: 04-26-2002, 08:32 AM
  4. space before closing tags
    By ebzb in forum Enterprise
    Replies: 0
    Last Post: 11-28-2001, 12:33 PM
  5. Developping an Image Viewer
    By ---> Pedro Ávila in forum VB Classic
    Replies: 0
    Last Post: 10-09-2001, 08:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center