2

I was doing something like

select * from $P{TABLENAME_VAR}  

in JR report but I am getting invalid table name exception though the parameter contain proper table name

The scenario here is I want to populate the name of the table dynamically based on the input provided by the user so what I am doing is

I have created a parameter . Now based on the input selected by the user a particular table name is assigned to this variable but when I am trying to assign this parameter as table name in report I am getting Invalid table name exception.

Alex K
  • 21,796
  • 18
  • 106
  • 231
Programmer
  • 693
  • 8
  • 23

1 Answers1

3

I found the answer to this one just do

select * from $P!{TABLENAME_VAR}

instead of

select * from $P{TABLENAME_VAR}
mdahlman
  • 9,039
  • 4
  • 43
  • 72
Programmer
  • 693
  • 8
  • 23
  • 2
    Don't forget you can mark it as the accepted answer since you solved your own problem. (Well there is a short time period you have to wait, but I think you should be able to shortly, if not already.) – Jacob Schoen Aug 14 '12 at 19:37