View Corona Virus Stats in Tally Itself - Stay Safe

Discussion in 'Tally Developer' started by teja varma, Mar 7, 2020.

    
  1. teja varma

    teja varma Active Member


    ; Hello People;

    As Corona Virus is becoming Dangerous and a lot of people are infected by this deadly virus
    As an attempt to do something I though Sharing Some information about Corona Virus Outrage will be helpful to others
    So I Made this TDL where you can view Statistics of Corona Virus Across the Globe
    Data will be updated a few times in a day
    Load the below TDL code
    You will find options in GatewayOfTally Click on them They will Display the Count of People Affected by Corona Virus... WHO Report link also provided for your reference

    **Data is Collected from trusted links and Sources. You can check them

    Stay Safe.
    Code:
    ;; Note :
    ;; The Data Showed Here  is Collected from trusted sources over the web
    
    ;; We are not Responsible for any Kind of Misinformation appered in the data
    
    ;; Sources  :  https://bnonews.com/index.php/2020/02/the-latest-coronavirus-cases
    
    ;;Sources  :  https://www.who.int/emergencies/diseases/novel-coronavirus-2019/situation-reports
    
    ;; Intermediate Source : https://github.com/alext234/coronavirus-stats
    
    
    
    
    [Collection:CoronaIndiaStatsColl]
        Data Source:HTTP XML:"http://softwarecodecs-env.eba-9vunqia3.us-east-2.elasticbeanstalk.com/ComputeIndiaStats.jsp":UTF8
        Client Only:Yes
        XML Object Path:DATA:1
       
    [Collection:CoronaIndiaStatExtract]
         Source Collection:CoronaIndiaStatsColl
         Source PreFetch:STAT.*
         Walk:STAT
         Compute:DATE:$DATE
         Compute:COUNT:$COUNT
        
    
    [Collection:CoronaStats]
        Data Source:HTTP XML:"http://softwarecodecs-env.eba-9vunqia3.us-east-2.elasticbeanstalk.com/PullOverallStats.jsp":UTF8
        Client Only:Yes
        XML Object Path:WHOSTATS:1
       
    [Collection:CoronaStatsExtract]
        Source Collection:CoronaStats
        Source PreFetch: STAT.*
        Walk:STAT
        Compute:DATE:$DATE
        Compute:COUNT:$COUNT
        Compute:REFLINK:$REFLINK
       
    
    [#Menu:GateWayOfTally]
        Add:Item:Display India Stats:Display:CoronaIndiaData
        Add:Item:Overall Stats : Display:OverallStatsData
        Add:Item:View Global Stats:Browse Url:"http://softwarecodecs-env.eba-9vunqia3.us-east-2.elasticbeanstalk.com/CoronaStats.jsp"
    
       
    ;;Report to Display Overall Stats
    
    
    [Report:OverallStatsData]
        Form:OverallStatsData
        Title:"Global Statistics"
       
    [Form:OverallStatsData]
        Part:OverallStatsData
        Button:DisplayWhoReport
       
    [Part:OverallStatsData]
         Parts:GlobalStatKeyNote,GlobalStatDataView
         Vertical:Yes
         Width:80% page
         Height:100% page
       
    [Part:GlobalStatKeyNote]
        Line:GStatKeynote1,GStatKeynote2
       
    [Part:GlobalStatDataView]
        Lines:GlobalStatsHeader,GlobalStatsData
        Repeat:GlobalStatsData:CoronaStatsExtract
        Scroll:Vertical
        Common Border:Yes
       
    [Line:GStatKeynote1]
        Field:NameField,
        Local:Field:Name Field:Set as:"* Data as per the WHO Reports - World Health Organization"
        Local:Field:Name Field:Full Width:Yes
       
    [Line:GStatKeynote2]
        Use:StatsKeynote1
        Local:Field:Name Field:Set as:"* Data Source : https://www.who.int/emergencies/diseases/novel-coronavirus-2019/situation-reports"
        Space Top:0.2
       
    [Line:GlobalStatsHeader]
        Border:ThickTopBottom
        Space Top:0.5
        Fields:GStatsCounter,GStatsDatetime,GStatsCount,GStatsRefLink
        Local:Field:GStatsCounter:Set as:"Sl.No"
        Local:Field:GStatsDatetime:Set as:"Date"
        Local:Field:GStatsCount:Set as:"Count"
        Local:Field:GStatsRefLink:Set as:"WHO Report Link"
        Local:Field:default:Style:StatsHdStyle
        Local:Field:default:Align:Left
    
    [Line:GlobalStatsData]
        Fields:GStatsCounter,GStatsDatetime,GStatsCount,GStatsRefLink
        Border:thinbottom
        Space Top:0.5
        Local:Field:default:Style:StatsDataStyle
        Local:Field:default:Align:Left
        Local:Field:default:Border:thinright
       
       
    [Field:GStatsCounter]
        Set as:$$Line
        Width:10
       
    [Field:GStatsDatetime]
        Set as:$Date
        Width:15
       
    [Field:GStatsCount]
        Set as:$Count
        Width:10
       
    [Field:GStatsRefLink]
        Set as:$RefLink
        Full Width:Yes
    
    
    ;; Report to Display Indian Stats
    
    
    [Report:CoronaIndiaData]
        Form:CoronaIndiaData
        Title:"Corona Virus Statistic for India"
       
    [Form:CoronaIndiaData]
        Part:CoronaIndiaData
       
    [Part:CoronaIndiaData]
         Parts:CoronaKeyNote,CoronoIndiaDataView
         Vertical:Yes
         Width:50% page
         Height:100% page
       
    [Part:CoronaKeyNote]
        Line:StatsKeynote1,StatsKeynote2
       
    [Part:CoronoIndiaDataView]
        Lines:StatsHeader,ActualStats
        Repeat:ActualStats:CoronaIndiaStatExtract
        Scroll:Vertical
        Common Border:Yes
       
    [Line:StatsKeynote1]
        Field:NameField,
        Local:Field:Name Field:Set as:"* Data will be updated few times in a day and fetched from trusted sources"
        Local:Field:Name Field:Full Width:Yes
       
    [Line:StatsKeynote2]
        Use:StatsKeynote1
        Local:Field:Name Field:Set as:"* Data Source : https://bnonews.com/index.php/2020/02/the-latest-coronavirus-cases"
        Space Top:0.2
       
    [Line:StatsHeader]
        Border:ThickTopBottom
        Space Top:0.5
        Fields:StatsCounter,StatsDatetime,StatsCount
        Local:Field:StatsCounter:Set as:"Sl.No"
        Local:Field:StatsDatetime:Set as:"Date Time"
        Local:Field:StatsCount:Set as:"Count"
        Local:Field:default:Style:StatsHdStyle
        Local:Field:default:Align:Left
    
    [Line:ActualStats]
        Fields:StatsCounter,StatsDatetime,StatsCount
        Border:thinbottom
        Space Top:0.5
        Local:Field:default:Style:StatsDataStyle
        Local:Field:default:Align:Left
        Local:Field:default:Border:thinright
       
       
    [Field:StatsCounter]
        Set as:$$Line
        Width:10
       
    [Field:StatsDatetime]
        Set as:$Date
        Width:30
       
    [Field:StatsCount]
        Set as:$Count
        Width:20
       
    [Style:StatsDataStyle]
        Font:"Sans-serif"
        Height:12
    
    [Style:StatsHdStyle]
        Font:"Sans-Serif"
        Height:12
        Bold:yes
       
    
    ;; to open selected link
    
    [Collection:CurrentSelectedData]
        Data Source:Report:Selected
       
    [Button:DisplayWhoReport]
        Title:"Display Stat Report"
        Key:CTRL + D
        Action:Call:ShowSelectedWhoReport
       
    [Function:ShowSelectedWhoReport]
        Variable:URLtoOpen:String
        01:Set:URLtoOpen:($$CollectionField:$RefLink:1:CurrentSelectedData)
        02:Browse Url Ex:##URLtoOpen
        03:Return
      
       
    
        
        
    
     
    Rohit Khedar likes this.


  2. Rohit Khedar

    Rohit Khedar Member


    very nice mr. teja varma but India status same condition or time to time update everyday
     


  3. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    Is it safe? :(
    Will my Tally ERP get infected ?
     


  4. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    You Should Use Mask for it.:)

    Happy Holi.:)
     


  5. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    [Function : TallyMaskForCorona]
    Returns : Logical
    Variable : vCOVIDMask : Logical

    100 : IF ##isVirusThreat
    200 : Set :vCOVIDMask = True
    300 : Return : ##vCOVIDMask
    400 : Else
    500: Return : NO
    600: End If

    ;; Happy Holly :confused::(
     


  6. teja varma

    teja varma Active Member


    :) :D






    More Statistics available here :
    Stats across nations: bit.ly/39BAkT0
    India Stats: bit.ly/38BLTbA
    WHO Data:bit.ly/39M3DCB
    Images: bit.ly/2xovFWn
     
    Last edited: Mar 9, 2020


Share This Page