Page 1 of 1

Import.RTF as method call

Posted: Thu Aug 14, 2014 8:03 am
by Haraldf
Hi,

are there any API functions for importing RTFs (e.g. as in Import.RTF).

(I'd like to have this as stream version, too).

If not, can you please include this in 2014.2?

Thank you!

Re: Import.RTF as method call

Posted: Thu Aug 14, 2014 10:51 am
by HighAley
Hello.

You could get all necessary information from Stimulsoft Programming Manual.

Thank you.

Re: Import.RTF as method call

Posted: Thu Aug 14, 2014 11:00 am
by Haraldf
Sorry, I didn't explain the problem properly:

I'd like to create a .mrt file from an existing .rtf file (like the Import.RTF.exe)
programm can do.

How can I do that by code?

(This question is not about exporting .rtf from a report. That's sweet and easy in Stimulsoft!)

Re: Import.RTF as method call

Posted: Thu Aug 14, 2014 12:26 pm
by HighAley
Hello.

Sorry, we didn't understand your question first time.

Our import convert RTF to Stimulsoft Report Template but anyway each report should be edited manually. We don't guaranty that you will achieve the expected results.

To import rtf by code you could use next code:

Code: Select all

StiReport report = new StiReport();
FileStream stream = new FileStream(rtf_filename, FileMode.Open);
Stimulsoft.Report.SaveLoad.StiRtfReportSLService rtfService = new Stimulsoft.Report.SaveLoad.StiRtfReportSLService();
rtfService.Load(report, stream);
if (RegionInfo.CurrentRegion.IsMetric) report.ReportUnit = StiReportUnitType.Millimeters;
report.Save(template_filename);
Thank you.

Re: Import.RTF as method call

Posted: Thu Aug 14, 2014 2:01 pm
by Haraldf
The quality of the autoimporter is often quite acceptable (compared to the manual work).

And it's nice for impressing customers ;)

Thank you!

Re: Import.RTF as method call

Posted: Thu Aug 14, 2014 2:02 pm
by HighAley
Hello.

We are always glad to impress you. :)
Let us know if you need any additional help.

Thank you.

Re: Import.RTF as method call

Posted: Thu Aug 21, 2014 9:00 am
by Haraldf
Hello Aleksey!

Stimulsoft.Report.SaveLoad.StiRtfReportSLService

isn't avaiable in the core DLLs.

I just found a reference in

C:\Program Files (x86)\Stimulsoft Reports.Ultimate 2014.1\Bin\Import.Rtf.exe

Any Idea?

Re: Import.RTF as method call

Posted: Fri Aug 22, 2014 7:42 am
by HighAley
Hello.

Please, look at the "C:\Program Files (x86)\Stimulsoft Reports.Ultimate 2014.1\Imports\Import.Rtf.zip" archive.

You could find there a project with this tool.

Thank you.

Re: Import.RTF as method call

Posted: Tue Aug 26, 2014 8:13 am
by Haraldf
+ 100 Like ;)

Re: Import.RTF as method call

Posted: Tue Aug 26, 2014 12:19 pm
by HighAley
Hello.

Let us know if you need any additional help.

Thank you.