If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Applications & Tools > Array & Grouping in Crystal Report

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-01-03, 00:16
windos windos is offline
Registered User
 
Join Date: Jul 2003
Location: Indonesia
Posts: 3
Question Array & Grouping in Crystal Report

Dear all,

I'm a newbie in Crystal Report and have a problem in creating a formula.
I use these data (in oracle) :
Name Date (mm/dd/yy) Valid Invalid
---- -------------------- ---- --------
Rate 08/28/2003 09:59 AM 2,008 148
Rate 08/28/2003 10:02 AM 120 11,713
Rate 08/28/2003 10:07 AM 7 22,294
Rate 08/28/2003 10:10 AM 0 293
Rate 08/28/2003 10:11 AM 1 3,254
Debt 08/29/2003 10:11 AM 1 1
Debt 08/30/2003 10:11 AM 1 1
Rate 09/01/2003 10:19 AM 171 10,082
Rate 09/01/2003 10:30 AM 562 24,596
Rate 09/02/2003 10:40 AM 41 178
Rate 09/02/2003 10:52 AM 0 134

There are 2 reports i want to create from the data :
I)
i want to show all fields which the date between 08/28/2003 until 08/29/2003
i created 2 paramaters, for field Name ({?Namex}) and for the date {?datex}.
the format of {?datex} is "mm/dd/yyyy".
then i created a formula based on those paramaters =
--
if {?Namex}="<all>"
then
Year ({LOG.START_DTM})>=Year ({?datex}) and
Month ({LOG.START_DTM})>=Month ({?datex}) and
Day ({LOG.START_DTM})>=Day ({?datex})
else
{NAME_DESC} = {?Namex} and
Year ({LOG.START_DTM})>=Year ({?datex}) and
Month ({LOG.START_DTM})>=Month ({?datex}) and
Day ({LOG.START_DTM})>=Day ({?datex})
---
but the debug said the formula has an error :
"This array must be subscripted. For example : Array [i]"
i think the problem is related to the dates.
but i still dont have any clue to solve it.
i really appreciate your help guys.

II)
i want to show the total of valid and invalid per each Name,
plus minimum and maximum dates. the view is like this :
Name MinDate MaxDate Sum(Valid) Sum(Invalid)
---- ------- -------- --------- -----------
Rate 08/28/03 09/02/03 2,910 72,692
Debt 08/29/03 08/30/03 2 2

In SQL oracle, we can just select the fields and 'group by' it
by the 'Name'. but in CR, how to group it ?

once again i really appreciate your help guys.
thanks

rgds,
windos
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On