Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Using locale in BIRT API
Using locale in BIRT API [message #360814] Mon, 25 February 2008 07:10 Go to next message
Eclipse UserFriend
Originally posted by: beret25.rediffmail.com

Hi

I am trying generate reports in different Locale using BIRT. I suppose I
am missing on a very small thing for using I am not getting the required
report in specific locale. The code I have written is below, could someone
help me out in where I am making a silly mistake.

// Set IRenderOption
PDFRenderOption renderOptions = new PDFRenderOption();

renderOptions.setBaseURL("UTF-8");
renderOptions.setOutputFormat("pdf");

renderOptions.setOutputFileName(getOutputFile().getAbsoluteP ath());
renderOptions.setOption(PDFRenderOption.LOCALE, new
Locale("ar"));
renderOptions.setOption(HTMLRenderOption.URL_ENCODING,
"UTF-8");
renderOptions.setOption(PDFRenderOption.BASE_URL, "UTF-8");
renderOptions.setEmbededFont(true);

// pdfRenderOptions.set

IRunAndRenderTask task;
task = birtReportEngine.createRunAndRenderTask(design);
task.setRenderOption(renderOptions);
task.setLocale(new Locale("ar"));
String [] abc = Locale.getISOLanguages();

task.addScriptableJavaObject("data", data);
task.run();

I have added the following in my .rptdesign

<property name=\"includeResource\">Report0019</property>"

which indicates the default properties file and will add _ar for arabic or
_ru for russian.

I also have the following
<label>
<text-property name="text"
key="rpt.criteria.label.expiryduedays"></text-property>
</label>

Still i dont get the PDF in the locale specified, but when i see it from
BIRT designer I see the required PDF and if I generate a HTML for the same
API with the output format as HTML I also get the required output.

Could someone Help me out

Its very urgent

Thanks in advance
Arijit
Re: Using locale in BIRT API [message #360816 is a reply to message #360814] Mon, 25 February 2008 08:58 Go to previous message
Eclipse UserFriend
Originally posted by: beret25.rediffmail.com

The properties file was in UNICODE when i tried in BIRT designer but while
trying it in API I tried with unicode as well as in the specific language
Previous Topic:Java script in BIRT
Next Topic:BIRT Report parameter
Goto Forum:
  


Current Time: Fri Sep 20 13:19:15 GMT 2024

Powered by FUDForum. Page generated in 0.03380 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top