Report Designer - question about null values in calculated fields
Hello. I'm trying to set up some logic in a calculated field: If a field is null, print nothing, else print the trimmed value of the field.
The following expression works for features that have a valid text field SITUS_CITY, but fails if SITUS_CITY is null: (SITUS_CITY == System.DBNull.Value ? "" : SITUS_CITY.ToString().Trim())
If I remove the .ToString().Trim(), the expression works for nulls, but unfortunately I need valid values to be trimmed.
Any ideas?
Thanks,
Chris
-
Thanks Jonathan, that worked like a charm!
Chris
0 -
Hi,
I am facing problem with DataSource in report designer, i was to able to see the values from the database for the Labels with DataField property in report designer in preview mode.
I have integrated the Print template(.rpx file) in the silverlight site using REST manager, in the output file, the datafeild values are displayed with "Control Script" text.
Do needfull help.Regards,
Satish.
0 -
Hi Sathish
are the nulls in the spatial data or linked data?
Potentially if it is linked data then you could deal with the nulls using
select field1, ISNULL(field2,'') as notNullField2 from linkedTable where rec_id = @SpatialId
ie deal with it before it gets to the report. You could even go crazy and make the attributes of the spatial feature to be linked data as well to cure the situation of nulls in that data.
Regards
Ralph
0 -
Hi Price,
Thanks for your response. It was not a problem with null values, there are no null vaues in my table. After some research i got details about this issue in the following link
https://support.geocortex.com/SupportForums/Thread.aspx?pageid=0&mid=2&ItemID=2&thread=46479This is what my problem exactly, Can you please suggest me a detailed solution for this issue, either i need to use a workflow or configurations can help.
Regards,
Satish.
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
4 kommentarer