Jump to content

Simple question from Raw beginner with eclipse/Java and Jasper convert .jasper to .pdf


dennisk1718

Recommended Posts

Hello,

I am just trying to convert a .jasper to a .pdf file.

I get a Null Pointer Exception form the following Non-Parameter code. Is this a Jasper error?

What am I not seeing?????????

Thank you

Code:
String fileName = "<absolute path>.jasper";String outFileName = "<absolute path>.pdf";	@SuppressWarnings("rawtypes")HashMap hm = new HashMap();			try{				    JasperPrint print = JasperFillManager.fillReport( fileName,hm,		    		new JREmptyDataSource() );			  		    			        JasperExportManager.exportReportToPdf(print);    System.out.println("Created File: " + outFileName);}    
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...