Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

parameter passed from jsp to sql query

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a parameter in a jsp page in a Struts application.
I have a JDBC data source and Data set in BIRT reports.
the SQL query is "select Contents from user where Header = ? "
I have a ReportParameter called HeaderParameter. I have a dataset Parameter also which is linked to the ReportParameter.

When I run the application, the parameter from the jsp page should be passed to the BIRT report as the value for ? in the where clause.

I have put the parameter in the application like request.getSession.setAttribute("a1", a1);

in the beforeOpen of the dataset, I have added the following:
var session = reportContext.getHttpServletRequest().getSession();
var myid = session.getAttribute("a[1]");


When I run the application, the parameter from the jsp page should automatically be inserted in the sql query and I want the values
to be displayed on the report.

I am not able to insert the value in the query. When I run the application, I get the Parameter page for the ReportParameter, which defeats
the idea of passing the parameter from jsp.

Can somebody help me?

Thanks
neeti
 
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should it not be?



Note I've taken out the '[' and ']'
 
Neeti Raghunath
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an array of parameters... I am just trying to display one right now....

Do you know how to get the attribute values of array of parameters?
 
Are you here to take over the surface world? Because this tiny ad will stop you!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!