Custom Archive Solution for BusinessObjects XI

Custom Archive Solution for
BusinessObjects XI
Dell Stinnett, ZC Sterling
Topics
Introduction
Configuration
Daily Process
Viewer
Q&A
Slide 3
Copyright © 2006 Business Objects S.A. All rights reserved.
Introduction
ZC Sterling
 A leading provider of mortgage outsourcing services
• Hazard insurance
• Real estate tax servicing
• Voluntary Products
• Customer care
• Best Shores
BusinessObjects XI R2
 Recent migration from Seagate Info 7.5
 Custom programs
 Folders organized by product line – Tax, Hazard, etc.
Slide 4
Copyright © 2006 Business Objects S.A. All rights reserved.
Why Archive?
Regulatory Requirements
 Tax data – keep for 7 years
 Sarbanes-Oxley
Historical Research
 Claims
 Proof that letters were created
 Compare last year to this year
Slide 5
Copyright © 2006 Business Objects S.A. All rights reserved.
Solution Requirements
Day limits
 Default per product line
 Customizable by report
Online vs. offline storage
Automatic daily process
 Scheduled inside BusinessObjects XI
User interface to view reports
 Search by:
• Report title
• Date
• Parameter values
 Search active and archived reports
Slide 6
Copyright © 2006 Business Objects S.A. All rights reserved.
Utility Classes
Provide common functionality and structures
BOECommonInfo
 Connection to Central Management Server
 Translate Names to ID’s and vice-versa
 Get info about all sub-folders or reports in a specified folder
BOEFolderInfo structure
 Foldername
 ID
 ParentID
BOEReportInfo structure




Slide 7
Reportname
ID
ParentID
Kind
Copyright © 2006 Business Objects S.A. All rights reserved.
Topics
Introduction
Configuration
Daily Process
Viewer
Q&A
Slide 8
Copyright © 2006 Business Objects S.A. All rights reserved.
Configuration Tables
Slide 9
Copyright © 2006 Business Objects S.A. All rights reserved.
Demo - Configuration Application
Utility for setting up products and Report Definitions
Slide 10
Copyright © 2006 Business Objects S.A. All rights reserved.
1/2
Demo - Configuration Application
Slide 11
Copyright © 2006 Business Objects S.A. All rights reserved.
2/2
Load Report Definitions
Starts at the product base folder
Recursive method walks through folders to get report information
private void LoadFromFolder(Int32 parentID,
Int32 productFolderID, Int32 productKey)
{
List<BOEFolderInfo> folders;
List<BOERptInfo> reports;
folders = _common.GetFolderList(parentID);
foreach (BOEFolderInfo folder in folders)
{
LoadFromFolder(folder.ID, productFolderID, productKey);
reports = _common.GetReportsInFolder(folder.ID);
if (reports.Count > 0)
LoadReports(reports, productKey);
}
}
Slide 12
Copyright © 2006 Business Objects S.A. All rights reserved.
Topics
Introduction
Configuration
Daily Process
Viewer
Q&A
Slide 13
Copyright © 2006 Business Objects S.A. All rights reserved.
Daily Report Archive Process
For Each Report Definition
Add new active instances to Report_Instance table
Determine number of days active reports are kept
Move old report instances to archive folders
On first of month, move very old reports from archive to
offline storage
Slide 14
Copyright © 2006 Business Objects S.A. All rights reserved.
Determining Output Filestore Path
Used to determine actual path to active reports
private string getOutputServerPath()
{
string result = string.Empty;
string query = "Select * From CI_SYSTEMOBJECTS " +
"Where SI_FRIENDLY_NAME like ‘Output%'";
using (InfoObjects servers =
_common.BOEInfoStore.Query(query))
{
if (servers.Count >= 1)
{
Server server = (Server)servers[1];
FileServerAdmin serverAdmin =
new FileServerAdmin(server.ServerAdmin);
result = serverAdmin.RootDirectory;
}
}
return result;
}
Slide 15
Copyright © 2006 Business Objects S.A. All rights reserved.
Get Report Info for Archive - Report
For each report, find the instances
private void SaveRptInfo(int rptID,
DateTime lastArchive)
{
string compareDate =
(lastArchive.ToUniversalTime()).ToString(
"yyyy.MM.dd.hh.mm.ss");
string query =
"Select SI_NAME, SI_ID, SI_DESCRIPTION, " +
"SI_UPDATE_TS, SI_FILES, SI_PROMPTS " +
"From CI_INFOOBJECTS Where SI_INSTANCE_OBJECT=1 " +
"And SI_SCHEDULE_STATUS=1 " +
"And SI_UPDATE_TS>='" + compareDate + "'" +
"And SI_PARENTID=" + rptID +
…
Save the report information
Slide 16
Copyright © 2006 Business Objects S.A. All rights reserved.
Get Report Info for Archive - Parameters
Save the parameter information
private void SaveParamInfo(Report rpt, int instanceKey)
{
ReportParameters paramList = rpt.ReportParameters;
ReportParameterRangeValue rangeParam;
ReportParameterSingleValue singleParam;
for (int i = 1; i <= paramList.Count; i++)
{
if ((paramList[i].ParameterName.Substring(0, 2).ToUpper() != "PM") &&
(paramList[i].CurrentValues.Count > 0))
{
if (paramList[i].SupportsRangeValues)
{
rangeParam = paramList[i].CurrentValues[1];
SaveRangeParamData(paramList[i].ParameterName,
rangeParam.FromValue.ToString(),
rangeParam.ToValue.ToString(), instanceKey);
}
else
{
singleParam = paramList[i].CurrentValues[1];
SaveSingleParamData(paramList[i].ParameterName,
singleParam.Value.ToString(), instanceKey);
}
…
Slide 17
Copyright © 2006 Business Objects S.A. All rights reserved.
Copy Report File to Archive
Report instance date is earlier than today – days to keep
private void CopyFile(string newPath, Report rpt)
{
string fromFile =
rpt.Files[1].Name.Replace("frs://Output", _outputRoot);
fromFile = fromFile.Replace('/', '\\');
FileInfo fi = new FileInfo(fromFile);
int i = fromFile.LastIndexOf('\\');
string toFile = newPath + fromFile.Substring(i + 1);
fi.CopyTo(toFile, true);
}
Slide 18
Copyright © 2006 Business Objects S.A. All rights reserved.
Topics
Introduction
Configuration
Daily Process
Viewer
Q&A
Slide 19
Copyright © 2006 Business Objects S.A. All rights reserved.
Archive Viewer Application
When loading application
 Get a list of reports to which the user has view rights
User selects
 Report title
 Date range in which the report was run
Parameter selection/search







Slide 20
Is any value
Starts with
Ends with
Contains
Equals
Is less than
Is greater than
Copyright © 2006 Business Objects S.A. All rights reserved.
Demo – Search and View Application
Slide 21
Copyright © 2006 Business Objects S.A. All rights reserved.
Q&A
Questions
 Dell Stinnett, Senior Software Engineer, ZC Sterling
 I will repeat questions to ensure everyone can hear
Contact information
 Email: [email protected]
 Website: http://www.geocities.com/geekgurl7/ Intro.html
Slide 22
Copyright © 2006 Business Objects S.A. All rights reserved.