Author |
Message |
paul_birm
Newbie
Joined: 10 Jul 2008
Online Status: Offline
Posts: 25
|
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 ( ) 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
|
Paul
Birmingham
England
{A friend in need is a pain in the a***}
|
IP Logged |
|
razzak
Newbie
Joined: 03 Mar 2010
Location: India
Online Status: Offline
Posts: 34
|
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 Logged |
|
paul_birm
Newbie
Joined: 10 Jul 2008
Online Status: Offline
Posts: 25
|
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 Logged |
|
jkwrpc
Senior Member
Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
|
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 Logged |
|
paul_birm
Newbie
Joined: 10 Jul 2008
Online Status: Offline
Posts: 25
|
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...
|
Paul
Birmingham
England
{A friend in need is a pain in the a***}
|
IP Logged |
|
paul_birm
Newbie
Joined: 10 Jul 2008
Online Status: Offline
Posts: 25
|
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 Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
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 Logged |
|
razzak
Newbie
Joined: 03 Mar 2010
Location: India
Online Status: Offline
Posts: 34
|
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 Logged |
|
paul_birm
Newbie
Joined: 10 Jul 2008
Online Status: Offline
Posts: 25
|
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...
|
Paul
Birmingham
England
{A friend in need is a pain in the a***}
|
IP Logged |
|
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
|
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 Logged |
|
|