Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Select Expert Formula as Field Post Reply Post New Topic
Author Message
bokasen
Newbie
Newbie


Joined: 19 Jun 2011
Online Status: Offline
Posts: 3
Quote bokasen Replybullet Topic: Select Expert Formula as Field
    Posted: 19 Jun 2011 at 5:34pm
Hi,

I am new in Crystal (8.5) and would like to know how to do the following:

I have created a formula in Report-->Select Expert, a date range (from/to) to pull out data from database and it is working well.

However, I would like to use the date range in select expert to be printed in my report's header that says,

Period Covered: 01-May-2011 to 31-May-2011

How do i do this?

Your help is highly appreciated.

Thanks.
IP IP Logged
Dewald
Groupie
Groupie
Avatar

Joined: 02 Jun 2011
Location: South Africa
Online Status: Offline
Posts: 47
Quote Dewald Replybullet Posted: 19 Jun 2011 at 11:50pm
create 2 formulas.
1. FromDate :  minimum(DateParameter)
2. ToDate: Maximum(DateParameter)
 
Drag them to a text box on your report.
Dewald Botha
http://www.ITClarity.co.za
IP IP Logged
bokasen
Newbie
Newbie


Joined: 19 Jun 2011
Online Status: Offline
Posts: 3
Quote bokasen Replybullet Posted: 20 Jun 2011 at 2:51pm
Hi Dewald,

Thanks for you help. It works like magic for neophyte like me.

IP IP Logged
bokasen
Newbie
Newbie


Joined: 19 Jun 2011
Online Status: Offline
Posts: 3
Quote bokasen Replybullet Posted: 20 Jun 2011 at 3:28pm
Hi Dewald,

I noticed that my actual records only contain say data from 02 May 2011 to 30 May 2011 but i want to show it on my report header the following:

Period Covered: 01-May-2011 to 31-May-2011

The formula you'd given me returns 02-May-2011 to 30-May-2011 which is correct as far as the records in the database.

But is there a way where it will show 1-May-2011 instead of 02-May-2011 and 31-May-2011 instead of 30-May-2011 regardless of the actual records in the database?

This is just to avoid confusing the user of the report with regard to actual data period pulled out from the db.

Thanks again.
IP IP Logged
Dewald
Groupie
Groupie
Avatar

Joined: 02 Jun 2011
Location: South Africa
Online Status: Offline
Posts: 47
Quote Dewald Replybullet Posted: 20 Jun 2011 at 8:23pm
Once you have placed the formula on the report, you can right click and choose format field. You can chenge it there.
Dewald Botha
http://www.ITClarity.co.za
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.