I'm just pulling the unique Issue Number (String) and the date opened (date) and date closed (date).
Main Topics
Browse All TopicsHello,
I am trying to create a simple bar chart in Crystal that shows Product Issue activity per month. It's really simple: total opened in the month, and total closed. I created a fromDate parameter and a toDate parameter (parameterX), and my "opened" sub-report has the DateOpened = parameterX, and my "closed" sub-report has the DateClosed = parameterX. This report seems to work fine - pulling all Product Isses opened per month, and all Product Issues closed per month, but now I would like my data in a chart that illustrates opened and closed side by side per month, based on parameterX. Any ideas? Can I even create a chart where my horizontal axis is based on the dates entered for parameterX, which actually corresponds to two separate date fields in my database (opened and closed)?
Any help would be appreciated. Thanks!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Is this related to this one?
http://www.experts-exchang
mlmcc
Yes it is. It looks like I'll have to handle this before the data gets into Crystal with a Stored Procedure. I have yet to see a solution using Crystal itself that will allow me to group both records opened and closed by month and year, since the grouping has to be by either dateOpened or dateClosed. I tried working with dateVariables, but that didn't get me anywhere.
Thanks for your help,
Mark
As stated in the pther questiion, a record can be in one group or the other.
One way to try this would be to use a DATABASE COMMAND in Crystal. I don't know if it will work or not but something like
SELECT MyTable.*, 'Closed' as OpenCloseField FROM Table1 WHERE {ClosedDateField} In {?DateRange}
UNION ALL
SELECT MyTable.*, 'OPEN' as OpenCloseField FROM Table1 WHERE {OpenDateField} In {?DateRange}
If it doesn't work in the report it may work in the database.
In that way each record will be either OPEN, Closed, or appear twice with one open and one closed.
mlmcc
Solved!
Thanks for the tip. I was not familiar with Union Queries before your post. I created a Database Command to join both date fields and list by IncidentID. This allows me to group everything by month. Here's the command that I am using:
SELECT DateClosed as 'Date', StandardShortInteger001 as 'Incident ID' FROM dbo.CorrectiveAction
UNION ALL
SELECT Date_Incident as 'Date', IncidentID as 'Incident ID' FROM dbo.Incident
I then included both my Incident and CorrectiveAction tables (linked by the unique IncidentID), and was able to list my DateClosed and Date_Incident fields, which I flagged (1 if they = Command.Date, else 0), which tells me if the date in the joined Command.Date field is an 'Open' or a 'Closed'. I grouped by my joined Command.Date field (by month), and charted my graph. My DateRange parameter is tied to the Command.Date field. I'm not sure if this is the most efficient method, but it works.
Thank you Experts for heading me in the right direction.
-Mark
Business Accounts
Answer for Membership
by: mlmccPosted on 2009-02-10 at 14:48:55ID: 23606434
What data do you have in a record?
mlmcc