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

Suppress error on ReportDocument.SaveAs

$
0
0

Hey guys,

 

we want modify the suppress condition formular of all reportobjects programmatically via c#.

Some of the modified formulars have errors. This is ok, because we want to edit these formulars later in the cr designer.

 

When we try to ReportDocument.SaveAs() the following error is being shown:

 

CrystalDecisions.CrystalReports.Engine.FormulaException wurde nicht behandelt.

  HResult=-2147214848

  Message=Dieser Feldname ist unbekannt.

Details: errorKind

Fehler in Datei "testreport {C825185E-9FDD-42B4-8ACD-E4F664FFD003}.rpt":

Fehler in Formel TX_Aussendienst:

'If {v_view_laser.sprache}={@XKey_Hollaendisch} then

'

Dieser Feldname ist unbekannt.

Details: errorKind.

  Source=CrystalDecisions.ReportAppServer.DataSetConversion

  StackTrace:

       bei CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)

       bei CrystalDecisions.CrystalReports.Engine.ReportDocument.SaveAs(String filename)

       bei CrystalReportsUpdate.frmMain.btnFormelfelderErsetzenStarten_Click(Object sender, EventArgs e) in D:\c#\CrystalReportsUpdate\CrystalReportsUpdate\CrystalReportsUpdate\frmMain.cs:Zeile 146.

       bei System.Windows.Forms.Control.OnClick(EventArgs e)

       bei System.Windows.Forms.Button.OnClick(EventArgs e)

       bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

       bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

       bei System.Windows.Forms.Control.WndProc(Message& m)

       bei System.Windows.Forms.ButtonBase.WndProc(Message& m)

       bei System.Windows.Forms.Button.WndProc(Message& m)

       bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

       bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

       bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

       bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

       bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)

       bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

       bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

       bei System.Windows.Forms.Application.Run(Form mainForm)

       bei CrystalReportsUpdate.Program.Main() in D:\c#\CrystalReportsUpdate\CrystalReportsUpdate\CrystalReportsUpdate\Program.cs:Zeile 18.

       bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)

       bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)

       bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

       bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)

       bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

       bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

       bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       bei System.Threading.ThreadHelper.ThreadStart()

  InnerException: System.Runtime.InteropServices.COMException

       HResult=-2147217383

       Message=Dieser Feldname ist unbekannt.

Details: errorKind

Fehler in Datei "testreport {C825185E-9FDD-42B4-8ACD-E4F664FFD003}.rpt":

Fehler in Formel TX_Aussendienst:

'If {v_view_laser.sprache}={@XKey_Hollaendisch} then

'

Dieser Feldname ist unbekannt.

Details: errorKind.

       Source=""

       ErrorCode=-2147217383

       StackTrace:

            bei CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.SaveAs(String DisplayName, Object& ParentFolderPath, Int32 Options)

            bei CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.SaveAs(String DisplayName, Object& ParentFolderPath, Int32 Options)

            bei CrystalDecisions.CrystalReports.Engine.ReportDocument.SaveAs(String filename)

       InnerException:

 

 

How can we suppress these error/syntaxcheck when saving the ReportDocument? It does not make sense, that the report is saveable in the cr designer but not programmatically.

 

Thanks for your help!

 

Best regards

 

Markus


Viewing all articles
Browse latest Browse all 3636

Trending Articles



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