Jump to content
We've recently updated our Privacy Statement, available here ×

hello world in xml


2004 IR Help

Recommended Posts

By: arnon81 - arnon81

hello world in xml

2005-03-15 15:18

hello

how do I do this?

<hello>arnon</hello>

 

arnon is from some java code such as :

Map parameters = new HashMap();

parameters.put("name", "arnon");

 

Thank you

Arnon

 

 

 

 

By: arnon81 - arnon81

RE: hello world in xml

2005-03-15 15:38

I tried this but didn't work....

<hello>$P{name}</hello>

 

Thank you

Arnon

 

 

 

 

By: Friedemann Becker - fnbecker

RE: hello world in xml

2005-03-16 01:10

Sorry, i have no clue what you are trying to to.

 

you use JasperReports syntax ($P), so it should be a jasperReports definition file, that you create.

 

if it's standard-xml, parsed by hand, you habe to do all those things by yourself, xml does nothing but define <> and </> tags (and a little bit more, but nothing like code execution)

 

 

 

 

 

By: arnon81 - arnon81

RE: hello world in xml

2005-03-16 07:49

Friedemann,

 

I am just trying to generate a final report which look like this:

<hello>arnon</hello>

 

But I want to be able to modify 'arnon' from a java code (for example transform.java)

so then for example:

java transform arnon

then the generated final report will be

<hello>arnon</hello>

 

if I do java transform Friedemann

then the generated final report will be

<hello>Friedemann</hello>

 

Does jasperreport capable of doing this thing..?

if yes, please tell me how does the report template look like ....

 

Thank you

 

 

 

 

By: Friedemann Becker - fnbecker

RE: hello world in xml

2005-03-17 02:18

Do you wan't to use Parameters?

 

Declare it with

 

<parameter name="myparam" isForPrompting="false" class="java.lang.String"/>

 

and use it later within a TextField:

 

<textFieldExpression class="java.lang.String"><![CDATA["The parameter myparam has the value " + $P{myparam} + "."]]></textFieldExpression>

 

For more information about things like this, use the pretty extensive samples provided with the jasperreports package

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...