Custom report - problem with select command

Thursday, September 25, 2014 9:55:48 AM
hi,

I try to prepare my custom report. I create query:

select R.TEST_CASE_ID, R.NAME, R.AUTHOR_NAME, R. DESCRIPTION, T.TEST_STEP_ID, T.DESCRIPTION, I.INCIDENT_NAME, I.CREATION_DATE, I.CLOSED_DATE, I.LAST_UPDATE_DATE
from SpiraTestEntities.R_TestCases as R
inner join SpiraTestEntities.R_TestSteps as T on R.TEST_CASE_ID = T.TEST_CASE_ID
inner join SpiraTestEntities.R_Incidents as I on T.TEST_STEP_ID = I.TEST_RUN_STEP_ID
where R.PROJECT_ID = ${ProjectId}


As a result I achieved system warning: "System.Xml.XmlException: The '#' character, hexadecimal value 0x23, cannot be included in a name."


I change my query to form:

select R.TEST_CASE_ID, R.NAME, R.AUTHOR_NAME, T.TEST_STEP_ID, T.DESCRIPTION, I.INCIDENT_NAME, I.CREATION_DATE, I.CLOSED_DATE, I.LAST_UPDATE_DATE
from SpiraTestEntities.R_TestCases as R
inner join SpiraTestEntities.R_TestSteps as T on R.TEST_CASE_ID = T.TEST_CASE_ID
inner join SpiraTestEntities.R_Incidents as I on T.TEST_STEP_ID = I.TEST_RUN_STEP_ID
where R.PROJECT_ID = ${ProjectId}


and then the proper result is generated.


System warning "System.Xml.XmlException: The '#' character, hexadecimal value 0x23, cannot be included in a name." appears always when I want to display two columns with the same name (even if they refer to different tables -> R. DESCRIPTION and T.DESCRIPTION)

How can I resolve my problem?


1 Replies
Thursday, September 25, 2014 3:16:14 PM
Avatar
re: kasia on Thursday, September 25, 2014 9:55:48 AM
Hi

Try to use alias with those columns:
use T.DESCRIPTION AS TEST_STEP_DESCRIPTION and R.DESCRIPTION AS TEST_CASE_DESCRIPTION

BR,
Taha Massalha
Statistics
  • Started: Thursday, September 25, 2014 9:55:48 AM
  • Last Reply: Thursday, September 25, 2014 3:16:14 PM
  • Replies: 1
  • Views: 405