Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Studio Reporting Services - Expressions?

Status
Not open for further replies.

chixor

Programmer
Mar 1, 2006
1
AU
Hello All,

I'm currently developing reports in Visual Studio .NET using the reporting services for data stored in SQL Server.

The database presents a username in the format of "SURNAME, GIVEN NAMES".

I want to divide it into two fields - Surname, and Given Name, using the "," as a point of reference to break it up.

I've successfully extracted the surname, but am having trouble with given names. Can anybody suggest an expression I might use to do this? I've tried utilising the help facility but to no avail. Perhaps I am not searching properly, but any help is appreciated!
 
Would this not be better handled in SQL so that it creates 2 seperate fields for you ?? You could use the POSITION & SAUBSTRING functions to do this and create 2 discreet fields in the query itself...
 
I agree with xlbo. Unless you know enough VBScript / Visual Basic to script something in the Report Properties -> Code section to do this, stick with doing this on the SQL Side.



Catadmin - MCDBA, MCSA
"The only stupid question is the one that *wasn't* asked.
 
I like the new SAUBSTRING function. Now I'm wondering if SQL comes with a SUBARUSTRING function. @=)

<@duck&hide>



Catadmin - MCDBA, MCSA
"The only stupid question is the one that *wasn't* asked.
 
it does and apparently it goes like stink until it hits the speed limiter !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top