Jump to content
We've recently updated our Privacy Statement, available here ×

PluginBuildingProblems :-)


Recommended Posts

By: C-Box - c-box

PluginBuildingProblems :-)

2005-03-11 04:10

Hi Giulio,

 

i open a new thread to post my problems I encounter while building my DataBasePlugin for IReport - so I can post any new question here. :-)

 

so the first (new) question is:

 

I load reports via my Plugin directly from database into IReport... works fine so far. When I update the changed report I have to reload the report from database again, because some IDs changed within the ReportObject.

So I load easily a whole ReportSet again (a ReportSet is a kind of project... holding multiple Reports that build the ReportSet)... when RELOADING the whole reports the anoying Message appears (from: javax.swing.JOptionPane.showConfirmDialog(this, filename +"nnThis file has been modified outside iReport.Do you want reload it?","iReport",javax.swing.JOptionPane.INFORMATION_MESSAGE);)

 

in normal cases it's okay to ask, but not in this - because I know that each report of the set has changed... so could you please add a parameter like (boolean doAskForReload) to your public method "checkForModifiedFiles" within mainframe class that when set to true (normal state) the question appears and when set to false then just reload without question?

 

I guess a very little change but a great help for me. (now I must click up to 10 times of "YES" when I reload a ReportSet from DataBase.

 

waiting for your comments + tia + greetings from Germany

 

C-Box

 

 

By: C-Box - c-box

RE: PluginBuildingProblems :-)

2005-03-17 07:37

Hi Giulio,

 

it's me again.

 

I have (of course) another problem:

 

I must delete the temporarily stored files when closing my plugin - that's no problem. But when not logging off from the Database, but closing IReport instead, a method of my plugin must be called yet.

 

So I suggest:

 

make a "close" method to your interface that a plugin must implement. And when closing the whole application IReport should iterate through all registered plugins and call the close method.

 

what do you think about it?

Greetings from Germany

C-Box

 

 

By: C-Box - c-box

RE: PluginBuildingProblems :-)

2005-03-21 02:39

Seems to become a monologue here!?!?

 

What about the "isDirty" method you provide on the Report Object.... I searched the source for it and guess its always set to true when something on the report changes - but it doesn't work like I imagine (and I guess you wanted).

 

Here my Szenario:

load a set of 10 reports... changing one of them .. but don't store... after that I load another set of 8 reports -- but one report of the new set is the same like in the old set ( I do reuse SubReports in different sets to avoid double definitions of the same presentation logic)... now I would overwrite my changes with the old version from database... so I thought, when loading a report into IReport I could check the "isDirty" method... but that method returns FALSE although I changed a static text fields text and also its position....

 

So Giulio, could you please take a look on the "isDirty" method so that I get to know changes on a report when the report isn't stored. In your interface "ReportListener" you described it as follows:

/**

* This listener handle all report events regarding selection and changes.

* A single event (excluse reportElementsSelectionChanged) can mark

* a document as "dirty".

*

* @author Giulio Toffoli

*/

 

 

tia + again sunny greetings from Germany

C-Box

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