?
Solved

Group Specified on a non recurring field - another twist

Posted on 2005-03-17
2
Medium Priority
?
1,523 Views
Last Modified: 2011-09-20
I have a situation which I'm sure many people have run into:

My recordset contains items which need to be grouped by manufacturer status. If the status of a particular item is unavaiable but other items by the manufacturer are available, the manufacturer status needs to be set to available. However, if all the items by the manufacturer are unavailable, the status of the manufacturer should be unavailable.

I wrote a formula to do a distict count on the item status at the manufacturer level and compare that to the item status. If the distinct count > 1, the manufacturer status is set to 'A'. If the distinct count = 1 and item status = 'U', the manufacturer status is set to 'U'. Else the manufacturer status is set to 'A'. That all works fine.

Now for the twist. I need to group all the available manufacturera together and all the unavailable manufacturers together. I can't do this based on my manufacturer status formula because it uses the distinct count function.

I'm using Crystal 8.5. The report is being run off a single SQL stored procedure which is shared by other reports, so I can't change it to do this modification within the sp. I would love to use a SQL Expression, but they aren't available in 8.5.

There has to be a way to group based on a variable in Crystal. Does anyone know the way? Do I need a evaluation time function somewhere along the line? Use Variables?

Thanks in advance!
0
Comment
Question by:bbgbp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Accepted Solution

by:
GJParker earned 2000 total points
ID: 13572846
The way I would do this is to create a formula to test for the status i.e.

//@Status - place this in the details section
if {MyTable.Status} = 'A' then 1 else 0

create a group on supplier and create a sum summary of teh @status formula, then Unavailable suppliers  = 0 and Available suppliers <> 0

then insert a group sort Report -> Group sort expert

For this group sort = All
based on = Sum of @Status

Hope this helps

Gary
0
 
LVL 1

Author Comment

by:bbgbp
ID: 13574548
Gary,

I'll give that a shot. Thanks for the idea!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month13 days, 17 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question