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

how to get jasper report file path in localsystem


webmaster_8

Recommended Posts

Hi Sir,

 

My code is

InputStream input = new FileInputStream(new File("./Reports/ipr.jrxml"));
System.out.println(input);
System.out.println("get into Report");
JasperDesign jasperDesign = JRXmlLoader.load(input);
 
System.out.println("Compiling Report Designs");
 
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);

 

i got the following error while running in tomcat server 

java.io.FileNotFoundException: C:Program Files (x86)Apache Software FoundationTomcat 7.0.Reportsopbill.jrxml(The system cannot find the path specified)

 

Any help would be  appreciated

Regards,

V.Gajalakshmi

Harsha Infotech

 

 

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hello Harsha,

This is link to part of your question:

http://community.jaspersoft.com/questions/542548/problems-displaying-pdf  just an overview.

With your line: JasperDesign jasperDesign = JRXmlLoader.load(input); try and put the whole statemnt here.
JasperDesign jasperDesign = JRXmlLoader.load (new FileInputStream(new File("./Reports/ipr.jrxml"));
 
If this does not work then I would say you need to give the full file path name for said file, or create a directory which is defined in your development enviroment.  Also I would print out "Input" just to see what you are really getting.
 
Hope this helps.
B.

 

Link to comment
Share on other sites

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...