MS4BI HELP 2019

by MS4script
01-Introduction
Preface & Copyright
Getting started
Demos Simple
02- Declarations
Structure
Type
03- Instructions
Conditions if,do,while..
String functions Str..()
Get + Include functions Get, Include..
Date-Time Day, Time, Year.
Display
Call
Formulas Complex
04- Database
Connector Ado, Odbc, Dsn, SAP, Ms4
Connect DB Create, delete
Import DataSource Import, Consolidation
Administration Admin, User
05- Sql-Query
Sql
Query Form : BTS,SHOW
Grid option
06- Charts
Forms Show, Win, Image, Excel, Morris...
Pie Std, Donut, 3D...
Bar Std, Stack, Line, Area, Plot
Radar
QrCode, Gauge
Step, Stock...
,Google,Leaflet... GeoMap
,Gantt,Timeline,Org.
07- Dashboard
Form tab, no tab
Responsive UI
08- Report
Report Hierarchy
Report Design
09- Filters
Dialogue + Call
10- Menus
Menu Design
Menu Frameset
Menu Special
11-UI : Responsive
Tables Responsive,Frame,position
List Group
Text
Panel Header, body, Footer
Button Button, Progress Bar
Icon & Button
Collapse Group, Panel
Notifications
12- Encryption
Encrypt
Decrypt
13- Windows
Dialogue
Picture, Frame, Button..
MsgBox
Grid
14- Cloud.
Account Open
15- Css, html, Php, js.
Insert Native language Begin_sw..End_Sw
16-Install + tools.
Installation & Configuration This Menu
Generate Native... Php, Html, js..
Code Generator Ms4 Script
MarkDown Ms4 Script
Source Code Menu Help This Menu
written with ms4script
     

BASIC HELP : MS4BI by MS4script 2019 version 1

Chapter 9: DIALOGUE FILTERS

KEYWORD : MS4_DIALOGFILTERS

CALL:FUNCTION

Definition

Calls a function within an MS4 script, creates a Windows query dialogue to select filters: fields and values are passed as an argument to the function by export to a display function: query, report..

Syntax 1

 
MS4_DIALOGFILTERS (  title :  " literal  your title  ")	
	 CALL:FUNCTION( MS4_script_name)
	  EXPORTING : DBNAME
	  EXPORTING : TABLE NAME
	  EXPORTING : VarSqlPredicat
 	

Example INPUT : 3 output arguments

INPUT + CALL 1 : MS4_DIALOGFILTERS

The arguments that will be passed to the display function : the first 3 arguments are

MANDATORY


1st argument : The database
2nd argument : The table or view as loaded and filtered in the query
3rd argument : the sql script output by the query dialogue, filtered as per input

INPUT + CALL 1 : MS4_DIALOGFILTERS

Example OUTPUT : 3 input arguments \MondaySoftware\MS4BI\zInclude\Call\function\ModelFilters_QueryOption.ms4

      	
#includeSYSpathMS4BI "\zInclude\includeChart.h"
integer : no :=0, yes :=1;
Char :   zCube :255 ,zView:255,zSqlPredicat:1024;
 

GetInputArgument(1:zCube); 
 GetInputArgument(2:zView);
  GetInputArgument(3:zSqlPredicat);
   
 
ConnectDB{ms4DB}(zCube);
	Ms4_Query: Web{ms4DB} Option  : 
		BEGIN 
           	Style :$BLACK ,
		 	height :1050,  
            pagesize:40,
 		 	ColumMenu :yes,
		 	Pageable  :yes,
		 	Resizable :yes,
		 	Sortable :yes,
			 ViewResult:yes,
	        filterable:yes 
		END  
        ("%s",zSqlPredicat);
 
DestroyEnvSql();
 	

Example OUTPUT

OUTPUT + CALL + ARGUMENT : QUERY (for example)

Syntax 2

 
MS4_DIALOGFILTERS (  title :  " literal  your title  ")	
	 CALL:FUNCTION( MS4_script_name)
	  EXPORTING : DBNAME
	  EXPORTING : TABLE NAME
	  EXPORTING : VarSqlPredicat
	   EXPORTING FiltersField : "VarName1" ,  yes(1) or no(0) (input value : mandatory = yes else no) 
	   EXPORTING FiltersField : "VarName2" ,  yes(1) or no(0) (input value : mandatory = yes else no) 
	

Example INPUT : 5 output arguments

INPUT + CALL 2 : MS4_DIALOGFILTERS

The arguments will be passed to the display function : the first 3 arguments are

MANDATORY


1st argument : The database
2nd argument : The table or view as loaded and filtered via the query dialogue
3rd argument : the sql script output by the query dialogue, filtered as per input
4th, 5th...arguments are the selection variables from the FILTERS dialogue box

INPUT + CALL 2 : MS4_DIALOGFILTERS

Example OUTPUT : 4 input arguments \MondaySoftware\MS4BI\zInclude\Call\function\ModelFilters_ReportDesignLevel3

      	
 
float    :  totalPercent  dec(2);
Char     :  formaNum1:128,formatotalEdit:128,formatotalLevel:128,formatotalpercent:128, filestylecss:255;
INTEGER  :  Totalorders,TotalEmployee,totallevelNum,Sql_totalOrderId;
 Char :   zCube :255 ,zView:255,zSqlPredicat:1024,zField1:255;
 Text :    LpathMonday;

GetInputArgument(1:zCube); 
GetInputArgument(2:zView);
GetInputArgument(3:zSqlPredicat); ** no need for this example!! 
GetInputArgument(4:zField1);
          	
          ConnectDB{Ms4DB}(zCube);
          Ms4_query{ms4db} option : into  $MS4DBTMP 
 	("SELECT   DISTINCT a.orderID ,a.employeeid,a.LastName , a.CustomerID , a.ShipName, " +
        " a.ShipAddress,a.ShipCity,a.ShipRegion,a.ShipPostalCode,a.ShipCountry" +
        "   from  [%s] as a  where a.employeeid in(%s)  ",zView,zField1) ; 
  		DestroyEnvSql();
   
  GetDirSysPathMS4BI(LpathMonday);
  Concatene  LpathMonday,"\zInclude\css\StyleReportDesign\standardStyleReport.css" into fileStyleCss;
 
** ****************************************
** REPORT
** **************************************** 
 DECLARE SCHEMA_REPORT  :   ReportDesign 
 	{      integer : EmployeeID  ,OrderID    ;
           TEXT   :   LastName ,  CustomerID , ShipName, ShipAddress,ShipCity,ShipRegion,ShipPostalCode,ShipCountry ; 
        }  ;
Begin_Report 
  REPORTINPUT :  ConnectDB { Ms4DB} ($MS4DBTMP) use View  ($ms4ViewDBtmp)    
  REPORTFORM:DESIGN  
  Group    Order   by  :  ReportDesign.EmployeeID 
                
 LinkCss :   fileStyleCss

Start_Design :
** ******************************
Report_Header 
 	Print  : "  ( update style Css : \MondaySoftware\MS4BI\zInclude\css\StyleReportDesign\xxxxxxxxxxxx.css) " ;
  	
End_Report_Header 

Group_Header     : 01 ** level : 01 ,02,03 etc..
	 Print TD : "

HEADER GROUP LEVEL :

", $Level ," Employee ..:", ReportDesign.EmployeeID , ReportDesign.LastName; END_Group_Header DETAIL .... End_Report ;

Example OUTPUT

OUPUT + CALL + ARGUMENT : REPORT DESIGN (for example)

Prerequisites

All of the scripts must be located in the MS4BI system directory :
driver:\MondaySoftware\MS4BI\zInclude\Call\function

Remarks

Examples : DRIVER:\\MondaySoftware\MS4BI\02-DEMO-DESKTOP-BI-EXCELandSTANDARD\12-FILTERS
Arguments are handled by the script that is being called.
See (without fail) GETINPUTARGUMENT..
Declare argument variables (CHAR,TEXT..)
Returns the variables content in the same order as CALL/EXPORTING 1, EXPORTING 2
The function name in the CALL is the name of the MS4 script in the directory:\MondaySoftware\MS4BI\zInclude\Call\function **

See Also

GETINPUTARGUMENT , CALL:FUNCTION..

Interested in our project? contact@monday-software.com
The Monday Software team


Copyright 2019 by Monday Software

the official sites :
www.monday-software.com
www.ms4bi.com
demos.ms4bi.com
getms4bi.com
getms4bifree.com
cloud.ms4bi.com
cloud.testing.ms4bi.com
www.ms4script.com

Our purpose : Keep it simple !


written with ms4script
  • MS4BI v.00.0005.02.2019
  • MS4BIRE v.00.0005.02.2019
  • MS4SCRIPT v.00.0005.02.2019
  • help 02/2019

MS4BI in 5 minutes