Last Reply on Feb 10, 2012 08:16 AM By jj297

Views: 197   Replies: 5  Answers: 1


jj297

94 Points
Novice
Joined: Jan 20, 2012 11:10 AM
Replies: 82
on Feb 08, 2012 07:57 AM

I have a stored procedure that has hyperlinks in it when I call that stored procedure into a gridview those hyperlinks are displayed which is fine.  I want them removed when I export the gridview to excel but remember they are in my stored procedure.

Here's the query
SELECT ''   AS reg, RegionAcronym, '<a href=nation.aspx?RegionAcronym=' + Regionacronym + '>' + 'PHI' + '</a>' as area,
       SUM(totpenfodds)      AS 'totpenfodds', 
       SUM(pendinfo) AS 'pendinfo',	   SUM(pendndds)       AS 'pendndds', 
	   SUM(pendfo300)      AS 'pendfo300', 
       SUM(penddds300)       AS 'penddds300',        SUM(pend250)  AS 'pend250',
		SUM(pend300) AS 'pend300',		SUM(pend351)  AS 'pend351',
		SUM(pend400) AS 'pend400'FROM   T16Report where reg='c'
group by reg, RegionAcronymUNION 
SELECT reg, RegionAcronym , '<a href=areaDistListing.aspx?reg=' + reg + '&Area=' + Area + '>' +'Area ' + right(area,1) + '</a>' as area,  
          SUM(totpenfodds)      AS 'totpenfodds', 
       SUM(pendinfo) AS 'pendinfo',	   SUM(pendndds)       AS 'pendndds', 
	   SUM(pendfo300)      AS 'pendfo300', 
       SUM(penddds300)       AS 'penddds300',        SUM(pend250)  AS 'pend250',
		SUM(pend300) AS 'pend300',		SUM(pend351)  AS 'pend351',
		SUM(pend400) AS 'pend400'FROM  T16Report where reg='c'
GROUP  BY reg, RegionAcronym, areaORDER  BY reg, RegionAcronym, area 

 



You are viewing reply posted by: jj297 on Feb 10, 2012 08:16 AM. Show All

jj297

94 Points
Novice
Joined: Jan 20, 2012 11:10 AM
Replies: 82
0
Permanent Link on Feb 10, 2012 08:16 AM

Thanks I couldn't figure it out and the client was okay with the links just being there as they don't go anywhere.  Thanks again for all of your assistance.  You taught me so much about Exporting to Excel.


© 2012 www.aspforums.net All rights reserved. Powered by Excelasoft Solutions.  Excelasoft Solutions

Disclaimer: This site is started with intent to serve the ASP.Net Community by providing forums (question-answer) site where people can help each other. The content posted here is free for public and is the content of its poster. The site does not provide any warranties for the posted content. If you feel any content is violating any terms please contact.