MS4BIĀ®

MS4BI HELP 2022

by MS4script
01-Introduction
Preface & Copyright
Getting started
Informations + Cmd/param Server
Demos Simple
02- Declarations
Structure
Type
03- Instructions
Conditions if,do,while..
Char/Text functions Char or Text..()
Get + Include functions Get, Include..
String functions String# (hashtag)
Date-Time Day, Time, Year.
Display
Call
Formulas Complex
04- Database
Connector Ado, Odbc, Dsn, SAP, Ms4
DB Connect Create, delete
Import DataSource Import, Consolidation
Administration Admin, User
05- Sql-Query
Sql
Query Form : BTS,Plus
Grid option
06- Charts
Forms Plus, 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.
DrawWindow [web]
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 Custom
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

Designer

00-OverView
01-Transaction
02-Setting
05-Import
10-Formula
15-Report-Part1
16-Report-Part2
20-Query-Part1
21-Query-Part2
25-Report-Query-Style
30-QrCodeImage
31-Windows
32-Frame
40-TabStrip
50-Collapse
60-BeginForm
63-Input-SubmitBox
70-Input-Select
71-Input-Insert
72-Input-Update
73-Input-Delete
75-Input-Query
77-ListComBo
81-Button-Link
82-Button-DataList
86-Sticky-Label
91-Insert-PhpJsHtml
92-Insert-MS4script
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

2022 version 1.10

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 \MandragorePlanete\MS4BI\zInclude\Call\function\ModelFilters_QueryOption.ms4

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

GetInputArgument(1:zCube); 
 GetInputArgument(2:zView);
  GetInputArgument(3:zSqlPredicat);
   
 
DBconnect{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);
 
Sql_DestroyEnv();
 	

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 \MandragorePlanete\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 :    LpathMgPlanete;

GetInputArgument(1:zCube); 
GetInputArgument(2:zView);
GetInputArgument(3:zSqlPredicat); ** no need for this example!! 
GetInputArgument(4:zField1);
          	
          DBconnect{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) ; 
  		Sql_DestroyEnv();
   
  GetDirSysPathMS4BI(LpathMgPlanete);
  Concatene  LpathMgPlanete,"\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 :  DBconnect { Ms4DB} ($MS4DBTMP) use View  ($ms4ViewDBtmp)    
  REPORTFORM:DESIGN  
  Group    Order   by  :  ReportDesign.EmployeeID 
                
 LinkCss :   fileStyleCss

Start_Design :
** ******************************
Report_Header 
 	Print  : "  ( update style Css : \MandragorePlanete\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:\MandragorePlanete\MS4BI\zInclude\Call\function

Remarks

Examples : DRIVER:\\MandragorePlanete\MS4BI\02-DEMO-DESKTOP-BI-EXCELandSTANDARD\21-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:\MandragorePlanete\MS4BI\zInclude\Call\function **

See Also

GETINPUTARGUMENT , CALL:FUNCTION..

Interested in joining us? contact@mgplanete.com
The Mg Planete team


Copyright 2022 by Mandragore Planete

the official sites :
mgplanete.com
getms4bi.com
demos.ms4bi.com
help.ms4bi.com
ms4script.com

Download

official site :
getms4bi.com

Our purpose : Keep it simple !


written with ms4script
  • help 01.010.2022.8

MS4BI in 5 minutes