on 11-21-2018 3:24 PM
Is there a way to determine what
CrystalDecisions.CrystalReports.Engine a report is expecting to use verses what a dot net application is referencing?
Thanks.
You can get the report history, if it's has it, this is new so it may not have any history, this way:
try
{
// Read File Details from CFileInfo Object
//cbLastSaveHistory.Sorted = true;
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; // rpt.HistoryInfos.Count - 1;
//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);
//MessageBox.Show("This report has no Save history");
cbLastSaveHistory.Text = "This report has no Save history";
}
You can then parse the info to get the version of the report was last saved in.
Examples:
12.4.0.967: Date: 2011.11.11 14:27:40 Pacific Standard Time
Or:
14.0.10.1493: Date: 2018.12.24 13:21:10 Pacific Standard Time
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not sure what it would be in .NET, but in java you would go:
int majVer = myReportClientDocument.getReportDocument.getMajorVersion();
int minVer = myReportClientDocument.getReportDocument.getMinorVersion();
Shawn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.