How to export documents with Java?

Stimulsoft Reports.JAVA discussion
Post Reply
ethan.shi
Posts: 24
Joined: Mon Apr 22, 2013 2:53 am

How to export documents with Java?

Post by ethan.shi »

Hi,

I need export Word2007 document in Java enviment.

Could sb. give me a sample for it?

Thanks a lot!
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to export documents with Java?

Post by HighAley »

Hello.

Do you want to do it in code?

Thank you.
ethan.shi
Posts: 24
Joined: Mon Apr 22, 2013 2:53 am

Re: How to export documents with Java?

Post by ethan.shi »

Aleksey Andreyanov wrote:Hello.

Do you want to do it in code?

Thank you.
Hi, Aleksey

Thanks for reply.

Yes, I need do it in code.

and do you have Java class reference for Stimulsoft Reports , I only find .net edition in your web.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to export documents with Java?

Post by HighAley »

Hello.

You could find a sample code in the ExportReport file in our distribution.
Here is a nethods that you could use:

Code: Select all

com.stimulsoft.report.StiExportManager.exportWord2007(StiReport, OutputStream)
com.stimulsoft.report.StiExportManager.exportWord2007(StiReport, StiWord2007ExportSettings, OutputStream)
Thank you.
ethan.shi
Posts: 24
Joined: Mon Apr 22, 2013 2:53 am

Re: How to export documents with Java?

Post by ethan.shi »

Hi, Aleksey
That's what I need!

Thank you!
ethan.shi
Posts: 24
Joined: Mon Apr 22, 2013 2:53 am

Re: How to export documents with Java?

Post by ethan.shi »

Aleksey Andreyanov wrote:Hello.

You could find a sample code in the ExportReport file in our distribution.
Here is a nethods that you could use:

Code: Select all

com.stimulsoft.report.StiExportManager.exportWord2007(StiReport, OutputStream)
com.stimulsoft.report.StiExportManager.exportWord2007(StiReport, StiWord2007ExportSettings, OutputStream)
Thank you.
Hi, Aleksey

I found how to use xmlDatabase and oleDatabase in the sample,

but I need use the dataset or datatables as datasource,

seems we don't have a method just like report.regData() in the java edition.

so how can I do?
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to export documents with Java?

Post by HighAley »

Hello.

Unfortunately, it's impossible to register dataset or datatable now.

Thank you.
ethan.shi
Posts: 24
Joined: Mon Apr 22, 2013 2:53 am

Re: How to export documents with Java?

Post by ethan.shi »

Aleksey Andreyanov wrote:Hello.

Unfortunately, it's impossible to register dataset or datatable now.

Thank you.
And is there any way to use other in-memory object as datasource to export reports?

If it is not supported in java edition, should I export my in-memory object to XML file first?
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to export documents with Java?

Post by HighAley »

Hello, Ethan.
ethan.shi wrote:And is there any way to use other in-memory object as datasource to export reports?
Unfortunately, it's impossible to use objects from memory in a report.
ethan.shi wrote:If it is not supported in java edition, should I export my in-memory object to XML file first?
Yes, it will be the best solution of your problem.

Thank you.
Post Reply