在MSCRM4.0中新建报表视图,发布之后,查看报表视图出错。windows日志没有任何相关可用信息;用Trace工具发现错误如下:
at ErrorInformation.LogError()
at ErrorInformation..ctor(Exception exception, Uri requestUrl, Boolean logError)
at ErrorInformation..ctor(Exception exception, Uri requestUrl)
at AppWebService.CreateSoapException(Exception innerException)
at AppGridWebService.Reset(String gridXml, String id)
at RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at LogicalMethodInfo.Invoke(Object target, Object[] values)
at WebServiceHandler.Invoke()
at WebServiceHandler.CoreProcessRequest()
at SyncSessionlessHandler.ProcessRequest(HttpContext context)
at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at ApplicationStepManager.ResumeSteps(Exception error)
at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
>MSCRM Error Report:
--------------------------------------------------------------------------------------------------------
Error: 输入字符串的格式不正确。
Error Message: 输入字符串的格式不正确。
Source File: Not available
Line Number: Not available
Request URL: http://localhost:5555/CRM/AppWebServices/AppGridWebService.asmx
Stack Trace Info: [FormatException: 输入字符串的格式不正确。]
在 System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
在 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
在 Microsoft.Crm.Application.Controls.ReportsGridUIProvider.RenderRow(HtmlTextWriter output, Object rowData, Boolean multiObjectEnabled, View view, EntityMetadata metadata)
在 Microsoft.Crm.Application.Controls.AppGridUIProvider.Render(HtmlTextWriter output)
在 Microsoft.Crm.Application.Components.UI.DataGrid.RenderData(HtmlTextWriter output)
在 Microsoft.Crm.Application.Components.UI.DataGrid.RenderInnerHtml(HtmlTextWriter output)
在 Microsoft.Crm.Application.Components.UI.DataGrid.get_InnerHtml()
在 Microsoft.Crm.Application.WebServices.AppGridWebService.GetResetResponseXml(AppGrid appGrid)
在 Microsoft.Crm.Application.WebServices.AppGridWebService.Reset(String gridXml, String id)
解决办法
添加报表视图的时候必须添加“报表类型”字段。