Maximo List Archive

This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.



How to Update Data from Within a BIRT report

From: e11271b (2012-06-20 19:24)

I have a scenario where I need to update a database field when a sites
run a particular custom report.
I know there are some build in reports that do something similar, but I
was wondering if someone could explain the process of enabling a report
to be able to update the database. Or, point me to a resource.
Thank You..


From: Pankaj Bhide (2012-06-20 14:21)

Hello,
This  is easy (However, I am not sure why do you want to update using  BIRT reports, against other possible options). Anyway....
1) Within your DataSet, you can override "open/fetch..." method depending upon your requirement (e.g. if you want to update row by row)
2) Use following javascript:
 sqlUpdt=MXReportTxnProvider.create(this.getDataSource().getName())); sqlStmt=myUpdt.createStatement(); sqlStmt.setQuery("update .<table>... set .<values>.. where ...");  // your update statement myUpdt.save();
3) Depending upon the appropriate requirement, you can update outside of DataSet.
Of-course, the above is supposed to work with IBM supplied report libraries that can work with Rel 6,7.
I hope this helps.
Thanks 
Pankaj --------------------- On Wed, 6/20/12, e11271b <ebennett@gfs.com> wrote:
From: e11271b <ebennett@gfs.com>
Subject: [MAXIMO List] How to Update Data from Within a BIRT report
To: MAXIMO@yahoogroups.com
Date: Wednesday, June 20, 2012, 7:24 PM


 




I have a scenario where I need to update a database field when a sites
run a particular custom report.
I know there are some build in reports that do something similar, but I
was wondering if someone could explain the process of enabling a report
to be able to update the database. Or, point me to a resource.
Thank You..







From: e11271b (2012-06-21 15:44)

Thank you very much for your reply. Be aware that I'm very very new to Maximo.
There is an incentive report that is ran at all sites in an organization, and I need to be able to identify when the report has been run by the supervisor of each site. Then the idea is to have a process run that updates our compensation system when it has been identified that all sites have ran the report.
Maybe there is a much better way to do what I want, and I am just not aware of it.
Thanks again for the reply!
--- In MAXIMO@yahoogroups.com, Pankaj Bhide <pankajbhide@...> wrote:
>
> Hello,
> This  is easy (However, I am not sure why do you want to update using  BIRT reports, against other possible options). Anyway....
> 1) Within your DataSet, you can override "open/fetch..." method depending upon your requirement (e.g. if you want to update row by row)
>
> 2) Use following javascript:
>  sqlUpdt=MXReportTxnProvider.create(this.getDataSource().getName())); sqlStmt=myUpdt.createStatement(); sqlStmt.setQuery("update .<table>... set .<values>.. where ...");  // your update statement myUpdt.save();
> 3) Depending upon the appropriate requirement, you can update outside of DataSet.
> Of-course, the above is supposed to work with IBM supplied report libraries that can work with Rel 6,7.
> I hope this helps.
> Thanks 
> Pankaj --------------------- On Wed, 6/20/12, e11271b <ebennett@...> wrote:
>
> From: e11271b <ebennett@...>
> Subject: [MAXIMO List] How to Update Data from Within a BIRT report
> To: MAXIMO@yahoogroups.com
> Date: Wednesday, June 20, 2012, 7:24 PM
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>  
>
>
>
>
>
>
>
>
>
> I have a scenario where I need to update a database field when a sites
>
> run a particular custom report.
>
>
>
> I know there are some build in reports that do something similar, but I
>
> was wondering if someone could explain the process of enabling a report
>
> to be able to update the database. Or, point me to a resource.
>
>
>
> Thank You..
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>