SAP Knowledge Base Article - Public

2251407 - ApplyLogOnInfo method didn't work as expected in Windows 8 32 bit system

Symptom

ApplyLogOnInfo method didn't work as expected in Windows 8 32 bit system

Environment

  • Windows 8 32 bit
  • SAP Crystal Report (CR) 2011
  • Microsoft Visual Studio 2010
  • SAP Crystal Reports, developer version for Microsoft Visual Studio

Reproducing the Issue

  1. Prepare Windows 8 32 bit client.
  2. Install Microsoft Visual Studio 2010 and SAP Crystal Reports, developer version for Microsoft Visual Studio.
  3. Create a Crystal report project with the following code: (note in the below sample the Crystal report is using XML file as data source)

    ReportDocument rdoc = new ReportDocument();
    rdoc.Load(rpPath);
    CrystalDecisions.CrystalReports.Engine.Table tbl = rdoc.Database.Tables[0];
    ConnectionInfo cInfo = tbl.LogOnInfo.ConnectionInfo;
    NameValuePair2 nv2 = (NameValuePair2)cInfo.LogonProperties[i];
    if (nv2.Name.ToString().IndexOf("File Path") >= 0)
    {
        nv2.Value = xmlPath.Replace(srcPRGID, desPRGID);
    }
    cInfo.ServerName = "";
    tbl.ApplyLogOnInfo(tbl.LogOnInfo);

  4. Run this code to change the XML location. If you debug the code, you will find before the line
    tbl.ApplyLogOnInfo(tbl.LogOnInfo);
    the rdoc.Database.Tables[0].LogOnInfo.ConnectionInfo.LogonProperties[0] is updated. But after 
    tbl.ApplyLogOnInfo(tbl.LogOnInfo);
    is run, the rdoc.Database.Tables[0].LogOnInfo.ConnectionInfo.LogonProperties[0] is changed to the original value automatically.

Cause

.NET Framework 3.5 is not installed in the Win 8 box. The default Win 8 install will not install the .NET Framework 3.5 version. It is needed to install manually.

Resolution

Install .NET Framework 3.5 and then re-run the program.

Keywords

cr, vs, ms, c#, vb, .net, c++, program, businessobjects, bo , KBA , BI-RA-CR-SDK , SDK related, including Java/.NET etc. , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem

Product

Crystal Reports 2008 V0 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports, developer version for Microsoft Visual Studio ; SAP Crystal Reports, version for Visual Studio .NET 2008