Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Substr in Crystal reports Post Reply Post New Topic
Author Message
sebin_raj
Newbie
Newbie


Joined: 22 Jul 2008
Online Status: Offline
Posts: 1
Quote sebin_raj Replybullet Topic: Substr in Crystal reports
     Posted: 22 Jul 2008 at 8:31pm
Hi All,
 
I am very new to crystal reports, I am trying to create a report on this query.
 
"select substr(employee_id,1,5), col2,col3,col4 from employee "
 
But whatever I do its done only at report level (tried with left function). The query that is sent to oracle database is like this
 
"select employee_id,col2,col3,col4 from employee"
and the filter is applied on the resultset fetched
 
how do i achieve substr in my query through crystal reports
 
Thanks much in advance
Sebin
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 23 Jul 2008 at 1:17pm

What type of database are you using?  For some databases you can create a "Command" instead of selecting tables and linking them into your report.  That would be the only way to get your SQL to work.

However, sometimes you need to change the way you think of things when working with Crystal.  If you use the query that Crystal generates, you can create a formula that does the substring and then put the formula on the report instead of the field.
 
-Dell
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum