Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Cannot enter a SQL expression Post Reply Post New Topic
Author Message
dbodell
Groupie
Groupie
Avatar

Joined: 08 Nov 2011
Location: United States
Online Status: Offline
Posts: 53
Quote dbodell Replybullet Topic: Cannot enter a SQL expression
     Posted: 25 Nov 2011 at 8:37am
I want to be able to enter a sql expression instead of a formula for something in a report, but there is no SQL Expression on my Field Explorer tab. Why would that be? Sometimes I see it and sometimes I don't. This report is based on a SQL stored procedure. Does that have anything to do with it?
Thanks,
D. Bodell
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 28 Nov 2011 at 5:39am
my basic rule of thumb is that CR will only 'get' the data from the database once.
 
if you want additional information after that, you're out of luck, CR won't fetch again (the exception being a subreport...it fetches data everytime...not the best for performance).
 
if you know that you will need additional information, in your case, either add an additional table of output and link in the report or add the columns onto the existing stored proc. Either way, you will should be able to get the data that you need.
 
HTH
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Nov 2011 at 11:57am

In my testing I also found that the SQL Expression was not available if I used a SQL stored Proc as the source. If you have rights top creating the stored proc as the source you should be able to include in whatever expression in the sp itself.

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