cancel
Showing results for 
Search instead for 
Did you mean: 

Queue Reports Object - failed to generate report for queue that having collection in its data item

Shenq_FengKwan
Level 2
I'm currently using Queue Reports Object VBO to create report from the queue, it is able to generate the report if the queue item doesn't contain any collection. However, it is throwing the following error message when generating report against queue that having collection in its data item. Error message: Internal : Could not execute code stage because exception thrown by code stage: Type of value has a mismatch with column type Couldn't store in Attachment Column. Expected type is DataTable   Further checked on the VBO (Object Name: Queue Reports), found that it is throwing error at the €œCollect Item Data1€ code stage that in €œGet data From Items€. The code at line 4 and 18 were supposed to omit Collection type field from the queue data item. However, these line of doesn€™t seems to be doing the job as intended.The function in these 2 lines €œMicrosoft.VisualBasic.TypeName(c)€ always return €œDataColumn€ regardless of the actual data type of the column. I have temporarily fixed this by replacing these 2 lines with €œIf c.DataType.toString() = "System.Data.DataTable" Then Continue For€   Has anyone experienced this issue? 
6 REPLIES 6

John__Carter
Staff
Staff
The Queue Reporting object does not support nested collections I'm afraid. The reason is that there is no universal way to represent a multi-dimensional collection structure on 1 line of a report. To do so you'll need to create some bespoke code specific to the shape of the data in your work queue.

Shenq_FengKwan
Level 2
Hi John, Yes, the VBO doesn't support nested collections as per documentation. In fact, the VBO has a line of code to ignore the nested collection  while retrieving data from queue item, however, the particular line of code doesn't work as it intended to be (on my machine).

John__Carter
Staff
Staff
Ah OK , I see your point and thanks for pointing out the error. I'll see that it gets changed.

Hi, this wasnt changed (our version 6.5).

I updated the code object that is throwing the exception in Object Queue Reports, page Get Data From Items to this:

For Each c As DataColumn in Item_Data.Columns
   'Ignore nested collections
   If Microsoft.VisualBasic.TypeName(c)="DataTable" Then
  DataFromItems.Columns.Add(c.ColumnName, System.Type.GetType("System.String"))
 End If
   If Not DataFromItems.Columns.Contains(c.ColumnName) Then
      DataFromItems.Columns.Add(c.ColumnName, c.DataType)
   End If
Next

Instead of trying to change the DataType after creation, I detect the DataTable type and smash in a string type instead. Aint pretty but it works.

------------------------------
Rasmus Petersen
Manager
KPMG
Europe/London
------------------------------

Hello @RasmusPetersen, i am trying this option of changing the code like you mentioned. It bypass the error message we see, but the output data comes as blank for many rows (basically with other different tags). assistance is really welcomed. Thanks in advance​

------------------------------
Chandan Raju
------------------------------

@BlueprismSuppor- ​ This issue is not yet resolved and creates a blocker for everyone's work and wastes time and effort to fix it. Please look into this issue.
The Queue Report VBO throws error if the Queue Data has a Column with Collection Data Type, even though there is a piece of code in the VBO to avoid Collection type (Data Table) but doesn't work as expected.

Thank you

------------------------------
Chandan Raju
------------------------------