Error in report for custom values

Wednesday, March 18, 2020
Avatar

Hi,

I'm generating report which includes a custom value and followed the instruction, https://www.inflectra.com/Support/KnowledgeBase/KB369.aspx

i managed to get the report from the custom fields, however with the one using for the Date data type, it's showing error

Here's the error message in the Event Log

Messages:
An error occurred while reading from the store provider's data reader. See the inner exception for details. [System.Data.EntityCommandExecutionException]
Conversion failed when converting the nvarchar value '2020-03-11T13:00:00.000' to data type int. [System.Data.SqlClient.SqlException]

at APPLICATION.Business.ReportManager.ReportCustomSection_ExecuteSQL(Int32 projectId, Int32 projectGroupId, String sql, UpdateBackgroundProcessStatus updateBackgroundProcessStatus, Int32 progress, Int32 numberOfRecords)

 

My suspect is with the conversion from Date type to Int32 or something like that

Anyone knows how to fix this?

Many thanks

2 Replies
Thursday, March 19, 2020
Avatar
re: tnguyen Wednesday, March 18, 2020

For those curious about this issue:

You only need the join onto the custom property values entity if you have a list or multi-list property. For simple values (text, numeric, dates), the data is in the main entity itself (i.e. Custom_XX contains the value itself)

Friday, March 20, 2020
Avatar
re: inflectra.david Thursday, March 19, 2020

Hi David, I think this info may confuse people and lead to misunderstanding. From the KB link I shared which I assume we have to cast all custom fields to get the actual data instead of its ID

"

However it will not include the display names of any custom list fields, only text ones. Custom list fields will display just the ID of the value, not the display name.

To display the name, we will need to join the R_CustomListValues entity to the result"

Thanks,

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Wednesday, March 18, 2020
  • Last Reply: Friday, March 20, 2020
  • Replies: 2
  • Views: 1589