Jump to content
Changes to the Jaspersoft community edition download ×

custom DataSourceProvider and Parameter values


Recommended Posts

First a word about the env.

User will be using Ireports to execute(run) reports to produce a PDF file.



I am trying to implement a new DataSourceProvider class(implements JRDataSourceProvider) that will use a data source that is not currently supported. I want the user to be prompted for a value as a seed into the query qualification from this new data source. (So a parameter looks like the right way to go to get that done.) However I am unclear as to how to get the actual value that the user supplied so that I can do a subtitution into the search string as I am setting up the Data set results.



For a simple example lets say that the prompt if for the user to supply their "Username" so that the search would return only data about the supplied "Username". (and we do not care if they look up data about other people) I have established the parameter "Username" and have set it to "prompt" for a value. (all that work) I just have no clue how to get the value in my Java code so that I can do a search of my data set like:


Select bla from Table where Username = '<_insert value user supplied here_>';



Any clues?


thanks in advance

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