Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Inserting a Formula field into SQL Command Post Reply Post New Topic
Author Message
cruser2
Newbie
Newbie


Joined: 07 Feb 2012
Online Status: Offline
Posts: 14
Quote cruser2 Replybullet Topic: Inserting a Formula field into SQL Command
     Posted: 16 Mar 2012 at 3:31am

Hi, I currently have a crystal report that uses a Parameter field inserted as part of a SQL command.

However instead of relying on the user to enter the correct parameter I want to change this to a formula that is calculated in the report.

I tried replacing the parameter field with a formula but the SQL command then took no notice of the value.

How can I get the SQL to include a formula fields?

Thanks.

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 19 Mar 2012 at 4:49am
I don't think that you can.
 
you can alter the sql to match the formula for the 'where' clause...at least that is what I would consider the easiest/most common solution for what you want to do.
 
formulas run against datarows, but the command object is fetching the datarows, so it's a bit of a catch-22
IP IP Logged
cruser2
Newbie
Newbie


Joined: 07 Feb 2012
Online Status: Offline
Posts: 14
Quote cruser2 Replybullet Posted: 25 Sep 2012 at 5:12am
Hi, thanks for the reply.
Smile
IP IP Logged
rajendran
Newbie
Newbie


Joined: 03 Oct 2012
Online Status: Offline
Posts: 5
Quote rajendran Replybullet Posted: 03 Oct 2012 at 11:41pm
Need your help urgently..
i am using crystal report 8.0
i want to limit the records displayed in one page.
For eg.
total records fetched 50
page 1 should display 20 records
page 2 should display 15 records
page 3 should display 10 records
page 4 the remaining records

I am going to apply this in an exam software, where each exam hall needs different number of records to be displayed.

RAJENDRAN...
hrajendran@ymail.com
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