Custom report - problem with select command

Thursday, September 25, 2014
Avatar
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
Avatar
re: kasia Thursday, September 25, 2014
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

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: Thursday, September 25, 2014
  • Last Reply: Thursday, September 25, 2014
  • Replies: 1
  • Views: 2725