I am using the report designer and due to the nature of my database, i am selecting data from the database from a view and not a table. The select statement below selects data from 3 views.
select * from opsummary_diverter_a, opsummary_diverter_b, opsummary_diverter_c
I have a refresh button on my screen that runs some code to alter the tables…
fpmi.db.runUpdateQuery("ALTER VIEW opsummary_diverter_b AS " … … …
I have polling turned off on my dataset to help with performance.
Is there a way I can force a refresh of the dataset as the last thing I do in the buttons
mouseClicked action?
Thanks
Of course! You can force a refresh on any property that is bound to a SQL query with:
fpmi.db.refresh(component, "propertyName")
Check out the help manual under Technical Reference->Jython->Built-in Modules (fpmi.*)->fpmi.db
On a simular note…
Is it possible to call an event externally?
For example, say i have a script behind Button 1 and Button 2 that both do something different.
Whenever button 1 is pressed, button 2 also needs to be pressed. Can I call the Button2.MouseClicked event from button 1 script?
For most events, this is quite involved. But for buttons in particular, it’s easy.
Button2.doClick()
[quote=“Carl.Gould”]For most events, this is quite involved. But for buttons in particular, it’s easy.
Button2.doClick()
Just to add…
I found that this will only work if you have your code in the action performed event. I originally had it in the mouseClicked event and was not getting any results.
Thanks for the help!