Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports newbie needs HELP

Status
Not open for further replies.

WMlodestar

Programmer
Feb 28, 2003
7
0
0
US
If anyone can help, I would appreciate it!
I am trying to create totals from a set of tables that I have where a "one to many" relationship exists. I have to display the single item name and then the totals of this item found in the other table(many). I have been down the formula route but I don't have a user's guide around here to go by. Maybe I should get a book!

Signed,
Discouraged.
 
The problem is not clear. Please provide an explanation of tables, columns, and desired output.

Cheers,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks for responding. This is what I am trying to do. This query tells the story of what I am trying to do, except I have a couple of different states that I have to total.

Some SQL:
select count(ar.STATE) from wfwqmsg wf,activityimpl ai,processactivity pa,activityarchive ar
where wf.MESSAGETYPECODE = ai.MESSAGETYPECODE and ai.UIDACTIVITYIMPL = pa.UIDACTIVITYIMPL and
pa.UIDPROCESSACTIVITY = ar.UIDPROCESSACTIVITY and
ar.STATE = 'COMPLETED'

(for example: ar.STATE = 'COMPLETED' or some other state)


Tables:
WFWQMSG, ACTIVITYIMPL, PROCESSACTIVITY, ACTIVITYARCHIVE

WFWQMSG table has a key field called MESSAGETYPECODE, among other fields. There maybe several records with the same value. But I'm only interested in distinct records.

ACTIVITYIMPL also has MESSAGETYPECODE and provides a link to PROCESSACTIVITY, and PROCESSACTIVITY provides a link to ACTIVITYARCHIVE.

ACTIVITYARCHIVE may have many records joined back from a single MESSAGETYPECODE. What I am trying to do is count these records that have either a ACTIVITYARCHIVE.STATE value of 'COMPLETED' or 'RUNNING'. The report will have totals for each of these states. Something like this.

MESSAGETYPECODE Total COMPLETED Total RUNNING
MSGNAMEHERE 100 50
MSG2NAMEHERE 25 25

When building the report I used the Report Expert and provided the table names and it created the links and all is well. I believe that to get the results that I'm looking for, whatever I do, needs to be in the Details section.

I appreciate any direction that you may give.

Wes
 
Group on MESSAGETYPECODE and create yout total as Running Totals with an "evaluate" option set to evaluate once for each MESSAGETYPECODE group.

Cheers,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top