Print Page | Close Window

crystal with prompt

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=9985
Printed Date: 05 May 2024 at 8:53am


Topic: crystal with prompt
Posted By: mahe416
Subject: crystal with prompt
Date Posted: 11 May 2010 at 7:26pm
Hi,

I am working on crystal reports 2008, I have query.. plz help me..

I have created a prompt for Fiscal period. In this i am not getting the perfect data.

For ex: if I want the data range from Apr 2007 to Apr2010, Its not showing the Actual data as Apr 07, May 07.......Mar 2010,
Apr 2010.

It is showing the data in alpabetic order.. as Apr2007, Apr 2008, Apr2010 only..

I am not getting the remaining data.
when i have created the prompt also its has taken tha data in alphabetic order only....

plz solve this and help me...

waiting for ur reply..

with regards,
Mahesh



Replies:
Posted By: Emir_W
Date Posted: 15 May 2010 at 10:14pm
Hi,
 
Correct me if I'm wrong.
What you need is the order for the report as 'Apr07, May07, ..., Mar08, Apr08'. Is it correct?
 
In this case, create a formula (as text) which contains yyyymm.
So it will sort by Year and month (and date if you need it).
Then sort the report based on this formula.
 
e.g.:
Totext(Year(datevar),0,'')+
if (Month(datevar))<10 then
    '0'+totext(month(currentdate),0,'')
else
    totext(month(currentdate),0,'')
 
Note: change 'datevar' with your variable/field.
 
The result will be something like '200704'  or  '200711'.
 
Then you can sort the report using this formula.
In the report hide this formula and put the date variabel.
So, it will printed as 'Apr2007', 'May2007', ..., 'Jan2008', etc.
 
 
hope it help.
 


-------------
Emir W



Print Page | Close Window