Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: need help in designing Post Reply Post New Topic
Author Message
newcommer
Newbie
Newbie


Joined: 23 Jul 2008
Location: Germany
Online Status: Offline
Posts: 6
Quote newcommer Replybullet Topic: need help in designing
     Posted: 23 Jul 2008 at 7:46am
Hello all,
           I am new to Crystal Reporting, I am using Crystal Reports XI,
          I got a task to prepare a report on Change Notes,to show the history of Change Note status for every month.
          Generally, one Change Note will take 1 to 2 months to close after passing through different status & every month we will have around 10 to 15 Change Notes(average).
for example : in the month March we have 6 Change Notes,out of which 3 Change Notes are closed & 2 in progress & 1 is cancelled, Now i have to prepare a Bar Chart  to show the Change Notes status Since March till the present date with only three status(Open, Close,In progress) & "In progress" status Change Notes of March should be carry forwarded to "In Progress status Change Notes  of April  & so on untill the Change Note is "Closed".
 
I tried my level best in explaining my problem, hope you understand my explanation.
 
Could any one give me a solution on how to prepare a Bar chart based on above explained information.
 
Thank you
newcommer
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 23 Jul 2008 at 7:49am
Hi,
 
Can you post some sample records ...
 
cloumn names data
 
cheers
rahul
IP IP Logged
newcommer
Newbie
Newbie


Joined: 23 Jul 2008
Location: Germany
Online Status: Offline
Posts: 6
Quote newcommer Replybullet Posted: 23 Jul 2008 at 7:58am

 

  CHANGENOTE.IDENT    CHANGENOTE.DATESUBMIT   CHANGENOTE.ANALYSED.................  CHANGENOTE.DATEDEPLOY        

            CN‑00001            19/03/2008  14:15:33                  19/03/2008  14:21:10

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 23 Jul 2008 at 1:14pm

How is Status determined?

-Dell
IP IP Logged
newcommer
Newbie
Newbie


Joined: 23 Jul 2008
Location: Germany
Online Status: Offline
Posts: 6
Quote newcommer Replybullet Posted: 24 Jul 2008 at 1:05am
changenote.ident   changenote.datesubmit.....
CN-0001                    19/03/2008  13:30:29   
      .                                            .
      .                                            .
The above information is from the table called "changenote "
 
statedef.name
submitted (Opened)
analysed}  
approved}    (in progress) 
developed} 
integrated} 
deployed(closed)
 
the above information is from the table "statedef"
 
i am linking two tables to get the required information
My intended bar graph
 
 
                           CN_ID  
                                                    Month
 
 
 
Blue : Opened
Green : Canceled
Orange : In progress
Black : Closed
 
 
for example :
 
·         In the first  month we have 5 Change notes opened & 1 cancelled (total : 6 change notes)
·         In the second month we have 3 Change notes opened , 5 Change notes in progress(of first month), 1 cancelled.(total : 9 change notes)
·         In the third month  we have 2 Change notes opened, 8 Change notes in progress(first month + second month ) (total : 10 change notes)
·         In the fourth month 3 Change notes opened, 7 Change notes in progress(first month + second month + third month) 3 change notes closed. (total : 13 change notes)
IP IP Logged
newcommer
Newbie
Newbie


Joined: 23 Jul 2008
Location: Germany
Online Status: Offline
Posts: 6
Quote newcommer Replybullet Posted: 24 Jul 2008 at 6:55am
Hello,
        i have  been waiting for the solution, i need the solution urgently, don't think otherwise. could you give me the possible solution solution asap.
        Thanks in advance
 
Newcommer 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 24 Jul 2008 at 6:59am
Please be aware that all of us are volunteers who answer questions on this site when we have time in our busy schedules.  Frequently there are no immediate answers.
 
I still don't have all of the information I need to be able to recommend a solution.  Where are you linking StateDef to in your ChangeNote table?  Do you have any sort of history table for ChangeNote so that you can determine when the note moved from one state to another?  Or are there specific date fields for each state in the ChangeNote table?
 
-Dell
IP IP Logged
newcommer
Newbie
Newbie


Joined: 23 Jul 2008
Location: Germany
Online Status: Offline
Posts: 6
Quote newcommer Replybullet Posted: 25 Jul 2008 at 12:09am
Hello hilf,
              i don't mean to force or hurry u, i got struck at this particular task.
so i was waiting for response.
 
              I am linking the “state” field in changenote table  to “ID” field in the statedef table in Crystal reports XI, they are the common fields in two tables.   
In the statedef table there is a field called “name” which stores the changenote status(Submitted, analysed, developed, integrated, deployed),
These two tables are active database tables which will be updated time to time.
In the changenote table we have fields, which stores the date & time of changenote status of particular changenote.
 
changenote.datesubmit } Open date
changenote.dateanalysed } In progress
changenote.datedeveloped } In progress
changenote.dateintegrated } In progress
changenote.datedeployed } closed
 
we are not using any other history tables.
 
Thank you
 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 25 Jul 2008 at 8:30am
So the history is basically stored in the data fields, correct?
 
Assuming you're looking for the status at the end of the month, here's what I would do (this is going to be complicated and may not be complete, so you're going to have to play with it and tweak it.):
 
1.  Create a formula called InProgressDt to get the most recent "In Progress" date.  It will look something like this:
If isNull({changenote.dateintegrated}) then
  if isNull({changenote.datedeveloped}) then
    {changenote.dateanalysed}
  else
    {changenote.datedeveloped}
else
  {changenote.dateanalysed}
 
2.  Create a formula called OpenMonth to get the month of the open date:
month({changenote.datesubmit})
For CloseMonth do the following:
if isNull({changenote.datedeployed}) then 0
else month({changenote.datedeployed})
Use this same technique for InProgressMonth, using the month of the {@InProgressDt} formula. 
 
Note:  With just the month, you'll only be able to run this for the current year.  If you need to run it for multiple years, you'll want to do something like this:
ToText(year({changenote.datesubmit}, 0) +
right('0' + ToText(month({changenote.datesubmit}, 0), 2) This code gives you the 4-digit year appended with a two digit month that has a leading zero if it's a single-digit month number.  You need to do it this way in order to get it to sort correctly.
 
4.  Create a command that gets your list of months.  I don't know what type of database you're using but in Oracle it would look something like this:
For just the month:
Select to_Number(to_Char(datesubmit, 'MM')) as GroupMonth
from ChangeNote
For the year and month:
Select to_Char(datesubmit, 'yyyyMM')) as GroupMonth
from ChangeNote
Use the syntax that is correct for your database.  DO NOT link this command to any of your tables!  Crystal will complain about it, but if I understand your needs correctly, you want to evaluate the records multiple times - once for each month between the datesubmit and the datedeployed.
 
5.  Create a group on the GroupMonth field.
 
6.  Create a formula called IsOpened:
if {@OpenMonth} <= {command1.GroupMonth} and {@InProcessMonth} = 0 then 1 else 0
Create another formula called IsInProcess:
if {@ClosedMonth} = 0 
  and {@InProcessMonth} <= {command1.GroupMonth} 
then 1 else 0
And one called IsClosed:
if {@ClosedMonth} = {command1.GroupMonth} then 1 else 0
 
7.  Sum each of these formulas at the GroupMonth level to get the numbers that you need for your bar chart.
 
-Dell
IP IP Logged
newcommer
Newbie
Newbie


Joined: 23 Jul 2008
Location: Germany
Online Status: Offline
Posts: 6
Quote newcommer Replybullet Posted: 28 Jul 2008 at 12:46am

Hello Hilfy,

                Thanks a lot,i will try this method & i will inform you the result.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum