Here are some rough instructions. If you for example want to embed the
HTML report on a web page, you need:
- instance of JRResource (there are several implementations, depending
on what kind of output you want to have)
- a  report (either as File or as InputStream)
- datasource

1. Instantiate new JRHtmlResource, pass the File or InputStream to the
constructor, depending on where you compiled report-file is coming
from.

2. Use the setConnectionProvider to pass in an implementation of
IDatabaseConnectionProvider that will return a JDBC connection to the
database

3. Specify report parameters with setReportParameters method. At least
some older versions require you to do this even if you don't have
parameters to pass (you can use an empty map).

4. In order to render the report, you just use EmbeddedHtmlReport
component, which takes in the JRResource reference and otherwise acts
as a normal label.

If you want to provide links to the reports, you can use
JRResourceLink component which takes in JRResource.

Br,
Juha

On Mon, May 4, 2009 at 8:42 AM, raviJPYADAV <[email protected]> wrote:
>
> Hi , can you please share some sample code how to integrate this api with our
> code?
>
> --Ravi

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to