Adding a report, chart, cube or dashboard which can be run from the Calender / Scheduler 

The Orixa scheduler has a built in feature allowing Admin users to add resources which allows users to open dashboards and reports directly from the Scheduler context menu.

The resulting dashboards and reports will show data for the selected date-range displayed in the Scheduler. This can be useful to allow staff to see reports of data such as Sales or Work-done for the dates they are viewing at that time.

The main issues to understand when adding a Resource that will be visible in the Calender / Scheduler is that the "LocationID" should be set to "Scheduler" and the SQL for the resource should include start and end date wild-cards so that Orixa can generate reports matched to the range of dates visible in the Calender / Scheduler.

Scheduler with context menu open. No report is yet visible in the context menu. The user has right-clicked with the mouse to access the context menu.

Go to the "Resources" system table and add a record. 
Ensure that the LocationID is set to "Scheduler" and the ComponentID is set to "Report"

  1. Name used in the Resources record will control the name displayed in the Scheduler-menu.
  2. Ensure "ComponentID" and "LocationID" are set correctly: remember you can run any kind of resource, so any "ComponentID" is acceptable, But only those Resources marked with "LocationID" = Scheduler will show in the Scheduler context menu.
  3. Write SQL to return data for the report. Note that it must include special characters to accept a "start-date" and "end-date" passed by the Scheduler. For more information on this, see the SQL examples at the end of this topic.
  1. Once the SQL is complete, test the SQL using the context menu in the SQL Editor. Then select "Refresh Database Resources" to add the new SQL to the App's Resources (these are loaded at start up). Now you can design the Report, Chart, Cube or Grid. The image above shows the Developer opening the Report Designer from the menu to lay out the elements of the report. Details of how to design Reports, Charts and other types of dashboard are shown elsewhere in the Help.

Sample of Scheduler SQL showing the date-range wild-cards.

Scheduler Report date-setting  note that two "wild cards" are added to the SQL to indicate the where the system should insert the start and end-dates. Also note that the "DATE" Keyword is added before the wild-cards, to ensure that the framework interprets the data correctly.
It is also acceptable to use the Syntax: WHERE [DateFieldName] BETWEEN CAST('%s' AS DATE) AND CAST('%s' AS DATE). Note that multiple WHERE / AND statements can be supported, using '0:%s' and '1:%s' for the Start and End date respectively.

Scheduler with report added  

 

Report being previewed  

 

SQL Script used by example scheduler report

SELECT
    P.ID,
    P.FullName,
    W.DateDone,
    C1.ShortName,
    C.Description,
    W.Hours,
    W.Value
FROM
    WorkItems W
    LEFT JOIN People P ON (W.StaffID = P.ID)
    LEFT JOIN Contracts C1 ON (W.ContractsID = C1.ID)
    LEFT JOIN ContractItems C ON (W.ContractItemsID = C.ID)
WHERE W.DateDone BETWEEN DATE '%s' AND DATE '%s'

Other Types of Resource

List of Resource Types  

Any Resource of your choice can be "launched" from the Scheduler, and will automatically be fed with start and end dates as per the user's current date-selection. Note that "ComponentID" of "Custom Resource" should not be used, this type is used for specialized resources that are called by the App. Explanations of how to design other forms of Resource are included elsewhere in the Help.