1 / 62

Finacle Training

Finacle Training. Maha Report Writer. MahaReport. Mahareport. This is a tool for formating and generating reports This is a generic tool and is not specific to Finacle. Like any other reporting utility, mrt has it own syntax and the same is covered in detail here. ... Mahareport.

mason-cook
Download Presentation

Finacle Training

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Finacle Training Maha Report Writer

  2. MahaReport

  3. Mahareport • This is a tool for formating and generating reports • This is a generic tool and is not specific to Finacle. • Like any other reporting utility, mrt has it own syntax and the same is covered in detail here.

  4. ... Mahareport GENERATE THE SPOOL FILE CREATE MRT EXECUTE THE MENU OPTION PRTMR

  5. ... Mahareport • Spool file contains the input data. • The data fields are separated by a | (pipe) character. • The report format is specified in the mrt file • The report can be generated through the menu option PRTMR • From within Finacle, the exe mrbx4004 can be used to generate a report through mrt

  6. Data file(Spool file) • The data file (spool file) should have an extension of ‘dat’. (eg. Test.dat, ptw.dat, etc.). • This file contains the data in several lines. • Each line contains values of several fields, each field separated by a pipe character • If the value of any field is null, we put two pipe character without any value in between

  7. ...Data file(Spool file) • The number of fields in each line is fixed (as specified in the record layout section of the template file) • There can be any number of lines in the spool file • The spool file is normally generated by the Finacle code. However, it can be generated by other means also.

  8. Sections in a Mahareport template file • The template (format) file is one where the user can specify the format in which the report has to be generated • This file should have an extension of mrt (eg. test.mrt, pte.mrt, etc.) • There are several sections in the template file.

  9. Sections in a Mahareport template file • The following are the various sections • RECORDLAYOUT • LOCALVARIABLES • GROUPANDSORT • REPOSITORY • MASSAGERECORD • IGNORERECORD • ONEVERYRECORD

  10. ... Sections in a Mahareport template file • PAGEFORMAT • ONSTARTOFREPORT • PAGEHEADER • PAGEFOOTER • ONENDOFREPORT • BEFOREBREAKOF • AFTERBREAKOF • PROCEDURE • FIELDDUMP

  11. ...Sections in a Mahareport template file • RECORDLAYOUT Section • This is a mandatory section • It contains the name and order of the fields specified in the spool file • The fields are listed one below the other • Each line in this section contains the field name and its type • The fields can be either ‘string’ type or ‘number’ type

  12. ...Sections in a Mahareport template file • These fields can be referred later in the mrt file by the name specified in this section • If the same spool file is being used by more than one template file, a separate header file can be created with all the fields listed exactly as it is done in the record layout section • This header (with extension mri) can be included in the record layout section.

  13. ...Sections in a Mahareport template file • Example • Suppose the input-file (ASCII file) contains the following details: 1000|GLSUBHEAD|SBGCA||20|25465.45|0|Y|N|N 1020|GLSUBHEAD|SBGCA||25|0|45,000.00|Y|N|Y • The record layout section will be

  14. ...Sections in a Mahareport template file RECORDLAYOUT rptCode stringType codeDesc stringType codeDesc1 stringType codeDesc2 stringType noOfAccounts numberType outStandingAmt numberType FXoutStandingAmt numberType foundFlg stringType descTypeFlg stringType fxFlg stringType

  15. ...Sections in a Mahareport template file • LOCLVARIABLES section • This is a mandatory section • All the local variables will be declared here • This section name must appear in the spec-file even if no local variables are required for processing. • The variables can be of two types, ‘stringType’ or ‘numberType’

  16. ...Sections in a Mahareport template file • Example You can define some local variables as follows: LOCALVARIABLES Page_tot_printed stringType total_pages numberType

  17. ...Sections in a Mahareport template file • GROUPANDSORT Section • This is a mandatory section. However, nothing needs to be specified in this section if no grouping and sorting is required. (That is, the section heading should always be present even if no grouping or sorting is required) • The sort field and sort order can be specified in this section

  18. ...Sections in a Mahareport template file • The sort orders supported are • ascending • descending • already sorted • Example GROUPANDSORT rptcode ascending The report will be sorted in the ascending order of the rptcode (report code) field.

  19. ...Sections in a Mahareport template file • REPOSITORY Section • This is an optional section • Here, the variables to be accessed from a repository can be specified. • You can define more than one repository in this section • The variables can either be only a ‘stringType’ or a ‘numberType’ • Reading from and writing into repositories is an activity that is transparent to the user and happens at the very beginning and end, respectively

  20. ...Sections in a Mahareport template file • example BankRepos.rip is a Unix file in which the following variables have been defined: REPOSITORY bankRepos.rip ReadOnly bankName stringType branchName stringType uniformBrCode stringType branchDistrict stringType branchState stringType

  21. ...Sections in a Mahareport template file • MASSAGERECORD Section • This is an optional section • Here the action to be performed on any field value can be specified • The operations specified here will be executed only once on every record • This takes precedence over IGNORERECORD and ONEVERYRECORD sections

  22. ...Sections in a Mahareport template file • Example MASSAGERECORD set outStandingAmt = roundoff outStandingAmt N 100 • Before the IGNORERECORD or ONEVERYRECORD sections are read, the variable outStandingAmt is rounded off to the nearest 100

  23. ...Sections in a Mahareport template file • IGNORERECORD Section • This is an optional section • The syntax is if ( condition) • If the condition evaluates to TRUE, such records are ignored and the next record is picked up

  24. ...Sections in a Mahareport template file • Example if (outStandingAmt = 0) and (FXoutStandingAmt = 0) The above statement indicates that if variables outStandingAmt and FXoutStandingAmt have a value of zero, such records should be ignored.

  25. ...Sections in a Mahareport template file • ONEVERYRECORD Section • This is an optional section, which is executed once for each input record. This section also contains valid Action Statements

  26. ...Sections in a Mahareport template file • PAGEFORMAT Section • This is an optional section where you can specify the page layout details like number of lines in a page, margin size etc. • The following page format setting can be done in this section • LinesperPage (number of lines in a page including the header lines, footer lines, top and bottom margins)

  27. ...Sections in a Mahareport template file • PageHeaderLines (number of lines used for the Page Header) • PageFooterLines (number of lines used for the Page Footer) • TopMargin (number of lines to be left blank before the first line of the header is printed) • BottomMargin (number of lines to be left blank after the last line of the footer is printed) • noPageFeed (used to suppress page feeds in case you wish to use the output for further processing)

  28. ...Sections in a Mahareport template file • columnsperLine (usually the number of columns may be upto 256) • LeftMargin (number of columns to be left blank on the left side of the page) • RightMargin (number of columns to be left blank on the right side of the page) • ignoreBlankRecord (used to ignore all blank records available in an input file)

  29. ...Sections in a Mahareport template file • Example widowOrphanLines 3 LinesPerPage 64 LeftMargin 2 rightMargin 2 Topmargin 2 BottomMargin 2 columnsPerLine 132 pageHeaderLines 5 pageFooterLines 2

  30. ...Sections in a Mahareport template file • ONSTARTOFREPORT Section • This section is optional and will be executed only once at the beginning of the formatting process • You can specify any valid action statements to carry out your requirements • When the formatting process begins, only the repository variables are available. Variables defined in other sections cannot be used

  31. ...Sections in a Mahareport template file • Variables defined in other sections cannot be used • First record is not available at the time of executing onstartofreport section • No header and footer will be printed while this section is being processed • The repository variables are usually used to print the criteria on the first page of the report

  32. ...Sections in a Mahareport template file • Example ONSTARTOFREPORT execute printCrit print bankName column 10 print branchName column 60 nextline print divName column 10 print dpCode column 60

  33. ...Sections in a Mahareport template file • PAGEHEADER Section • This section is optional and will be called whenever there is a PageBreak or a NextPage • In this section, you can specify any valid Action statements to print headers at the top of the page Example PAGEHEADER execute pageHeader

  34. ...Sections in a Mahareport template file • PAGEFOOTER Section • This section is optional and can be called whenever there is a PageBreak or a NextPage • In this section, you can specify any valid Action statements to print footers at the bottom of the page Example PAGEFOOTER execute pageFooter

  35. ...Sections in a Mahareport template file • ONENDOFREPORT Section • This section is optional and will be executed only once at the end of the formatting process • Any valid action statements to carry out the requirements can be specified here • No header and footer will be printed while this section is being processed

  36. ...Sections in a Mahareport template file Example ONENDOFREPORT nextline print "Place : " nextline print "Date:" nextline nextline print "Prepared By" column 28 print "Checked By" column 50 print "Manager/Sr.Manager" column 70

  37. ...Sections in a Mahareport template file • BEFOREBREAKOF Section • This is an optional section in which you can specify valid Action statements • The syntax is BEFOREBREAKOF varname Where ‘varname’ is a variable or a field that has been defined in the GROUPANDSORT and RECORDLAYOUT sections

  38. ...Sections in a Mahareport template file Example BEFOREBREAKOF intRate separatorLine Before breaking the group intRate the separatorLine will be printed

  39. ...Sections in a Mahareport template file • AFTERBREAKOF Section • This is an optional section in which you can specify valid Action statements, similar to the BEFOREBREAKOF section Example AFTERBREAKOF intRate print "Totals for IntRate " print groupCount intRate column 30 print groupSum balance column 55 nextline

  40. Action Statements • Print • This statement is used for printing the value of a specific variable. The syntax is: • print [ modifier] varname [column ccc] [[size sss [precision p]] | [format “##,###.##$$”]] [ center| rightjustify|leftjustify] [fillAscii value ] [autoComma]

  41. ...Action Statements • Set • The set statement is used to set the value of a variable/field. The syntax is set varname = expression Where expression is a valid arithmetic combination of variable names, function return values and constants. • Example set pageNumber=1 (sets the value of the variable ‘pageNumber’ to 1)

  42. ...Action Statements • Display • The display statement is used to display values on the screen when the report is being processed. • The syntax is display varname| string constant | number constant| “\n” (\n is used as linefeed here)

  43. ...Action Statements • Execute • The execute statement is used to invoke a procedure. The syntax is execute procedure name • Example if (rptCode = "1100") begin execute check_value end

  44. ...Action Statements • Begin ...... End • The begin...end statements are used to mark the beginning and end of a block of Action Statements. These statements can be used with if...else actions to denote that a block of statements should be executed conditionally.

  45. ...Action Statements • Example PROCEDURE printReportHdr begin print bankName column 35 print " " print branchName nextline nextline execute printReportName nextLine end

  46. ...Action Statements • If .... Else The If...Else statements are used to conditionally execute a set of action statements. The syntax is if expression Block of code else block of code

  47. ...Action Statements • Example if pr_station = "N" begin print "Date Stamp" column 53 print "Manager" column 76 end

  48. ...Action Statements • NextPage • This statement is used when you want to skip a page while printing the report. When this action is used, the pageheader and pagefooter sections will be automatically invoked. • NextLine • This statement advances the report by one line. • This should be used after every print statement because the print action statement does not automatically move on to the next line

  49. ...Action Statements • NextLineIfNotBlank • This statement is similar to NextLine except that a line will be skipped only if something has not been printed on that line. • DontFlushAfterSection • When any section ends, the NextLine action statement is automatically invoked. To prevent this, you can use the DontFlushAfterSection statement. This is applicable only to section containing the DontFlushAfterSection statement.

  50. ...Action Statements • SeparatorLine • This action statement prints the ‘-’ character on an entire line for a length which is columnsperpage minus the sum of leftmargin and rightmargin

More Related