Title: Message Title
Binny Gopinath Sreevas updated an issue
Mifos X / MIFOSX-1169
Allow users to define their own reports by selecting various entities and their attributes with conditions and/or grouping
Change By:
Binny Gopinath Sreevas
Allowuserstodefinetheirownreportsbyselectingvariousentitiesandtheirattributesandspecifyinganyconditionsorgroupingfortheirdisplay.Theselectionofentities,attributesandspecifyingconditionsandanygroupingofdatashouldideallytranslateintothecorrespondingfetchesfromthedatabaseeitherthroughdirectSQLqueriesorviatheapplicationlayer.Theaimistoallowabusiness-user/administratortobeabletodefinetheirownreports -usingselectionordrag-and-droporanyothereasilyusableUIcomponents -withouthavingtounderstandtheinternalsoftheMifosdatabasetablesandcolumns -theideaistogiveasimpleinterfaceintegratedwithMifosCommunityApp-fordefining“ad-hoc”reportsandtoallowtheuser(orotherusers)torunthemlikeanyotherreport. - 2typesofuserstoriesforthisproject:o BusinessUser–forthepersontryingtousetheseentitiesandcreatingcustomerreportso AdministrativeUserStories–forthepersondefiningtheuniverse/entitiesIdeally,theUserinterfaceshouldbeintuitive.Hencewemayhavetodefinea“MifosDataUniverse”first.The“MifosDataUniverse”willdefineuserunderstandableobjects.Example:Userwantstocreateareportasfollows:ListCustomerID,Name,LoanAmount,OutstndingPrincipalandOutstandingInterestforallcustomerswithactiveloanswhereoutstandingprincipalisgreaterthan60%oftheLoanAmountThisreportneedsthefollowingtobedefinedupfront:a)Entities LoanCustomers-whichinternallyismappedto: “select*fromm_clientwhereidin(selectdistinctclient_idfromm_loan)”. Loans-whichinternallyismappedtom_loantable b)Attributes(whicharemappedasfollows) CustomerID--m_client.id Name--m_client.display_name ClientStatus--m_client.status_enum LoanAmount--m_loan.principal_amount OutstandingPrincipal--m_loan.principal_outstanding_derived OutstandingInterest--m_loan.interest_outstanding_derived LoanStatus--m_loan.loan_status_id ACTIVE_LOAN_STATUS--300 ACTIVE_CLIENT_STATUS--300 CustomerBranch--m_client.office_id CustomerBranchName--m_office.name c)ComputedFields OutstandingPricipalPercentage--(OutstandingPrincipal/LoanAmount)*100d)Conditions OutstandingPricipalPercentage=60and ClientStatus=ACTIVE_CLIENT_STATUSand LoanStatus=ACTIVE_LOAN_STATUS e)Groupdataby: CustomerBranch f)GroupingHeaderAttributes CustomerBranchNameg)GroupingFooterAttributes count(loans) sum(OutstandingPrincipal) sum(OutstandingInterest) h)ReportFooterAttributes count(loans) sum(OutstandingPrincipal) sum(OutstandingInterest) ThisMifosDataUniversedefinition(pointsaandbabove)canbeaone-timeactivity.DataUniverseisthesetofEntitiesandAttributesthatwillberecognizedbytheMifosAd-hocReportingModule.Forthefirstiteration,wemaynothaveauserinterfaceformanagingtheDataUniverse.Itcouldbemanagedbydefiningthe“EntitiesandAttributesDefinitions”asentriesinasetofdatabasetables.Thedatareturnedintheaboveexampleshouldbesimilartodatareturnedbythebelowquery: “select*fromm_clientwhereidin(selectdistinctclient_idfromm_loanwhereloan_status_id=300)andstatus_enum=300”. Finally,thereportwhenrunshouldreturntheaboveattributesandalsoallowusertoviewtheoutputinthemifoscommunityapplicationandallowthedatatobeexportedasExcel,CSVorPDF.Roughlistofusecases:-