CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old March 24th, 2004, 09:41 AM
    eliz_83sg eliz_83sg is offline
    Junior Member
     
    Join Date: Mar 2004
    Posts: 1
    eliz_83sg is an unknown quantity at this point (<10)
    percentage availability

    percentage availability


    I have a problem in crystal report(integrated in visual studio.net)

    I want to make a chart which show average of percentage availability based on fault party and date of fault. There are three fault party named Singtel, Sat ops and Customer

    availability= (total minutes in a month- total outage)/total minutes * 100

    Currently i can show percentage of availability for each party but then when i am trying to get the average, i cannot get the correct result

    Below is my formula:
    if {dummy.outage}>0 then
    if datepart("m",{dummy.date_origin})=01 or datepart("m",{dummy.date_origin})=03 or datepart("m",{dummy.date_origin})=05 or datepart("m",{dummy.date_origin})=07 or datepart("m",{dummy.date_origin})=08 or datepart("m",{dummy.date_origin})=10 or datepart("m",{dummy.date_origin})=12 then
    formula = (44640-Sum ({dummy.outage},{dummy.fault_party}))/44640 * 100
    else
    if datepart("m",{dummy.date_origin})=04 or datepart("m",{dummy.date_origin})=06 or datepart("m",{dummy.date_origin})=09 or datepart("m",{dummy.date_origin})=11 then
    formula = (43200-Sum ({dummy.outage},{dummy.fault_party}))/43200 * 100
    else
    if datepart("m",{dummy.date_origin})=02 then
    formula = (40320-Sum ({dummy.outage},{dummy.fault_party}))/40320 * 100
    end if
    end if
    end if
    Else
    if {dummy.outage}=0 then
    formula=100
    End if
    end if

    what i want is let say for january there are 4 faults. 1 fault caused by Singtel, 1 fault caused by customer and 2 faults caused by sat ops.
    currently i can show the availability for each party that month(let say for singtel=99.89%, for customer=99.52%, for sat ops= 99.44%), but i can not show the average for that month based on fault party, which is(99.89+99.52+99.44)/3=99.62%

    i want the chart shows the average of availability for all months in a year.


    How should i approach this problem?


    thanks in advance,
    elizabeth
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    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 On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 06:54 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009