aspose file tools*
The moose likes Other Java Products and Servers and the fly likes how call irepot directly not use xml code    Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "how call irepot directly not use xml code    " Watch "how call irepot directly not use xml code    " New topic
Author

how call irepot directly not use xml code

muhammad fahim
Ranch Hand

Joined: Dec 17, 2006
Posts: 45
hi master
i use ireport and designed report and test run right in ireport Preview windows

sir my need is call the irepot directly not use xml in

i not want use the jrxml file and code

and build.xml give error in this code

<property name="jrc.home"
value="JasperReports-Install-Dir/jasperreports-1.3.3"/>
<!-- Define the classpath used for report compilation -->

<path id="jrc.classpath">

error

C:\Documents and Settings\Administrator\My Documents\Creator\Projects\TravelReport\build.xml:81: C:\Documents and Settings\Administrator\My Documents\Creator\Projects\TravelReport\JasperReports-Install-Dir\jasperreports -1.3.3\dist not found.


not found the jasperreports-1.3.3 dir
how i give this coldet path



such as



visual basic call crystal report and oracle form call the oracle report directly

please give me idea sample project and code step by step

thank's aamir
Anurag Mishra
Ranch Hand

Joined: Jun 16, 2003
Posts: 121
Hi,

I am really not sure with your question, I kow I report is a tool where you can create the reports and if you set the data set you will get the Report in the iReport tool while doing a preview(This is used for Jasper reports right.).

Now your question is how you can display the jasper report directly.

I am not sure what other technology you are using but for simple jsp or struts application what you need to do is to add a button in your jsp and call a method writtem in java.

The java method is going to invoke the jasper api to fill your compiled jasper report which is already compiled.

and you need to launch the report in a popup window or you can embed in same jsp to see the report.

Is this what you are looking for.


SCJP 1.2
muhammad fahim
Ranch Hand

Joined: Dec 17, 2006
Posts: 45
thank's for your reply
sir i am useing Sun Java Studio Creator and irport

please give me step how i call irport in Sun Java Studio Creator such as mu ireport file name aamir.jrxml

please give me idea
thank's

amir
Anurag Mishra
Ranch Hand

Joined: Jun 16, 2003
Posts: 121
Hi,

Please use something like this in your java method.

JasperReport jasperReport = JasperCompileManager.compileReport("--Report file path-- .jrxml");
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,new HashMap(),obj);

You can directly use the jasper APIS to generate reports in Pdf,.xls,.html etc. You must generate these report in some directory and then use the popup window or something to view the reports.
muhammad fahim
Ranch Hand

Joined: Dec 17, 2006
Posts: 45
thank you for your reply

sir please give me setp

1. how i import JasperReport i my sun java studio creater
2.how i access

and how i pass parameter in my .jrxml file



thank you

aamir
muhammad fahim
Ranch Hand

Joined: Dec 17, 2006
Posts: 45
sir i add jasperreports-1.3.3.jar file in project libraries and import these file
import net.sf.jasperreports.engine.export.*;
import net.sf.jasperreports.engine.design.*;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.view.*;

java no give error error
but when i call then system give me error

//JasperReport fahimaamir = JasperCompileManager.compileReport(sourceFileName);
JasperReport jasperReport = JasperCompileManager.compileReport("f:\ireport\fahim.jrxml");

JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,new HashMap(),obj);


sir how i call my fahim.jrxml in ireport JasperViewer
please give me idea and code

thank's

aamir
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how call irepot directly not use xml code