Symptom
User could not get report history information via Crystal Reports .NET SDK or RAS .NET SDK
Environment
- SAP BusinessObjects BI Platform 4.0 SP11
- SAP BusinessObjects BI Platform 4.1 SP05
- SAP Crystal Reports, developer version for Microsoft Visual Studio SP12
Resolution
Install the relevant Support Package or Patch. See the Support Packages & Patches section for details and available patches.
- SAP BusinessObjects BI Platform 4.0 SP11
- SAP BusinessObjects BI Platform 4.1 SP05
- SAP Crystal Reports, developer version for Microsoft Visual Studio SP13
New Behavior:
-
Add API HistoryInfos to RAS.Net & CR.Net SDK, HistoryInfos is a collection of HistoryInfo. Each HistoryInfo contains the engine build version and saved date of each save.
-
RAS .NET SDK
ReportClientDocument.HistoryInfos[i].SavedDate -
ReportClientDocument.HistoryInfos[i].BuildVersion
-
CR .NET SDK
ReportDocument.HistoryInfos[i].SavedDate -
ReportDocument.HistoryInfos[i].BuildVersion
-
Note:
NOTE: These values are Read Only and are only updated when the reports are saved in Crystal Reports Designer.
Jave has these properties available in the IReportStatistics. Its not a history, but rather the stats from the most recent save:
IReportStatistics:
- createDate
- DataFetchDate
- LastPrintedDate
- reportversionletter
- reportversionmajor
- reportversionminor
- revisionnumber
- savedbyName
- totaleditingtime
C# code sample:
Add a Combo box to your project and use the following to list the build version and date history:
cbLastSaveHistory.Text = "";
try
{
// Read File Details from CFileInfo Object
for (int x = 0; x < rpt.HistoryInfos.Count; x++)
{
cbLastSaveHistory.Items.Add(rpt.HistoryInfos[x].BuildVersion.ToString() + ": Date: " + rpt.HistoryInfos[x].SavedDate.ToString());
}
cbLastSaveHistory.SelectedIndex = 0;
//SP 13
//• RAS .NET SDK
//ReportClientDocument.HistoryInfos[i].SavedDate
//ReportClientDocument.HistoryInfos[i].BuildVersion
//• CR .NET SDK
//ReportDocument.HistoryInfos[i].SavedDate
//ReportDocument.HistoryInfos[i].BuildVersion
}
catch (Exception ex)
{
MessageBox.Show("Error: " + ex.Message);
}
Example of what you see in the list:
-
13.0.10.1385: Date: 2015.01.27 16:59:49 GMT Standard Time
-
11.5.11.1470: Date: 2014.12.12 10:55:12 GMT Standard Time
-
11.5.8.826: Date: 2010.10.22 15:59:18 GMT Standard Time
To get the Revision of the report use the following:
lblRPTRev.Text = rpt.SummaryInfo.RevisionNumber.ToString();
Keywords
Crsytal Reports, Minor version, Revision number , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem