i-net Clear Reports

com.inet.report.schedule
Interface DynamicProperties


public interface DynamicProperties

This is the basic interface for classes used to create dynamic property instances for one single report.
With such a class you can execute one report multiple times with different parameters. The main idea is that you execute the report with different values for the prompts of the report.
Therefore you could load these values from a file or with an sql statement from the database.
The start() method will initialize this class. Here you could load the values from the file or send the sql statement to the database.
Then the scheduler will call next() to see if there are values for the report which will create a new instance of the report. If so getProperties() will be called to get these properties.
After a call of next() returned false the i-net Scheduler will now that there are no more property configuration for the report.
The method finish() will be called so that you can make a cleanup. E.g. you could close the ResultSet/Statement/Connection if you used a database query. Important: You should not use a DynamicProperties class for a task which has a CacheAction. The reason is that the number of reports which are stored in the cache with the different properties combination can increase by each run of the task. The i-net Scheduler can not figure out which reports of the cache of previous runs of the task can be deleted. This is because you could define two ScheduleReports (perhaps also in different tasks) which have other properties combinations and which should not be deleted.

Since:
i-net Crystal-Clear 6.0

Method Summary
 void finish()
          This method will be called after the report(s) have been renderes.
 java.util.Properties getProperties()
          Returns the properties which should be used for generating a report.
 boolean next()
          This method should return true if there is at least one more instance of properties which can be used to generate a report.
 void start()
          This method will be called before the report(s) will be rendered.
 

Method Detail

start

void start()
This method will be called before the report(s) will be rendered. Usually in this method the dynamic parameters will be catched. E.g. you could execute a statement which returns the properties which should be used.

See Also:
finish()

finish

void finish()
This method will be called after the report(s) have been renderes. E.g. you could close the resultset/statement/connection opened in start().

See Also:
start()

next

boolean next()
This method should return true if there is at least one more instance of properties which can be used to generate a report.

Returns:
True if there are still properties, false if there are no more.
See Also:
getProperties()

getProperties

java.util.Properties getProperties()
Returns the properties which should be used for generating a report. The properties object must contain key-value-pairs where the key is the name of the property for the report (e.g. "prompt0") and the value is the value for this property.

Returns:
a Properties object
See Also:
next()

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH