Jump to content
Changes to the Jaspersoft community edition download ×

automatic parameter prompting and validation


Recommended Posts

By: Bernd Proissl - berndproissl

automatic parameter prompting and validation

2002-06-20 23:40

Hi Teodor,

 

what is you statement about http://sourceforge.net/tracker/index.php?func=detail&aid=539522&group_id=36382&atid=416706 ?

 

Will a feature like this be implemented? If yes, what will ve the expected timeframe? :)

 

I am in the need of building several parameter prompting dialogs for a bunch of reports, so I am thinking of a way to automate this.

 

What about such a JasperReportParameter class:

{

String prompt;

String defaultValue;

Converter converter

}

 

interface Converter(

Object convert(StringFromGUI) throwse ParseException;

}

 

The object returned from convert will have to be added to the parameter list.

 

The JasperreportParameter class could be filled from an application or from code from the jasperreport library based on data read from the xml report definition.

 

Anybody allready has such a solution which can be shared? ;)

 

Thanks

Bernd

 

 

By: Teodor Danciu - teodord

RE: automatic parameter prompting and validation

2002-06-21 00:39

 

Hi,

 

Well, why not?!

:)

 

Other users expressed their desire to have some

sort of a description on parameters to use when

prompting for values.

 

Since now there is kind of a lobby for this, I think

this is the moment to do it.

 

I also imagine using an expression for the default

value of the parameter.

 

Those will probably included in the 0.3.3 version

by the end of next week.

 

Thank you,

Teodor

 

 

 

By: Bernd Proissl - berndproissl

RE: automatic parameter prompting and validat

2002-06-21 00:59

> I also imagine using an expression for the default

> value of the parameter.

 

this sounds good :)

 

Another idea: For the end user it is great to have a pull down list with valid input values. Is there a posibility to describe such a list with an expression? comma separated values? There should be a flag to restrict or not restrict the user to enter other values as well. Maybe also an SQLExpression which will be used to fill the list?

 

Antother point: what buttons will be (needed) on the dialog? Can you make the configurable from the XML file? and make them call an action listener in the application's code?

 

Thanks!

Bernd

 

 

By: Teodor Danciu - teodord

RE2: automatic parameter prompting and valida

2002-06-21 01:18

 

Hi,

 

For the moment, lets do not push the

JasperReports library development towards some

particular application requirements.

The parent application that uses the JasperReports

library shouldn't do anything by itself?

 

Many feature enhancements tend to complicate

the library and do not necessarily represent

functionality that most users can't live without.

 

At least for the moment, I know many more

important features that are on the TODO list.

 

Thank you,

Teodor

 

 

 

By: Bernd Proissl - berndproissl

RE: RE2: automatic parameter prompting and va

2002-06-21 06:56

Hi,

 

IMHO my suggestions are not appplication specific. A significant part of aplications which do reporting need some sort of GUI parameter prompting.

 

I am not quite sure what you are going to put in 0.3.3:

- a parameter description for prompting

- a default value based on expressions

 

Are you thinking about GUI stuff?

 

thanks

Bernd

 

 

 

By: Teodor Danciu - teodord

RE3: automatic parameter prompting and valida

2002-06-21 07:25

 

Hi,

 

The parameter description, for prompting,

will surely make it to the next version.

 

I'm not sure about the proposed default

value expression.

Such an expression could only be build on

other previously declared parameters.

Not variables and fields. Parameters values have

to come from the parent application and cannot

come from within the report definition,

which is static.

This is the reason for the existence of parameters.

A default value expression could only process

previously declared parameter values.

 

If there are values that can come from within the

report, then variables should be used.

Furthermore, if some value has to come from the

database, then a field should be used.

 

If an additional SQL query is needed to retrieve

some parameter default value, then subreports

could be used, wrapped in a master document.

An initial dummy subreport will perform the query

and retrieve the values that will be used in a

second subreport as parameters values.

This is only a suggestion, but I'm sure it achievable.

 

As for the suggestion regarding the buttons that

should be displayed by the parent application,

I think it falls outside JasperReports required

functionality.

 

Thank you,

Teodor

 

 

 

By: Bernd Proissl - berndproissl

RE: RE3: automatic parameter prompting and va

2002-06-21 12:01

Hi Teodor

 

> The parameter description, for prompting,

> will surely make it to the next version.

 

Sorry, but I am still not sure what you are planning exactly. (let's put back the default value stuff for a while)

 

Are you planning to implement prompting in 0.3.3?

 

Are you planning to enhance 0.3.3 to support

applications which need parameter prompting?

Will there be an API which allows the application

to query the parameter description from the report

engine?

 

Thanks again!

Bernd

 

 

By: Teodor Danciu - teodord

RE: RE3: automatic parameter prompting and va

2002-06-24 02:13

 

Hi,

 

In the 0.3.3 version, I plan to add a

public String getDescription()

method in the JRParameter interface.

 

This will allow the users to put a short text

description for each parameter in the XML report

design and then retrieve it at runtime,

for prompting purposes.

 

Maybe an additional parameter flag would be useful

in order to mark those parameters for which the

parent application should NOT prompt for a value.

I imagine that at some point, there would be

parameters that have to be avoiding when

prompting for values.

 

That's all for the moment.

 

Thank you,

Teodor

 

 

 

By: Bernd Proissl - berndproissl

RE: automatic parameter prompting and validat

2002-06-24 02:40

Hi, tanks for your answer.

 

No I understand your statements :)

 

> Maybe an additional parameter flag would be useful

> in order to mark those parameters for which the

> parent application should NOT prompt for a value.

IMHO: yes. e.g. I use a parameter to pass the current date/time to the report.

 

I will think about an generic interface for a GUI based parameter prompter...

 

Bernd

 

 

 

By: Bernd Proissl - berndproissl

RE:automatic parameter prompting and validat

2002-07-09 01:29

I built a small framework to create JPanes with JLabels, JTextFields, JComboBoxes and JButtons build from a simple -mostly text based- descriptions. This allows easy creation of GUIs for parameter prompting.

 

I am allowed to publish this code under LGPL. Teodor, are you interested to put this in your package or should I open a new project?

 

Bernd

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