Home » Archived » BIRT » ScriptEvaluationError when previewing simple report with one image (URI source)
ScriptEvaluationError when previewing simple report with one image (URI source) [message #194761] |
Wed, 11 October 2006 12:40  |
Eclipse User |
|
|
|
Hi,
[BIRT v2.1.1 - I just did a fresh update this morning.]
I just created a very simple report - a blank report, with one image added
to it. In the URI for the image (within the 'Edit Image Item' window) I
specified:
http://www.eclipse.org/eclipse.org-common/themes/Phoenix/ima ges/header_logo.gif
Clicking the preview button in that same window successfully displayed the
image.
When I go to the report preview tab, I see the image, as well as the
date/time from the master, however I also get a ScriptEvaluationError:
- There are errors evaluating script
" http://www.eclipse.org/eclipse.org-common/themes/Phoenix/ima ges/header_logo.gif".
Error.ScriptEvaluationError ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: There are
errors evaluating script
http://www.eclipse.org/eclipse.org-common/themes/Phoenix/ima ges/header_logo.gif.
at
org.eclipse.birt.report.engine.executor.ExecutionContext.eva luate(ExecutionContext.java:556)
at
org.eclipse.birt.report.engine.executor.ExecutionContext.eva luate(ExecutionContext.java:528)
at
org.eclipse.birt.report.engine.executor.ReportItemExecutor.e valuate(ReportItemExecutor.java:222)
at
org.eclipse.birt.report.engine.executor.ImageItemExecutor.ha ndleURIImage(ImageItemExecutor.java:189)
at
org.eclipse.birt.report.engine.executor.ImageItemExecutor.ha ndleImage(ImageItemExecutor.java:142)
at
org.eclipse.birt.report.engine.executor.ImageItemExecutor.ex ecute(ImageItemExecutor.java:107)
at
org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportItemExecutor.execute(LocalizedReportItemExecutor.ja va:35)
at
org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout Children(HTMLPageLM.java:123)
at
org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout (HTMLPageLM.java:81)
....
If I understand this right, does this mean the URI is getting evaluated as
Javascript, in which case I would need to enclose the image URI in quotes so
that it would be evaluated as expressions? This is the only way I could get
it to work without throwing an error. However, then the preview button in
the 'Edit Image Item' window does not work, displaying a dialog box with a
file not found error.
The URI field in the 'Edit Image Item' window does not seem to suggest this
requirement, as confirmed by the fact that the preview button in that window
succesfully retrieves the image.
Thanks,
Jason
--
Jason Brome
Envoy Technologies Inc.
|
|
|
Re: ScriptEvaluationError when previewing simple report with one image (URI source) [message #194769 is a reply to message #194761] |
Wed, 11 October 2006 13:25   |
Eclipse User |
|
|
|
Originally posted by: home4slc.pacbell.net
Hi Jason,
I don't understand the requirement for the double-quotes, but I have
noticed this behaviour as well, and wanted to point out that it is
documented as a requirement.
If you look at the Field Guide to BIRT >> Laying Out a Report >> How to
insert a linked image, it states:
To link to an image stored in any other location:
In Select picture from, select URI.
Under Enter URI, specify the location of the image file. Enclose the URI
in double quotation marks (" ").
The following expression is an example of a URL for a file in a remote
location:
"http://mysite.com/images/companylogo.jpg"
The one thing you mentioned below I did not experience however. When I
have the quotes surrounding the URI and do a preview in the Edit Image
Item window I can see the image.
I would be interested in knowing why the double quotes are a requirement
as well.
I'm using BIRT 2.1.1.v20060926-0959
Susan
Jason Brome wrote:
> Hi,
>
> [BIRT v2.1.1 - I just did a fresh update this morning.]
>
> I just created a very simple report - a blank report, with one image added
> to it. In the URI for the image (within the 'Edit Image Item' window) I
> specified:
>
> http://www.eclipse.org/eclipse.org-common/themes/Phoenix/ima ges/header_logo.gif
>
> Clicking the preview button in that same window successfully displayed the
> image.
>
> When I go to the report preview tab, I see the image, as well as the
> date/time from the master, however I also get a ScriptEvaluationError:
>
> - There are errors evaluating script
> " http://www.eclipse.org/eclipse.org-common/themes/Phoenix/ima ges/header_logo.gif".
> Error.ScriptEvaluationError ( 1 time(s) )
> detail : org.eclipse.birt.report.engine.api.EngineException: There are
> errors evaluating script
> http://www.eclipse.org/eclipse.org-common/themes/Phoenix/ima ges/header_logo.gif.
> at
> org.eclipse.birt.report.engine.executor.ExecutionContext.eva luate(ExecutionContext.java:556)
> at
> org.eclipse.birt.report.engine.executor.ExecutionContext.eva luate(ExecutionContext.java:528)
> at
> org.eclipse.birt.report.engine.executor.ReportItemExecutor.e valuate(ReportItemExecutor.java:222)
> at
> org.eclipse.birt.report.engine.executor.ImageItemExecutor.ha ndleURIImage(ImageItemExecutor.java:189)
> at
> org.eclipse.birt.report.engine.executor.ImageItemExecutor.ha ndleImage(ImageItemExecutor.java:142)
> at
> org.eclipse.birt.report.engine.executor.ImageItemExecutor.ex ecute(ImageItemExecutor.java:107)
> at
> org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportItemExecutor.execute(LocalizedReportItemExecutor.ja va:35)
> at
> org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout Children(HTMLPageLM.java:123)
> at
> org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout (HTMLPageLM.java:81)
> ...
>
> If I understand this right, does this mean the URI is getting evaluated as
> Javascript, in which case I would need to enclose the image URI in quotes so
> that it would be evaluated as expressions? This is the only way I could get
> it to work without throwing an error. However, then the preview button in
> the 'Edit Image Item' window does not work, displaying a dialog box with a
> file not found error.
>
> The URI field in the 'Edit Image Item' window does not seem to suggest this
> requirement, as confirmed by the fact that the preview button in that window
> succesfully retrieves the image.
>
> Thanks,
>
> Jason
>
|
|
| | | |
Goto Forum:
Current Time: Wed May 28 21:47:09 EDT 2025
Powered by FUDForum. Page generated in 1.03978 seconds
|