Custom Query report problem

Friday, July 17, 2015 7:07:22 AM
I can't use select inside select in my query!

As an example:
select as NAME, 
    from SpiraTestEntities.R_CustomListValues as E 
    join SpiraTestEntities.R_Incidents as A on A.PROJECT_ID = E.PROJECT_ID 
    where A.CUST_03 = cast(E.CUSTOM_PROPERTY_VALUE_ID as string) and E.CUSTOM_PROPERTY_LIST_ID = 11) as AREA 
from SpiraTestEntities.R_Incidents as R 
where R.PROJECT_GROUP_ID = ${ProjectGroupId}

This query gives AREA as System.Data.Query.ResultAssembly.BridgeDataReader and all other fields as they should.
Both selects work when not combined. 
I have to make a query with 2 of these selects inside a select to get values in place of IDs. 

How is one suposed to get actual values into a report when using multiple custom fields?
3 Replies
Tuesday, July 21, 2015 2:43:19 PM
re: Teemu on Friday, July 17, 2015 7:07:22 AM
Hi Teemu

I would use a join rather than sub-select as illustrated here:


Wednesday, July 22, 2015 5:24:44 AM
re: inflectra.adam on Tuesday, July 21, 2015

I got it working with join.
Monday, July 27, 2015 9:40:35 AM
re: Teemu on Wednesday, July 22, 2015

I can't get project name in top of my report to change to project group name.
Is that possible?

I tryed to edit Standard Section like this: 

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:template match="/ProjectData/Project">
<div class="Title1">Project Group <xsl:value-of select="ProjectGroupId"/>: <xsl:value-of select="Name"/></div>
<xsl:value-of select="Description" disable-output-escaping="yes"/>

but I don't know where this select is so it could be edited. Is there something I should change in 'match="/ProjectData/Project"'?

  • Started: Friday, July 17, 2015 7:07:22 AM
  • Last Reply: Monday, July 27, 2015 9:40:35 AM
  • Replies: 3
  • Views: 1114