Skip to Content
B L

Report Engine Version

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 27, 2018 at 03:25 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 18, 2018 at 12:49 AM

    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

    Add comment
    10|10000 characters needed characters exceeded