Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Crystal reports 2011 with command object on 64bit for paramters

$
0
0

(Reposting the same issue from Crystal reports to here)

 

We are using Crystal reports 2011 with SQL Server 2008 R2. We are trying to use dynamic parameters and using command object to populate the dynamic pick list.

The dynamic picklist is not populating and showing just a empty textbox while running on 64bit. I tried to run the profiler and there is no db command executed.

If I use a view instead of command object for populating the parameter - then it works. If I set the IIS to have 'Enable 32 bit application' to true, then even the command object works works. Is this a problem with choosing the correct driver (32-bit vs 64-bit) or should it be always 32-bit?

 

When I run the SQL Profiler - the command object is executed, but the results are not getting bound to the dynamic picklist

 

Code which we use to modify the connection


 

   CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag logonDetails = new CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag();
   logonDetails.Add("Auto Translate", -1);
   logonDetails.Add("Connect Timeout", 15);
   logonDetails.Add("Data Source", server);
   logonDetails.Add("General Timeout", 0);
   logonDetails.Add("Initial Catalog", db);
   logonDetails.Add("Integrated Security", "false");
   logonDetails.Add("Locale Identifier", 1033);
   logonDetails.Add("OLE DB Services", -5);
   logonDetails.Add("Provider", "SQLNCLI10");
   logonDetails.Add("Use Encryption for Data", 0);

 

   //Create the QE (query engine) propertybag with the provider details and logon property bag.
   CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag QE_Details = new CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag();
   QE_Details.Add("Database DLL", "crdb_ado.dll");
   QE_Details.Add("QE_DatabaseName", db);
   QE_Details.Add("QE_DatabaseType", "OLE DB (ADO)");
   QE_Details.Add("QE_LogonProperties", logonDetails);
   QE_Details.Add("QE_ServerDescription", server);
   QE_Details.Add("QE_SQLDB", "True");
   QE_Details.Add("SSO Enabled", "False");

 

   CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo newConnInfo = new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
   CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo oldConnInfo;
   CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfos oldConnInfos;

 

   oldConnInfos = rcd.DatabaseController.GetConnectionInfos(null);
   for (int I = 0; I < oldConnInfos.Count; I++)
   {
   oldConnInfo = oldConnInfos[I];
   newConnInfo.Attributes = QE_Details;
   newConnInfo.Kind = CrystalDecisions.ReportAppServer.DataDefModel.CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
   try
   {
   rcd.DatabaseController.ReplaceConnection(oldConnInfo, newConnInfo, null, CrystalDecisions.ReportAppServer.DataDefModel.CrDBOptionsEnum.crDBOptionDoNotVerifyDB);
   }
   catch (Exception ex)
   {
   Label1.Text = ex.Message;
   return;
   }

 

   }

 

   doc.SetDatabaseLogon(user, pass);

 

   doc.VerifyDatabase();

 

My machine configuration: Windows 7 64-bit with IIS 7.0

 

Any ideas/help?

 

 

Thanks

Shankar.


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>