cancel
Showing results for 
Search instead for 
Did you mean: 

Report Engine Version

bcla
Participant
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

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

Answers (1)

Answers (1)

former_member203619
Contributor
0 Kudos

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