Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Report In Date Ranges Post Reply Post New Topic
Page  of 3 Next >>
Author Message
paul_birm
Newbie
Newbie
Avatar

Joined: 10 Jul 2008
Online Status: Offline
Posts: 25
Quote paul_birm Replybullet Topic: Report In Date Ranges
    Posted: 11 Mar 2010 at 2:59am
Hi ALL members...
 
I am running CR ver 6, 7 and 9 and need to write a report in ver6 ( LOL ) that pulls some data for specific dates.
 
ie  all sales between 01 Jan 2010 and 31 Jan 2010. 
 
is there a way that i can get my user to input those specific dates....
 
there MUST be somehow...
 
all help appreciated.
 
Many thanks
Paul
Birmingham
UK
Tongue
Paul
Birmingham
England
{A friend in need is a pain in the a***}
IP IP Logged
razzak
Newbie
Newbie
Avatar

Joined: 03 Mar 2010
Location: India
Online Status: Offline
Posts: 34
Quote razzak Replybullet Posted: 11 Mar 2010 at 3:27am
create two date time parameters
go to select expert
e.g
write formula like .
 
({table1.photo_shot_date}>=CDate({?photo shot date from})
and {table1.photo_shot_date}<=CDate({?Photo shot date to})
 
 
this might solve your problem.
Razzak Sayyed
IP IP Logged
paul_birm
Newbie
Newbie
Avatar

Joined: 10 Jul 2008
Online Status: Offline
Posts: 25
Quote paul_birm Replybullet Posted: 11 Mar 2010 at 7:16am
Thanks Razzak
 
I have a formulae:-
 
({salesorders.sdate}>=Cdate({?Report Date From})
and {salesorders.sdate}<=Cdate({Report Date End})
 
and when I Try to save the forumula, i get the CR error
 
"A Number, Currency Amount, Boolean or String is expected Here"
 
any more ideas please?
 
Paul
 
 
 
Paul
Birmingham
England
{A friend in need is a pain in the a***}
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 11 Mar 2010 at 1:27pm

Could be a data typing issue. I would suggest making sure your parameters have been correctly typed as a date. If you database for some reason has the date as a string then you would need to convert your parameter from a date to a string.

I believe your solution is in matching these correctly.
 
Hope this is of some help
 
Regards,
 
John W.
IP IP Logged
paul_birm
Newbie
Newbie
Avatar

Joined: 10 Jul 2008
Online Status: Offline
Posts: 25
Quote paul_birm Replybullet Posted: 12 Mar 2010 at 12:44am
Thanks John
 
my datatype on sdate field on salesorders table is 'datetime' so should be ok ???
 
any other ideas please people...Big%20smile
Paul
Birmingham
England
{A friend in need is a pain in the a***}
IP IP Logged
paul_birm
Newbie
Newbie
Avatar

Joined: 10 Jul 2008
Online Status: Offline
Posts: 25
Quote paul_birm Replybullet Posted: 12 Mar 2010 at 12:55am
ok, to summerise, I am running CR ver 6.
 
I want a report to be run between two dates ( equivlent to a field called sdate in my CR)
 
i hve gone into Select Expert and added a NEW item   so, it reads...
 
Salesorders.sdate    is (1st dropdown)  formula (2nd dropdown) and the formula is thus...
 
({salesorders.sdate}>=Cdate({?Report Date From})
and {salesorders.sdate}<=Cdate({Report Date End})
 
i click on OK and get the error ( no number)   "A Number, currency amount, boolean or string is expected here"
 
i have checked my ERP system datatypes and thy are set to datetime.
 
Please, Please, Please help. I really need this report ....
 
thanks in advance
 
 
 
Paul
Birmingham
England
{A friend in need is a pain in the a***}
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Mar 2010 at 4:58am
Never used 6 so I am guessing here.
In vXI I would bypass the select expert GUI and just use the statement:
{salesorders.sdate} in Cdate({?Report Date From}) to Cdate({?Report Date End})
 
If you still get the error where is the cursor indicating the expected # to be?
IP IP Logged
razzak
Newbie
Newbie
Avatar

Joined: 03 Mar 2010
Location: India
Online Status: Offline
Posts: 34
Quote razzak Replybullet Posted: 14 Mar 2010 at 7:43pm
Please remove Cdate() and try
e.g
 
({salesorders.sdate}>={?Report Date From}
and {salesorders.sdate}<={?Report Date End})
 
try This.
Razzak Sayyed
IP IP Logged
paul_birm
Newbie
Newbie
Avatar

Joined: 10 Jul 2008
Online Status: Offline
Posts: 25
Quote paul_birm Replybullet Posted: 15 Mar 2010 at 1:01am
thanks Razzak
 
however, when in  select expert gui, go into new and then make salesorders.sodate...is...formula  with the following formula
 
({salesorders.sdate}>={?Report Date From}
and {salesorders.sdate}<={?Report Date End})   (exact copy and paste)  i now get the error ... THis field name is not known
 
the cursor stays where ever i last left it so i cant see WHICH fileld is Not KNOWN...
 
 
CryCryCry getting really fed up with this now..... CryCryCry
Paul
Birmingham
England
{A friend in need is a pain in the a***}
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 15 Mar 2010 at 7:59am
Interesting, so CR cannot find either {salesordes.sdate}, {?Report Date From} or {?Report Date End}.  I would double check the spelling of each of these (especially the parmeters).  I have sometimes had to resort to deleting my parameters and recreating them because I had somehow gotten a 'hidden' character in the name.
IP IP Logged
Page  of 3 Next >>
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.039 seconds.