Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » string concatenation in expression builder
string concatenation in expression builder [message #73780] Wed, 14 September 2005 09:31 Go to next message
Jorg Heymans is currently offline Jorg HeymansFriend
Messages: 26
Registered: July 2009
Location: Belgium
Junior Member
Hi,

I am trying to include a dynamically generated image in a report. I have
added the image and am struggling to dynamically build the URI for it
through the expression builder.

I would've thought that this
var url ="http://localhost/getImage?param=" + row["myparam"];

returns the url as a string with the parameter attached, but it doesn't.
What am I missing here? Are there any good sources of expression builder
examples, except for the help topics?


Regards
Jorg Heymans
Re: string concatenation in expression builder [message #74015 is a reply to message #73780] Wed, 14 September 2005 18:02 Go to previous messageGo to next message
Mike Boyersmith is currently offline Mike BoyersmithFriend
Messages: 143
Registered: July 2009
Senior Member
Hi Jorg,

Any luck with this? What are you getting back as a value when you run?



Jorg Heymans wrote:
> Hi,
>
> I am trying to include a dynamically generated image in a report. I have
> added the image and am struggling to dynamically build the URI for it
> through the expression builder.
>
> I would've thought that this
> var url ="http://localhost/getImage?param=" + row["myparam"];
>
> returns the url as a string with the parameter attached, but it doesn't.
> What am I missing here? Are there any good sources of expression builder
> examples, except for the help topics?
>
>
> Regards
> Jorg Heymans
>
>
>
Re: string concatenation in expression builder [message #74032 is a reply to message #74015] Wed, 14 September 2005 18:17 Go to previous messageGo to next message
Jorg Heymans is currently offline Jorg HeymansFriend
Messages: 26
Registered: July 2009
Location: Belgium
Junior Member
Mike Boyersmith wrote:

> Any luck with this? What are you getting back as a value when you run?
>

Actually no, I gave up on this :-(

I tested with the simplest concat operation :
var url ="http://localhost/getImage?param=" + "staticvalue" ;

but when i click preview then it says it can't find the file "var
url="http....." , so it seems like its not evaluating the expression at all.


Are expressions supported at all for image URIs ? I didn't get the
impression from the docs that they're not.


Thanks
Jorg
Re: string concatenation in expression builder [message #74074 is a reply to message #74032] Wed, 14 September 2005 07:22 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Jorg
I may be missing what you are asking, but
if I add an image and then using the expression builder I
type
"http://urltomypic" + picvariable

and then in the initialize method of the report I type

var picvariable = "testimage.jpg";

This works for me.
Am I missing something?

Jason Weathersby
BIRT PMC






"Jorg Heymans" <jh@domek.be> wrote in message
news:dg9pg8$aau$1@news.eclipse.org...
> Mike Boyersmith wrote:
>
>> Any luck with this? What are you getting back as a value when you run?
>>
>
> Actually no, I gave up on this :-(
>
> I tested with the simplest concat operation :
> var url ="http://localhost/getImage?param=" + "staticvalue" ;
>
> but when i click preview then it says it can't find the file "var
> url="http....." , so it seems like its not evaluating the expression at
> all.
>
>
> Are expressions supported at all for image URIs ? I didn't get the
> impression from the docs that they're not.
>
>
> Thanks
> Jorg
Re: string concatenation in expression builder [message #74348 is a reply to message #74074] Thu, 15 September 2005 08:12 Go to previous messageGo to next message
Jorg Heymans is currently offline Jorg HeymansFriend
Messages: 26
Registered: July 2009
Location: Belgium
Junior Member
Jason Weathersby wrote:
> Jorg
> I may be missing what you are asking, but
> if I add an image and then using the expression builder I
> type
> "http://urltomypic" + picvariable
>
> and then in the initialize method of the report I type
>
> var picvariable = "testimage.jpg";
>
> This works for me.
> Am I missing something?

How would you write this without using the initialize method ? I tried
exactly this by using the following expression as URI
"http://urltomypic" + "/testimage.jpg" , this should yield the same
results no ? It doesn't evaluate this expression somehow.

I was trying to use the results of a query as parameters in my URI
expression, but when that wasn't working i tried to get it to work
statically ie with the parameters precomputed. This is how i got to this
string concatenation problem...


Regards,
Jorg
Re: string concatenation in expression builder [message #74399 is a reply to message #74348] Thu, 15 September 2005 02:34 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Jorg,

I tested your scenario on my system and it worked fine.
Can you cut the expression and post it?
Dont use
var url ="....
Just let the last line in the expression builder be
"http://urltomypic" + "/testimage.jpg"

Jason Weathersby
BIRT PMC

"Jorg Heymans" <jh@domek.be> wrote in message
news:dgbae7$56i$1@news.eclipse.org...
> Jason Weathersby wrote:
>> Jorg
>> I may be missing what you are asking, but
>> if I add an image and then using the expression builder I
>> type
>> "http://urltomypic" + picvariable
>>
>> and then in the initialize method of the report I type
>>
>> var picvariable = "testimage.jpg";
>>
>> This works for me.
>> Am I missing something?
>
> How would you write this without using the initialize method ? I tried
> exactly this by using the following expression as URI
> "http://urltomypic" + "/testimage.jpg" , this should yield the same
> results no ? It doesn't evaluate this expression somehow.
>
> I was trying to use the results of a query as parameters in my URI
> expression, but when that wasn't working i tried to get it to work
> statically ie with the parameters precomputed. This is how i got to this
> string concatenation problem...
>
>
> Regards,
> Jorg
Re: string concatenation in expression builder [message #75407 is a reply to message #74399] Mon, 19 September 2005 08:06 Go to previous message
Jorg Heymans is currently offline Jorg HeymansFriend
Messages: 26
Registered: July 2009
Location: Belgium
Junior Member
Jason Weathersby wrote:
> Jorg,
>
> I tested your scenario on my system and it worked fine.
> Can you cut the expression and post it?
> Dont use
> var url ="....
> Just let the last line in the expression builder be
> "http://urltomypic" + "/testimage.jpg"
>

Sorry for the delay.

I have isolated a testcase showing my problem. If the attachment does
not come through, get it from www.domek.be/imagetest.rptdesign

Regards
Jorg
Previous Topic:How to generate Html report using birt
Next Topic:How do I connect BIRT with Sybase
Goto Forum:
  


Current Time: Tue Apr 23 12:23:56 GMT 2024

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

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

Back to the top