Jump to content
Changes to the Jaspersoft community edition download ×

variable Columnname as Fieldname


ktrinad

Recommended Posts

By: Hamza MEahmmed - hamzam

variable Columnname as Fieldname

2003-06-26 03:25

Hallo,

 

I am using JTableModel as DataSource for my Subreports. The name of Columns are not static ( it is like xy.getName()).

 

In subreport i use expression like $F(xy.getName()) but there was nothing to see in the generated report file.

 

can anyone help?

 

Thanks,

 

hamza

 

 

 

 

By: Gregory A. Swarthout - gswarthout

RE: variable Columnname as Fieldname

2003-06-26 10:48

Quoting "SourceForge.net" <noreply@sourceforge.net>:

 

>

> Read and respond to this message at:

> https://sourceforge.net/forum/message.php?msg_id=2077453

> By: hamzam

>

> Hallo,

>

> I am using JTableModel as DataSource for my Subreports. The name of

> Columns

> are not static ( it is like xy.getName()).

>

> In subreport i use expression like $F(xy.getName()) but there was nothing

> to

> see in the generated report file.

 

$F{X} is used to refer to a field that was declared with the name X. You

can't use a variable expression as a field name; it has to be hard-coded.

 

 

 

 

 

By: Giulio Toffoli - gt78

RE: variable Columnname as Fieldname

2003-06-26 11:15

You can refer to a column with the name:

 

$F{COLUMN_1}

$F{COLUMN_2}

....

 

Thay are special keywords useb by jasperreports in no table header is supply.

For store your column names, usa parameters.

 

Giulio

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...