managing your report dependencies on the universe, with custom code dell stinnett, bocp-boe zc...

17
Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Upload: ashlie-mason

Post on 20-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOEZC Sterling

Page 2: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Agenda• Introduction

• Universe and Connection Management Issues

• In-memory Dataset

• Load Data

• View Data in Crystal

• Conclusion

• Q & A

Page 3: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Introduction• ZC Sterling

• A leading provider of mortgage outsourcing services• Hazard insurance• Real estate tax servicing• Voluntary products• Customer care

• BusinessObjects XI R2• Migrated from Seagate Info 7.5 in 2006• Custom programs• Named user licensing• Upgrading to 3.1 later this year

Page 4: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Report Management Issues• What’s affected by

• Universe changes• Connection changes• Database changes

• Why you need to know this• Analyze impact of changes• Know what to test after changes• Prevent “Broken” reports

Page 5: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

In-Memory Dataset

.NET solution uses five tables in an ADO.NET dataset

Page 6: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Load Data• “You can’t get there from here”

• There’s no simple query that will get Connection, Universe, and Report info all together

• Load a list of connections

• Load a list of universes

• Load all Webi report templates

• Load Crystal report templates that use a universe.

Page 7: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Program Flow

Page 8: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Load Connection List• Get the name and ID of every Connection in the system

string qry = "Select SI_ID, SI_NAME from CI_APPOBJECTS where " +

"SI_Kind = 'MetaData.DataConnection'";

using (InfoObjects conns = _common.BOEInfoStore.Query(qry))

{

dsData.Connection.AddConnectionRow(0, "*All");

for (int i = 1; i <= conns.Count; i++)

{

dsData.Connection.AddConnectionRow(conns[i].ID, conns[i].Title);

}

}

Page 9: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Load Universe List• Get the Name and ID of every universe in the system

string qry = "Select SI_ID, SI_Name from CI_APPOBJECTS where " + "SI_Kind = 'Universe'";using (InfoObjects unvs = _common.BOEInfoStore.Query(qry)){ if (unvs.Count > 0) { dsData.Universe.Clear(); //add the first row for the filter display dsData.Universe.AddUniverseRow(0, "*All"); for (int i = 1; i <= unvs.Count; i++) { dsData.Universe.AddUniverseRow(unvs[i].ID, unvs[i].Title); } }}

Page 10: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Load Webi Report Datastring query = "Select SI_ID, SI_NAME, SI_PARENTID, SI_UNIVERSE," + "SI_OWNER From CI_INFOOBJECTS Where SI_KIND = 'Webi' and " + "SI_Instance = 0";using (InfoObjects reports = _common.BOEInfoStore.Query(query)){ for (int i = 1; i <= reports.Count; i++) { dsData.Report.AddReportRow(reports[i].ID, reports[i].Title, _common.GetPathFromFolderID(reports[i].ParentID), "Webi", reports[i].Properties["SI_OWNER"].Value.ToString()); //Convert to Webi so that we can get to the properties we need. using (Webi rpt = (Webi)reports[i]) { for (int j = 1; j <= rpt.Universes.Count; j++) { dsData.ReportUniverses.AddReportUniversesRow( Convert.ToInt32(rpt.Universes[j].ToString()), rpt.ID); } } }}

Page 11: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Load Crystal Report Datastring qry = "Select SI_ID, SI_NAME, SI_PROCESSINFO, SI_OWNER from CI_INFOOBJECTS where”+ “SI_KIND

= 'CrystalReport' and "SI_INSTANCE = 0";using (InfoObjects rpts = _common.BOEInfoStore.Query(qry)){ for (int i = 1; i <= rpts.Count; i++) { using (InfoObject rpt = rpts[i]) { owner = rpt.Properties["SI_OWNER"].Value.ToString(); for (int j = 1; j <= rpt.ProcessingInfo.Properties.Count; j++) { prop = rpt.ProcessingInfo.Properties[j]; if (prop.Name == "SI_UNIVERSE_INFO") { dsData.Report.AddReportRow(rpt.ID, rpt.Title, _common.GetPathFromFolderID(rpt.ParentID), "Crystal", owner); unvCount = prop.Properties.Count; for (int x = 2; x <= unvCount; x++) { unvCuid = prop.Properties[x].ToString(); addCrystalUniverse(rpt.ID, unvCuid); } } } } }}

Page 12: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Load Crystal Report Data (continued…)

• The Universe in ProcessingInfo.Properties is a CUID

private void addCrystalUniverse(int rptID, string cuid)

{

string query = "Select SI_ID from CI_APPOBJECTS where " +

"SI_CUID = '" + cuid + "'";

using (InfoObjects unvs = _common.BOEInfoStore.Query(query))

{

dsData.ReportUniverses.AddReportUniversesRow(unvs[1].ID,

rptID);

}

}

Page 13: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Report Creation

Page 14: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

View Report

Page 15: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

View Report

public DependencyCheckViewer(DependencyCheckData dsData, int selectedUniverse)

{

InitializeComponent();

rpt = new DependencyCheckReport();

//set the datasource

rpt.SetDataSource(dsData);

//set the parameters

rpt.ParameterFields["Universe"].AllowCustomValues = true;

rpt.ParameterFields["Universe"].CurrentValues.Clear();

rpt.ParameterFields["Universe"].CurrentValues.AddValue(selectedUniverse);

rptViewer.ReportSource = rpt;

}

Page 16: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Conclusion• The SDK provides a means to retrieve data to determine

which connections and universes reports depend on.

• Multiple InfoStore queries must be used to get all of the information needed to determine connection and universe dependencies.

• It’s not difficult to display the information gathered from InfoStore queries by using Crystal embedded in an application.

Page 17: Managing Your Report Dependencies on the Universe, with custom Code Dell Stinnett, BOCP-BOE ZC Sterling

Q & A• Questions

• Dell Stinnett, Sr. Software Engineer, ZC Sterling• I will repeat questions so that everyone can hear

• Contact Info• [email protected]• http://www.geocities.com/geekgurl7/Intro.html

• Java example will be posted to Diamond site soon• https://www.sdn.sap.com/irj/sdn/businessobjects• Robert Horne – [email protected]