Archive Reports Automtically
Answered
Hi,
I am trying to create a process that will automatically archive reports that are not in use for the last 3 months.
Is there a way to export YF reports using an outside command (and also for private reports)?
Also, where can i locate all the reports XML in case i wish to BU those report files before deleting them.
Thanks!
Hi Tal,
Looking through the debug logging for this action, it appears that Yellowfin is doing a few more actions than simply switching the status all of which might have an effect on this error.
This is probably the line that is causing the error (there is a similar delete for the sub-query that you will need to restore as well):
Looking at a report in this table that contains a sub-query we can see this link (not the same report because the actual row was deleted :) ):
I imagine that restoring this will make this accessible, but I have attached a text file containing all of the UPDATE/DELETE/INSERT queries ran in course of the delete action.
In this example 63817 is the primary report, while 63818 is the sub-query
Regards,
Nathan
Hi Tal,
Looking through the debug logging for this action, it appears that Yellowfin is doing a few more actions than simply switching the status all of which might have an effect on this error.
This is probably the line that is causing the error (there is a similar delete for the sub-query that you will need to restore as well):
Looking at a report in this table that contains a sub-query we can see this link (not the same report because the actual row was deleted :) ):
I imagine that restoring this will make this accessible, but I have attached a text file containing all of the UPDATE/DELETE/INSERT queries ran in course of the delete action.
In this example 63817 is the primary report, while 63818 is the sub-query
Regards,
Nathan
Hi Tal,
Within the configuration database, all reports are saved as a series of rows between multiple tables.
When a report is deleted, a flag within the database is set to "DELETED", though the entire definition for this report remains. So technically the reports are always contained within an archive, though they are never stored as XML, unless you are employing the Export/Import tool.
In terms of automating the export of reports, you can use web-service calls to achieve this. This article contains the foundation to get you going on this:
http://wiki.yellowfin.com.au/display/USER73/Administration+Service
This is just a preliminary overview of all of this, so please let me know if you would like more information on anything.
Regards,
Nathan
Hi Tal,
Within the configuration database, all reports are saved as a series of rows between multiple tables.
When a report is deleted, a flag within the database is set to "DELETED", though the entire definition for this report remains. So technically the reports are always contained within an archive, though they are never stored as XML, unless you are employing the Export/Import tool.
In terms of automating the export of reports, you can use web-service calls to achieve this. This article contains the foundation to get you going on this:
http://wiki.yellowfin.com.au/display/USER73/Administration+Service
This is just a preliminary overview of all of this, so please let me know if you would like more information on anything.
Regards,
Nathan
Hi Nathan,
I did an experiment in our dev environment and deleted a report with two appends from YF interface.
After deleting the report i tried "reviving" it by updating the ReportStatusCode in ReportHeader table from DELETED to OPEN for the 3 records (1 - Report, 2- Appends).
After the update the report is showing in the Browse menu, but when i try to run it i get the error message attached.
Is there something else i need to do in order for the report to be operational again?
Thanks!
Hi Nathan,
I did an experiment in our dev environment and deleted a report with two appends from YF interface.
After deleting the report i tried "reviving" it by updating the ReportStatusCode in ReportHeader table from DELETED to OPEN for the 3 records (1 - Report, 2- Appends).
After the update the report is showing in the Browse menu, but when i try to run it i get the error message attached.
Is there something else i need to do in order for the report to be operational again?
Thanks!
Hi Tal,
Sorry for the delay on this. In my tests, simply switching this to OPEN worked for me. What error does this correspond to in the yellowfin.log? (youryellowfin/appserver/logs)
Regards,
Nathan
Hi Tal,
Sorry for the delay on this. In my tests, simply switching this to OPEN worked for me. What error does this correspond to in the yellowfin.log? (youryellowfin/appserver/logs)
Regards,
Nathan
Hi Nathan,
I tried it again and got the same error message.
The following error message appears in the log:
YF:2017-04-06 08:31:07:ERROR (ReportRunner:runReport) - Error running report: java.lang.NullPointerException
java.lang.NullPointerException
at com.hof.report.AbstractReportContext.getFormatter(AbstractReportContext.java:427)
at com.hof.report.result.modifier.FormatResultSetModifier.modifyResult(FormatResultSetModifier.java:36)
at com.hof.report.result.ReportResultSetUtil.applyModifiers(ReportResultSetUtil.java:136)
at com.hof.mi.process.ReportRunner.J(ReportRunner.java:972)
at com.hof.mi.process.ReportRunner.runReport(ReportRunner.java:248)
at com.hof.mi.util.background.ReportQueueItem.process(ReportQueueItem.java:69)
at com.hof.mi.util.background.ReportQueueItem.process(ReportQueueItem.java:30)
at com.hof.mi.util.background.ExecutionQueue$TaskRunner.call(ExecutionQueue.java:401)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Any ideas?
Thanks!
Hi Nathan,
I tried it again and got the same error message.
The following error message appears in the log:
YF:2017-04-06 08:31:07:ERROR (ReportRunner:runReport) - Error running report: java.lang.NullPointerException
java.lang.NullPointerException
at com.hof.report.AbstractReportContext.getFormatter(AbstractReportContext.java:427)
at com.hof.report.result.modifier.FormatResultSetModifier.modifyResult(FormatResultSetModifier.java:36)
at com.hof.report.result.ReportResultSetUtil.applyModifiers(ReportResultSetUtil.java:136)
at com.hof.mi.process.ReportRunner.J(ReportRunner.java:972)
at com.hof.mi.process.ReportRunner.runReport(ReportRunner.java:248)
at com.hof.mi.util.background.ReportQueueItem.process(ReportQueueItem.java:69)
at com.hof.mi.util.background.ReportQueueItem.process(ReportQueueItem.java:30)
at com.hof.mi.util.background.ExecutionQueue$TaskRunner.call(ExecutionQueue.java:401)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Any ideas?
Thanks!
Hi Tal,
After a bit of testing, it appears that reports with sub-queries actually create two rows in the configuration database, one for the primary query and one for the sub-query. These are linked by the "ParentReportId" row:
In order to restore this, you will need to update the status of both of these (there may be more but this worked in my test).
Please note that this is all testing, as there are many odd links between rows int eh configuration database, remember to always back up your config DB so you can roll back if something goes wrong!
Regards,
Nathan
Hi Tal,
After a bit of testing, it appears that reports with sub-queries actually create two rows in the configuration database, one for the primary query and one for the sub-query. These are linked by the "ParentReportId" row:
In order to restore this, you will need to update the status of both of these (there may be more but this worked in my test).
Please note that this is all testing, as there are many odd links between rows int eh configuration database, remember to always back up your config DB so you can roll back if something goes wrong!
Regards,
Nathan
Hi Nathan,
I know that i have additional record for each sub-query (append).
if you look at the post above i wrote that i updated the report and the sub-queries records status to open and i still get the error message,
Thanks!
Hi Nathan,
I know that i have additional record for each sub-query (append).
if you look at the post above i wrote that i updated the report and the sub-queries records status to open and i still get the error message,
Thanks!
Hi Tal,
My apologies, I was out of the office for the last couple of days. I will look into this now and get something to you in the next couple of hours.
Regards,
Nathan
Hi Tal,
My apologies, I was out of the office for the last couple of days. I will look into this now and get something to you in the next couple of hours.
Regards,
Nathan
Hi Tal,
Looking through the debug logging for this action, it appears that Yellowfin is doing a few more actions than simply switching the status all of which might have an effect on this error.
This is probably the line that is causing the error (there is a similar delete for the sub-query that you will need to restore as well):
Looking at a report in this table that contains a sub-query we can see this link (not the same report because the actual row was deleted :) ):
I imagine that restoring this will make this accessible, but I have attached a text file containing all of the UPDATE/DELETE/INSERT queries ran in course of the delete action.
In this example 63817 is the primary report, while 63818 is the sub-query
Regards,
Nathan
Hi Tal,
Looking through the debug logging for this action, it appears that Yellowfin is doing a few more actions than simply switching the status all of which might have an effect on this error.
This is probably the line that is causing the error (there is a similar delete for the sub-query that you will need to restore as well):
Looking at a report in this table that contains a sub-query we can see this link (not the same report because the actual row was deleted :) ):
I imagine that restoring this will make this accessible, but I have attached a text file containing all of the UPDATE/DELETE/INSERT queries ran in course of the delete action.
In this example 63817 is the primary report, while 63818 is the sub-query
Regards,
Nathan
Replies have been locked on this page!