Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Report got Error: The ) is missing after upgrade

Status
Not open for further replies.

Mike ZHO

Programmer
Feb 15, 2018
2
US
Could anybody help to see why I am getting the Error message: The ) is missing. after I run my report in another machine with newer OS and Crystal Report?
Thanks a lot!
Mike

--Formula Fields

IF {?Pm-@ods_form} = "Y"
or (HASVALUE({?Pm-?Reporting Time Frame})
and {?Pm-?Reporting Time Frame} in ["CURR_POLICY", "PREV_POLICY"])THEN
cstr(year(cdate({FORMS_M19_TLFSTMT_GRAPH.POLICY_YEAR})),0,"")
ELSE
{FORMS_M19_TLFSTMT_GRAPH.TRANS_YEAR}

Error message: The ) is missing.

System.Runtime.InteropServices.COMException was unhandled
HResult=-2147217383
Message=The ) is missing.
Details: errorKind
Error in File C:\Users\houm\AppData\Local\Temp\2\TLFSTMT_M19 (Manual version)_STATIC {D7537051-A7F1-476B-82DD-DDB3553EE612}.rpt:
Error in formula <graph_year>.
'IF {?Pm-@ods_form} = "Y"
'
The ) is missing.(
Details: errorKind
Source=Analysis Server
ErrorCode=-2147217383
StackTrace:
at CrystalDecisions.ReportAppServer.Controllers.SubreportControllerClass.GetSubreport(String Name)
at CrystalDecisions.CrystalReports.Engine.DataDefinition.get_ParameterFields()
at Project1.tlf_export_form.loadCrystalReport()
at Project1.tlf_export_form.exportTLF_stmt_btn_Click(Object eventSender, EventArgs eventArgs)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Project1.tlf_export_form.Main()
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
 
Brackets look OK.

Try deleting the SubReport Parameter {?Pm-?Reporting Time Frame} and recreating
Following system change make sure field linked to this parameter is the same datatype

Ian
 
I think it might be the HASVALUE() function. That function might not exist in your version of Crystal (it doesn't in mine).
You can probably change it over in some way by using the isnull() function.

Maybe: not(isnull({?Pm-?Reporting Time Frame}))

-Andy
 
That isn't CR designer error. It looks like you are running the report from within an application when that error occurs. So, you need to know what version of the runtime is being used by that application. My guess is that it is an older version that doesn't support optional parameters, so the HasValue() won't be supported.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
IanWaterman, AndyMc and kenhamady,
Thank you so much for your help! really appreciate it!!! I tried AndyMc and Kenhamady's advice and it worked!
Thanks again and you guys are awesome!
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top