HOME DOCUMENTATION DOWNLOADS BLOG

Form not opened - Crystal Report error

After successful upgrade to version 2016.11.30 I was trying to open Bill Sales form in Desktop Client. But I get an error:

Chyba pøi naèítání formuláøe
Failed to build a widget `Bill_Sales/InvoiceRootControl/SplitPanel5/Panel1/AsReportPanel1’ (d2fc3965-c560-4b32-9440-bb21c6156f25).

Failed to build a widget `Bill_Sales/InvoiceRootControl/SplitPanel5/Panel1/AsReportPanel1’ (d2fc3965-c560-4b32-9440-bb21c6156f25).

Exception has been thrown by the target of an invocation.

Could not load file or assembly ‘CrystalDecisions.Windows.Forms, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304’ or one of its dependencies. The system cannot find the file specified.

========================================
Stack trace

at CZ.Advantages.Asap.BI.CrystalReports.AsReportPanel…ctor() at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName)
at CZ.Advantages.Asap.Reflector.InvokeObject(String classname, String assembly)
at CZ.Advantages.Asap.Gui.Win.FormGenerator.CreateInstance(ControlSetItem cntrlSet, String dataMember, Hashtable bindings, Hashtable dataConsumers, Boolean readOnly)
at CZ.Advantages.Asap.Gui.Win.FormGenerator.LoadControl(ControlSetItem cntrlSet, String dataMember, Hashtable bindings, Hashtable dataConsumers, Control parentControl, Boolean ignoreTabPages, Boolean readOnly)
at CZ.Advantages.Asap.Gui.Win.FormGenerator.BuildChildItem(String dataMember, Hashtable bindings, Hashtable dataConsumers, Boolean readOnly, Control cntrl, ControlSetItem childItem)
at CZ.Advantages.Asap.Gui.Win.FormGenerator.LoadControl(ControlSetItem cntrlSet, String dataMember, Hashtable bindings, Hashtable dataConsumers, Control parentControl, Boolean ignoreTabPages, Boolean readOnly) at CZ.Advantages.Asap.Gui.Win.FormGenerator.LoadControl(ControlSetItem cntrlSet, String dataMember, Hashtable bindings, Hashtable dataConsumers, Control parentControl, Boolean ignoreTabPages, Boolean readOnly)
at CZ.Advantages.Asap.Gui.Win.FormGenerator.BuildChildItem(String dataMember, Hashtable bindings, Hashtable dataConsumers, Boolean readOnly, Control cntrl, ControlSetItem childItem)
at CZ.Advantages.Asap.Gui.Win.FormGenerator.LoadControl(ControlSetItem cntrlSet, String dataMember, Hashtable bindings, Hashtable dataConsumers, Control parentControl, Boolean ignoreTabPages, Boolean readOnly)
at CZ.Advantages.Asap.Gui.Win.FormGenerator.BuildChildItem(String dataMember, Hashtable bindings, Hashtable dataConsumers, Boolean readOnly, Control cntrl, ControlSetItem childItem)
at CZ.Advantages.Asap.Gui.Win.FormGenerator.LoadControl(ControlSetItem cntrlSet, String dataMember, Hashtable bindings, Hashtable dataConsumers, Control parentControl, Boolean ignoreTabPages, Boolean readOnly)
at CZ.Advantages.Asap.Gui.Win.FormGenerator.LoadControl(ControlSetItem cntrlSet)
at CZ.Advantages.Asap.Gui.Win.FormGenerator.LoadFormWithData(DataSet formData, XmlDataDocument xmlData, FormControlSet formControlSet, Guid methodId, Guid sortSetId, Guid defaultSetId, Guid listDataStructureId, Guid listMethodId, String listDataMember)
at CZ.Advantages.Asap.Gui.Win.FormGenerator.LoadFormWithData(FormControlSet formControlSet, Guid methodId, Guid sortSetId, Guid defaultSetId, Guid listDataStructureId, Guid listMethodId, String listDataMember)
at CZ.Advantages.Asap.Gui.Win.AsForm.LoadFormAsync()
at AsapArchitect.Commands.ExecuteSchemaItem.RunItem(ISchemaItem item, String titleName, Boolean isRepeatable)

Is there any CRRuntime update? What version of runtime is needed?

Solved. There were more things. But major was that crystal reports runtime 64bit version was missing. After installation of CR and changing AsapArchitekt.exe.config by adding

<startup useLegacyV2RuntimeActivationPolicy="true">
   <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>

the form opened and I was able to use and print reports.

As addition:

  • 64bit Crystal Reports SAP must be instaled (CRRuntime_64bit_xx_x_xx).
  • section works after <enterpriselibrary.configurationSettings> section for me.
    (without this section, You get error like - Can not load Assembly …)
  • 64bit Crystal work along recent 32bit version (server 2016) - old and new Desktop Client working together (on different appropriate models)