Previous Topic

Next Topic

FD Tutorial: Dashboard Reports

Using the Form Designer, you can create a dashboard to show graphs and list key figures for your company.

This tutorial will show you how to create buttons to link to Reports on the form.

  1. Go to Navigator > Setup > Form Designer.
  2. Click the UserButton Button button, then click inside the form on the right. A button object will be added to the form.
  3. Click the button on the form, to show the properties on the left.
  4. Change the Name of the button to btnGLReport.
  5. Change the Caption of the button to GL Trial Balance.
  6. Resize the button to show the caption.

    You can now write the MaxBasic code to run the report

  7. Write the code to run the report. Click on the Code tab. Enter the following:

    Sub ONLinkTrialBalance
      Dim Form1 as Object
      PeriodToUse = CurrentPeriod("AR")
      Form1 = CreateObject("Accredo.GLTrialBalanceReport")
      Form1.Layout = "Trial Balance"
      Form1.Period = PeriodToUse
    End Sub

  8. Go to the Layout tab, and click the button.
  9. Go to the Events tab. Set OnClick to OnLinkTrialBalance.
  10. You can add a label as a title to the form. Click the UserLabel Label button, then click on the form.
  11. Change the Caption to Reports.
  12. You can change label size, position, font, colour or other properties.
  13. To add other reports, repeat steps 2 - 9, changing the code in Step 7. You can add different reports by changing the code. Also change the name of the sub-routines, and the button captions. Some other reports you could add are:

    Report

    Code

    AR Trial Balance

    Dim Form1 as Object
    PeriodToUse = CurrentPeriod("AR")
    Form1 = CreateObject("Accredo.ARAgedBalancesReport")
    Form1.Layout = "Aged Trial Balance"
    Form1.Period = PeriodToUse

    AP Trial Balance

    Dim Form1 as Object
    PeriodToUse = CurrentPeriod("AP")
    Form1 = CreateObject("Accredo.APAgedBalancesReport")
    Form1.Layout = "Aged Trial Balance"
    Form1.Period = PeriodToUse

    Cash Flow

    Dim Form1 as Object
    Form1 = CreateObject("Accredo.CBCashFlowReport")
    Form1.Layout = "Cash Flow Report"

    Product Balances

    Dim Form1 as Object
    PeriodToUse = CurrentPeriod("AR")
    Form1 = CreateObject("Accredo.ICProductBalancesReport")

    Form1.Layout = "Product Balances"
    Form1.Period = PeriodToUse

  14. Click ReportSaveToDisk Save Form (Ctrl+S).
  15. Click Run (Ctrl+R) to test the form.

See Also

FD Dashboard Tutorials

Book Contents

Book Index