Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: find repeat incidents Post Reply Post New Topic
<< Prev Page  of 2
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Nov 2009 at 8:39am
Is allowing a user to go over 3 months but limit the data to a max of 3 months acceptable? You can make a warning to state the condition in the report and/or alter the shown param dates in the report header to be a max of 3 months.
 
{table.date} in {?begin date} to (if {?end date} > dateadd('m',3,{?begin date}) then dateadd('m',3,{?begin date}) else {?date end})
 
For you warnings just use the same logic. Make a text formula field:
 
if {?end date} > dateadd('m',3,{?begin date}) then "You exceeded the 3 month maximun date length. The data was truncated to only show you 3 months" else ""
for dispalying the end date paramter used:
if {?end date} > dateadd('m',3,{?begin date}) then dateadd('m',3,{?begin date}) else {?date end})
 
Does this work?
IP IP Logged
Vertex
Newbie
Newbie
Avatar

Joined: 29 Oct 2009
Location: India
Online Status: Offline
Posts: 24
Quote Vertex Replybullet Posted: 19 Nov 2009 at 9:02am
hi Dblank

i understood the formula but where can i put this formula.... i put it into record selection but it nothing happen....


Edited by Vertex - 19 Nov 2009 at 9:02am
Hi Peoples
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Nov 2009 at 9:15am
First you would need 2 parameters to match the formula.
The first formula goes int he record selection:
{table.date} in {?begin date} to (if {?end date} > dateadd('m',3,{?begin date}) then dateadd('m',3,{?begin date}) else {?date end})
This should force you to refresh your data and add the 2 params:
 
The other 2 formulas would be optional formula fields to display data or text back to your end user if you want to.
Often users like to see the params that were entered in a report. These would help explain to the user what filter was really applied even if they entered a range > 3 months.


Edited by DBlank - 19 Nov 2009 at 9:16am
IP IP Logged
Vertex
Newbie
Newbie
Avatar

Joined: 29 Oct 2009
Location: India
Online Status: Offline
Posts: 24
Quote Vertex Replybullet Posted: 19 Nov 2009 at 9:19am
 hi Dblank

Thanks a lot ...it Working well


Edited by Vertex - 19 Nov 2009 at 9:27am
Hi Peoples
IP IP Logged
Vertex
Newbie
Newbie
Avatar

Joined: 29 Oct 2009
Location: India
Online Status: Offline
Posts: 24
Quote Vertex Replybullet Posted: 21 Nov 2009 at 7:47am
I use this parameters  in my report :

If {?RecordSelection} ="This Year" then
{Order.CreateDateTime} in yeartodate
else {?RecordSelection ="All"

it both shows first record from 7/9/2009 at main report preview time but first record in database from 7/8/2009  ..what's the problem behind it ?
Hi Peoples
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 Nov 2009 at 3:58pm
likely you have another condition that is excluding it.
IP IP Logged
<< Prev Page  of 2
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.047 seconds.