Skip to Content

I have a question about the crystal report version.

I have many files created with crystal report 9 version.
and program changing VB6 to C # .NET + WPF whit Crystal Reports for .Net.
The question is ..

1. created in version 9 file -> Print with Crystal Reports for .Net.
2. created in version 9 file -> Open the file with Crystal Report 2013 and save it. -> Print with Crystal Reports for .Net.
3. Re-create all the files to Crystal Report 2013 and print using Crystal Reports for .Net.

Are there things I need to be aware of or something that might be a problem with the print?

I'm sorry about the awkward part of using Google Translator.

thanks.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Mar 20, 2018 at 02:35 PM

    I do this to check the version, there are other ways to find out if another version is installed.:

    public frmMain()
    {
    //
    // Required for Windows Form Designer support
    //
    InitializeComponent();
    
    //PerformanceCounter pcPrivateBytes = new PerformanceCounter();
    //PerformanceCounter pcHandles = new PerformanceCounter();
    //PerformanceCounter pcThreads = new PerformanceCounter();
    
    //pcThreads.CategoryName = "Threads";
    //pcThreads.InstanceLifetime = PerformanceCounterInstanceLifetime.Process;
    //pcThreads.MachineName = Name;
    //pcThreads.InstanceName = Application.ProductName;
    //pcHandles.CategoryName = "Handles";
    //pcHandles.InstanceLifetime = PerformanceCounterInstanceLifetime.Process;
    //pcHandles.MachineName = Name;
    //pcHandles.InstanceName = Application.ProductName;
    //pcPrivateBytes.CategoryName = "pcPrivateBytesName";
    //pcPrivateBytes.InstanceLifetime = PerformanceCounterInstanceLifetime.Process;
    //pcPrivateBytes.MachineName = Name;
    //pcPrivateBytes.InstanceName = Application.ProductName;
    
    
    //pcThreads.CounterName = "Thread Count";
    //pcHandles.CounterName = "Handle Count";
    //pcPrivateBytes.CounterName = "Private Bytes";
    
    //tsslThread.Text = string.Format("Threads: {0}", pcThreads.NextValue().ToString());
    //tsslHandles.Text = string.Format("Handles: {0}", pcHandles.NextValue().ToString());
    
    //// Divide the return of Private Bytes to something we will recognize.
    //tsslPrivateBytes.Text = string.Format("Private Bytes: {0}", (pcPrivateBytes.NextValue() / 1000).ToString());
    
    // SP 17 - SAP NOTE 2321691 
    //System.Drawing.Drawing2D.InterpolationMode CRInterpolMode = new System.Drawing.Drawing2D.InterpolationMode();
    //CRInterpolMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
    
    //crystalReportViewer1.InterpolationMode = CRInterpolMode;
    
    LstInterpolationMode.Enabled = true;
    Array CRinterpolationMode = Enum.GetValues(typeof(System.Drawing.Drawing2D.InterpolationMode));
    foreach (object obj in CRinterpolationMode) 
    {
        //CRInterpolMode.GetTypeCode(CRinterpolationMode);
        LstInterpolationMode.Items.Add(obj);
    }
    LstInterpolationMode.SelectedItem = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
    
    if (System.Globalization.RegionInfo.CurrentRegion.IsMetric)
    {
        isMetric = 567;
        isMetricTwips = 0.0017639; // centimeters
    }
    else
    {
        isMetric = 1440;
        isMetricTwips = 1440;
    }
    
    Array valArray = Enum.GetValues(typeof(CrystalDecisions.ReportAppServer.CommonControls.CeLocale));
    foreach (object obj in valArray)
    {
        lstCeLocale.Items.Add(obj);
    }
    
    Array valArray1 = Enum.GetValues(typeof(CrReportExportFormatEnum));
    
    foreach (object obj in valArray1)
    {
        lstExportFormatType.Items.Add(obj);
    }
    
    Array valFocusArray1 = Enum.GetValues(typeof(CrReportExportFormatEnum));
    foreach (object obj in valArray1)
    {
        lstExportFormatType.Items.Add(obj);
    }
    
    foreach (Assembly MyVerison in AppDomain.CurrentDomain.GetAssemblies())
    {
        if (MyVerison.FullName.Substring(0, 38) == "CrystalDecisions.CrystalReports.Engine")
        {
            //File:             C:\Windows\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\13.0.2000.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll
            //InternalName:     Crystal Reports
            //OriginalFilename: 
            //FileVersion:      13.0.9.1312
            //FileDescription:  Crystal Reports
            //Product:          SBOP Crystal Reports
            //ProductVersion:   13.0.9.1312
            //Debug:            False
            //Patched:          False
            //PreRelease:       False
            //PrivateBuild:     False
            //SpecialBuild:     False
            //Language:         English (United States)
    
            System.Diagnostics.FileVersionInfo fileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(MyVerison.Location);
            txtRuntimeVersion.Text += fileVersionInfo.FileVersion.ToString();
            // check if CrsytalDecisions.Enterprise dll's can be loaded ( Anything but Cortez - managed reporting )
            if (fileVersionInfo.FileVersion.Substring(0, 2) == "13")
            {
                btnRasOpen.Enabled = false;
            }
            CRVer = fileVersionInfo.FileVersion.Substring(0, 2);
            //return;
    
            // check if debug mode
            var assembly = Assembly.LoadFrom(@"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ClientDoc\13.0.3500.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.ClientDoc.dll");
            object[] attribs = assembly.GetCustomAttributes(typeof(DebuggableAttribute), false);
    
            // If the 'DebuggableAttribute' is not found then it is definitely an OPTIMIZED build
            if (attribs.Length > 0)
            {
                // Just because the 'DebuggableAttribute' is found doesn't necessarily mean
                // it's a DEBUG build; we have to check the JIT Optimization flag
                // i.e. it could have the "generate PDB" checked but have JIT Optimization enabled
                DebuggableAttribute debuggableAttribute = attribs[0] as DebuggableAttribute;
                if (debuggableAttribute != null)
                {
                    bool HasDebuggableAttribute = true;
                    var IsJITOptimized = !debuggableAttribute.IsJITOptimizerDisabled;
                    var BuildType = debuggableAttribute.IsJITOptimizerDisabled ? "Debug" : "Release";
    
                    // check for Debug Output "full" or "pdb-only"
                    var DebugOutput = (debuggableAttribute.DebuggingFlags &
                                    DebuggableAttribute.DebuggingModes.Default) !=
                                    DebuggableAttribute.DebuggingModes.None
                                    ? "Full" : "pdb-only";
                }
            }
            else
            {
                var IsJITOptimized = true;
                var BuildType = "Release";
            }
        }
    }
    
    Don
    
    Add comment
    10|10000 characters needed characters exceeded

  • Mar 16, 2018 at 02:10 PM

    Hi O,

    Go here and get SP 22:

    https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

    On that page is a test app for printing:

    Printing Crystal Reports in .NET

    That should work for you and answer all your questions

    Don

    Add comment
    10|10000 characters needed characters exceeded

    • I am using SP20 now. (VS2017 C# + WPF)
      If replacing with SP22, Is there anything to check for already deployed programs?
      I created an install file using installshield and CRforVS_mergemodules_13_0_20.zip
      and it is already installed on many user machines.

      sorry my bad english..
      i used google translate..

  • Mar 19, 2018 at 10:08 AM

    There should be no need to convert the rpt files -- they should run as-is under the new object model.

    There's a possible minor problem when it comes to default values for parameters. In Crystal 9, the default value is assumed to be the 1st in a list of values. In later versions, there's a separate default value property. So the user gets a blank default value when running a Crystal 9 report that has a list of parameter values.

    Add comment
    10|10000 characters needed characters exceeded