|
|
|
|
Re: localization file [message #717267 is a reply to message #715249] |
Fri, 19 August 2011 19:11 |
JulioC Missing name Messages: 33 Registered: March 2011 Location: Ottawa, Canada |
Member |
|
|
Hi Jason Thanks for the link
I was able to do it as this :
1 . this.URI = "file:///C:/eclipsework/myreports/myimage.png";
That was on a windows box, however I couldn't get it working on a linux box, is there any syntax rule for Linux? I tried
this.URI = "report/images/myimage.png" and it does not work (we have birt runtime on a tomcat servlet)
I tried
2. this.URI="http://myhost/report/images/myimage.png" and it worked as expected
We prefer the number 1 idea, it is more flexible when you have the same report for several clients with a different logo, so you can have symlink to myimage.png
Idea number 2 will be great if BIRT can retrieve the hostname of the box so we could have something like this
this.URI="http://${hostname}/report/images/myimage.png"
We want to have only one report design for several clients where the hostname is different.
Thanks in advance for any idea for this.
JulioC.
[Updated on: Fri, 19 August 2011 19:13] Report message to a moderator
|
|
|
Re: localization file [message #717284 is a reply to message #717267] |
Fri, 19 August 2011 20:18 |
|
Can you try a linux uri like:
http://en.wikipedia.org/wiki/File_URI_scheme
Jason
On 8/19/2011 3:11 PM, JulioC wrote:
> Hi Jason Thanks for the link
> I was able to do it as this :
> 1 . this.URI = "file:///C:/eclipsework/myreports/myimage.png"; That was
> on a windows box, however I couldn't get it working on a linux box, is
> there any syntax rule for Linux? I tried this.URI =
> "report/images/myimage.png" and it does not work
> I tried 2. this.URI="http://myhost/report/images/myimage.png" and it
> worked as expected
>
> We prefer the number 1 idea, it is more flexible when you have the same
> report for several clients with a different logo, so you can have
> symlink to myimage.png
> Idea number 2 will be great if BIRT can retrieve the hostname of the box
> so we could have something like this
> this.URI="http://${hostname}/report/images/myimage.png"
>
> We want to have only one report design for several clients where the
> hostname is different.
>
> Thanks in advance for any idea for this.
>
> JulioC.
>
|
|
|
|
|
Re: localization file [message #718225 is a reply to message #718212] |
Tue, 23 August 2011 16:14 |
|
You can do this with client side script. Just add a text element to the
report, set its type to html and enter this code:
<script language="JavaScript">
alert( navigator.appVersion );
</script>
Jason
On 8/23/2011 11:51 AM, JulioC wrote:
> Hi Jason
> I got the report working using birt viewer on tomcat.
>
> However I have a question, it is possible using javascript to guess the
> OS of the browser in BIRT?
>
> I was trying to use a normal javascript tool
>
> navigator.appVersion.indexOf("Win")
>
> is there any similar way to do that in BIRT?
>
> Thanks
>
>
>
>
|
|
|
Re: localization file [message #718226 is a reply to message #718225] |
Tue, 23 August 2011 16:19 |
|
You can always get the user agent header from the request before the
report runs as well:
brw = reportContext.getHttpServletRequest().getHeader("User-Agent");
Jason
On 8/23/2011 12:14 PM, Jason Weathersby wrote:
> You can do this with client side script. Just add a text element to the
> report, set its type to html and enter this code:
>
> <script language="JavaScript">
> alert( navigator.appVersion );
> </script>
>
> Jason
>
> On 8/23/2011 11:51 AM, JulioC wrote:
>> Hi Jason
>> I got the report working using birt viewer on tomcat.
>>
>> However I have a question, it is possible using javascript to guess the
>> OS of the browser in BIRT?
>>
>> I was trying to use a normal javascript tool
>>
>> navigator.appVersion.indexOf("Win")
>>
>> is there any similar way to do that in BIRT?
>>
>> Thanks
>>
>>
>>
>>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05350 seconds