Hexagon Geospatial
MENU

GeoMedia Smart Client

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Regular Contributor
Posts: 155
Registered: ‎07-07-2016

Input string was not in a correct format message while generating report

[ Edited ]

Hi,

I'm using GMSC 2016 SP4 with PostgeSQL 10.

On my list form I have configured field 'rzgw_jed_id', (which in database is of integer type). The field contains a foreign key to a dictionary. I need this field to be filtered (so field type on my form is number). But I need also to generate a report which contains this field. 

Unfortunaltelly, while trying to generate a report (even if report template is empty) I get a error: "Input string was not in a correct format.Couldn't store <RZGW w Rzeszowie> in ROW_rzgw_jed_id Column.  Expected type is Decimal."

What can I do to make it work? (The error appeared after migration to SP4)

 

The full stacktrace and my form configuration is below:

 

Stacktrace:

03.12.2018 14:10:44 ERROR - Controller List has raised an exception in Action DownloadReport.
System.ArgumentException: ""
at System.Data.DataColumn.set_Item(Int32 record, Object value)
at System.Data.DataTable.NewRecordFromArray(Object[] value)
at System.Data.DataRowCollection.Add(Object[] values)
at Intergraph.Emea.Workflows.Extensions.TelerikReportProvider.RenderReport(String reportName, String reportFormat, FormDescription formDescription, IEnumerable`1 domainObjects, WorkflowData workflowData)
at Intergraph.Emea.Workflows.ListController.DownloadReport(String reportName, String reportFormat)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
--- Inner exception ---
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Convert.ToDecimal(String value, IFormatProvider provider)
at System.Data.Common.DecimalStorage.Set(Int32 record, Object value)
at System.Data.DataColumn.set_Item(Int32 record, Object value)

 

Form configuration:
<Form name="ZadanieUtrzymanioweLista" editable="true" filter="SQL[nw_jed_id in(select id from wspolne.get_jednostki({SESSION.USERID})) or zz_jed_id in(select id from wspolne.get_jednostki({SESSION.USERID})) or rzgw_jed_id in(select id from wspolne.get_jednostki({SESSION.USERID})) or kzgw_jed_id in(select id from wspolne.get_jednostki({SESSION.USERID}))]" idfield="id" table="zu.zu" pagesize="12" isfilterareaopen="false">
<FormReport name="ZadanieUtrzymanioweLista" type="overview" format="PDF,CSV,DOCX,XLSX" />
<FormTab name="NewTabPage2" editable="true" visible="true">
<FormGroup name="NewGroup2" editable="true" visible="true">
<FormField name="id" label="Id" editable="true" visible="list" datatype="number" required="true" persisted="true" saveinsession="false" type="textfield" />
<FormField name="numer" label="Numer" editable="true" visible="list,filter" datatype="string" required="true" persisted="true" saveinsession="false" type="textfield" filter="ISLIKE" />
<FormField name="nazwa" label="Nazwa" editable="true" visible="list,filter" datatype="string" required="true" persisted="true" saveinsession="false" type="textfield" filter="ISLIKE" />
<FormField name="status_zu_id" label="Status" editable="true" visible="list,filter" datatype="string" lov="SQL[select s.id, s.nazwa from zu.sl_status_zu s]" required="true" persisted="true" saveinsession="false" sqlselect="SQL[select s.nazwa from zu.sl_status_zu s where s.id=status_zu_id]" type="combobox" />
<FormField name="nw_jed_id" label="Nadzór Wodny" editable="true" visible="list" datatype="string" lov="SQL[select nazwa from wspolne.jednostka where id=nw_jed_id]" required="true" persisted="true" saveinsession="false" sqlselect="SQL[select nazwa from wspolne.jednostka where id=nw_jed_id]" type="textfield" filter="ISLIKE" />
<FormField name="zz_jed_id" label="Zarząd Zlewni" editable="true" visible="list,filter" datatype="string" lov="SQL[select distinct j.id, j.nazwa from zu.zu zu join wspolne.jednostka j on j.id=zu.zz_jed_id order by 2]" required="true" persisted="true" saveinsession="false" sqlselect="SQL[select nazwa from wspolne.jednostka where id=zz_jed_id]" type="combobox" />
<FormField name="rzgw_jed_id" label="RZGW" editable="true" visible="list,filter" datatype="number" lov="SQL[select distinct j.id, j.nazwa from zu.zu zu join wspolne.jednostka j on j.id=zu.rzgw_jed_id order by 2]" required="true" persisted="true" saveinsession="false" sqlselect="SQL[select nazwa from wspolne.jednostka where id=rzgw_jed_id]" type="combobox" />
</FormGroup>
</FormTab>
<FormAction name="usun" label="Usuń" editable="true" visible="list[SQL[select case when wspolne.can_edit(2, {ROW.id}, {SESSION.UZYTKOWNIK_JEDNOSTKA_ID}, true) then 1 end]]" action="SCRIPT[IG.confirm({message: 'Czy na pewno chcesz usunąć zadanie utrzymaniowe?', title: ' ', okMessage: 'Tak', cancelMessage: 'Nie', callback: function () {IG.trigger({triggerNames:['UsunZUTrigger'],urlParams:{zuId:{ROW.id}}}).done(function() {IG.reloadPage();});} })]" type="row" authorization="ROLE[Edycja ZU]" />
<FormAction name="dodajNoweZadanie" label="Dodaj nowe zadanie" editable="true" visible="true" action="SCRIPT[IG.redirectToWorkflowNode({controller:'FORM',nodeid: 'ZU_DODANIE'})]" authorization="ROLE[Edycja ZU]" />
<FormAction name="ok" label="Zamknij" editable="true" visible="true" action="SCRIPT[IG.closeWebBrowser()]" />
</Form>

Staff
Posts: 438
Registered: ‎11-12-2015

Re: Input string was not in a correct format message while generating report

Hi mzebrows,

 

It is hard to say what the issue could be here but at least I hope to supply possible hint.

 

The error suggests that there is string to decimal comparison and possible conversion taking place. During this process it is encountering string values that are not compatible/convertible to decimal values. Have you checked on values for the <RZGW w Rzeszowie> ? I am curious if there are possible empty string records or something else causing the issue.

 

HTH

Regular Contributor
Posts: 155
Registered: ‎07-07-2016

Re: Input string was not in a correct format message while generating report

The problem is cast exception.

Temporary workaround is described here: link

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.