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 13 : WINDOWS

KEYWORD : GRID

Definition

Creates a Windows grid in a Windows dialogue box.

Syntax

 		   	
Grid x,y, (height) integer, (width) integer , VarGrid 
Property : Heightcolumn integer Heightline integer, Max Column integer, Max Line integer
Create :
Column integer : literal or string " ,Property : ButtonPush or char or checkbox ,Size integer
Column integer : literal or string " ,Property : ButtonPush or char or checkbox ,Size integer
Column integer : ...

Example

 	
#includeSYSpathMS4BI "\zInclude\IncludeSysMs4Windows.h"     
Begin_Transaction : Trans1 Execute Transaction With Exit_TRANS1 != 1	
Begin_Dialog		
		 
       BackgroundColor : Color(192,193,218)
		WinExtendStyle : :Ws_Ex_DlgModalFrame
		WinStyle 	 : :Ws_POPUP	
                 680,10,540,630 , " Cube",UserDialog
 	Frame     ....
	Grid 10,60, 530, 500, Grid1 Property : 
	                          Heightcolumn 24 Heightline 28, Max Column 4, Max Line 530
		
		Create : 
		Column 1 : "N°     " ,Property :ButtonPush,Size 50
	 	Column 2 : "Select",Property : Checkbox,Size 45
		Column 3 : " Measures/View " ,  Property : CHAR, Size 340,Left
		Column 4 : "type " ,Property : CHAR,Size 80,Left

    Frame  	...	
 	 
End_Dialog	
 
Begin_Initialize	
 	SetbkcolorGD(Grid1: Column: 1 yellow,Column: 2 orange, Column: 3 black,Column: 4 green);
        SetcolortextGD(Grid1: Column: 1 black,  Column: 3  green, Column: 4  black);
          SetFontsGD(grid1:21,  7, 0, 0,Fw_normal, 0,0, 0, Ansi_CHARSET, Out_DEFAULT_PRECIS,
				Clip_DEFAULT_PRECIS, Default_QUALITY, Ff_SWISS, "Colibri") ;
		 
  BEGIN 
    ConnectDB{Ms4DB}(LEnvDB); 
	Ms4_SQLFetch{ms4db}("select * from sqlite_master ")
 	ForEachRow  :
			I++; clear ztypeMeasure,zMeasure;
 		 	 
			ztypeMeasure 	:= GetDataColumn:1,CHAR ;
			zMeasure 	    := GetDataColumn:2,CHAR ;
 
	Additemgd(Grid1: I , Column:1 I, Column:2  $_uncheck ,Column: 3 zMeasure,Column: 4 ztypeMeasure)	;
	End_ForEachRow ; 
   END;		
	
End_Initialize 
            
	OpenDialog (UserDialog); 
  	
	Require  x := Pressed(BoutonCancel); 
	IF (X Not_Void) THEN 		
	MsgBox : Title "My cube "		
	Message : " Ok - Transaction cancelled "	
	Button : Mb_OK		
	Icon : Mb_IconExclamation Returning (X) ;
		Exit_TRANS1 := 1 ;  Exit;	
	End_if;
	Require  x := Pressed  (ButtonGdOKButton) ;	

	IF (X Not_Void) THEN 		
 		  Line :=0;col :=0;x :=0;/* or clear..*/ 

	   	  GetitemCurrentCheckGD(Grid1) Return  (Line,col,x);
 		 /* check line GRID */  	
		 IF ((Line > 0) And ($_check = x))
		 	THEN   
 	 			GetItemTexTGd(grid1:Line,3) return (zMeasure);
                   Ms4_Query: Win {Ms4DB}("  SELECT   *  FROM    [%s] ",zMeasure)  ;  
		End_if;
    End_if;
End_Transaction ;
	

Grid 1

Grid 2 (win query)

Prerequisites

#includeSYSpathMS4BI "\zInclude\IncludeSysMs4Windows.h"

Remarks

This example :
driver:\MondaySoftware\MS4BI\zInclude\Call\function\LoadDbWin.ms4
driver:\MondaySoftware\MS4BI\02-DEMO-DESKTOP-BI-EXCELandSTANDARD\99-DATABASE\VersionADO\399-DisplayMyCubeGridView.ms4
- a WINDOWS grid cannot exceed 10,000 lines. Beyond that, use a WEB grid (no limit) _ Create : Column integer : creates XX number of columns depending on Max Column XX
\

See also

ADDITEMGD, GETITEMCURRENTCHECKGD, SETBKCOLORGD, SETCOLORTEXTGD, SETFONTSGD



KEYWORD : ADDITEMGD

Definition

Creates an item in a grid.

Syntax

 		   	
Additemgd(varWinGrid :(item)integer , Column:integer $_uncheck or CHAR (value),
                                      Column:integer $_uncheck or CHAR (value)... );

 
	

Example

 	
#includeSYSpathMS4BI "\zInclude\IncludeSysMs4Windows.h"     
Begin_Transaction : Trans1 Execute Transaction With Exit_TRANS1 != 1	
Begin_Dialog		
		 
       BackgroundColor : Color(192,193,218)
		WinExtendStyle : :Ws_Ex_DlgModalFrame
	 ....
	Grid 10,60, 530, 500, Grid1 Property : 
	                          Heightcolumn 24 Heightline 28, Max Column 4, Max Line 530 

		
		Create : 
		Column 1 : "N°     " ,Property :ButtonPush,Size 50
	 	Column 2 : "Select",Property : Checkbox,Size 45
		Column 3 : " Measures/View " ,  Property : CHAR, Size 340,Left
		Column 4 : "type " ,Property : CHAR,Size 80,Left

      	...	
 	 
End_Dialog	
             
 Begin_Initialize	
 		 
  BEGIN 
    ConnectDB{Ms4DB}(LEnvDB); 
	Ms4_SQLFetch{ms4db}("select * from sqlite_master ")
 	ForEachRow  :
			I++; clear ztypeMeasure,zMeasure;
 		 	 
			ztypeMeasure 	:= GetDataColumn:1,CHAR ;
			zMeasure 	    := GetDataColumn:2,CHAR ;
 
	Additemgd(Grid1: I , Column:1 I, Column:2  $_uncheck ,Column: 3 zMeasure,Column: 4 ztypeMeasure)	;
	End_ForEachRow ; 
   END;		
	
End_Initialize 
            
	OpenDialog (UserDialog); 
	...
End_Transaction ;
	

Prerequisites

#includeSYSpathMS4BI "\zInclude\IncludeSysMs4Windows.h"

Remarks

Warning : - Float, double and long type variables should be converted to char type.
\

See also

GRID, GETITEMCURRENTCHECKGD, GETITEMTEXTGD, SETBKCOLORGD, SETCOLORTEXTGD, SETFONTSGD



KEY WORD : GETITEMCURRENTCHECKGD

Definition

Finds if n° of the item has been checked in a column of the Windows grid .

Syntax

 		   	
 
 GetitemCurrentCheckGD(varWinGrid) Return  (integer(item),integer(column),integer(checked or unchecked));
	

Example

 	
#includeSYSpathMS4BI "\zInclude\IncludeSysMs4Windows.h"     
Begin_Transaction : Trans1 Execute Transaction With Exit_TRANS1 != 1	
Begin_Dialog		
		 
       BackgroundColor : Color(192,193,218)
		WinExtendStyle : :Ws_Ex_DlgModalFrame
	 ....
	Grid 10,60, 530, 500, Grid1 Property : 
	                          Heightcolumn 24 Heightline 28, Max Column 4, Max Line 530
		
		Create : 
		Column 1 : "N°     " ,Property :ButtonPush,Size 50
	 	Column 2 : "Select",Property : Checkbox,Size 45
		Column 3 : " Measures/View " ,  Property : CHAR, Size 340,Left
		Column 4 : "type " ,Property : CHAR,Size 80,Left

      	...	
 	 
End_Dialog	
 
	OpenDialog (UserDialog); 
  	Require  x := Pressed  (ButtonGdOk) ;	
	IF (X Not_Void) THEN 		
 		  Line :=0;col :=0;x :=0;/* or clear..*/
	   	  GetitemCurrentCheckGD(Grid1) Return  (Line,col,x);
 		 /* check GRID line*/  	
		 IF ((Line > 0) And ($_check = x))
		 	THEN   
	 	.... 
	End_if ;
	...
End_Transaction ;
	

Prerequisites

#includeSYSpathMS4BI "\zInclude\IncludeSysMs4Windows.h"

Remarks

Warning :
integer :
$_CHECK := 1,
$_UNCHECK := 0;
- GETITEMTEXTGD must be present so as to find the value of the item and the column to select with GetitemCurrentCheckGD

See also

GRID, ADDITEMGD, GETITEMTEXTGD, SETBKCOLORGD, SETCOLORTEXTGD, SETFONTSGD



KEY WORD : GETITEMTEXTGD

Definition

Find the string value of the N° of the selected item and column in a Windows grid.

Syntax

 		   	
 GetItemTextGD(varWinGrid:integer(item),integer(column)) return (string);
	

Example

 	
#includeSYSpathMS4BI "\zInclude\IncludeSysMs4Windows.h"     
Begin_Transaction : Trans1 Execute Transaction With Exit_TRANS1 != 1	
Begin_Dialog		
		 
       BackgroundColor : Color(192,193,218)
		WinExtendStyle : :Ws_Ex_DlgModalFrame
	 ....
	Grid 10,60, 530, 500, Grid1 Property : 
	                          Heightcolumn 24 Heightline 28, Max Column 4, Max Line 530
		
		Create : 
		Column 1 : "N°     " ,Property :ButtonPush,Size 50
	 	Column 2 : "Select",Property : Checkbox,Size 45
		Column 3 : " Measures/View " ,  Property : CHAR, Size 340,Left
		Column 4 : "type " ,Property : CHAR,Size 80,Left

      	...	
 	 
End_Dialog	
 
	OpenDialog (UserDialog); 
  	Require  x := Pressed  (ButtonGdOk) ;	
	IF (X Not_Void) THEN 		
 		  Line :=0;col :=0;x :=0;/* or clear..*/
	   	  GetitemCurrentCheckGD(Grid1) Return  (Line,col,x);
 		 /* check line GRID */  	
		 IF ((Line > 0) And ($_check = x))
		 	THEN   
	 	 		 GetItemTextGD(grid1:Line,3) return (zMeasure);
                   Ms4_Query: Win {Ms4DB}("  SELECT   *  FROM    [%s] ",zMeasure)  ;  
	End_if ;
	...
End_Transaction ;
	

Prerequisites

#includeSYSpathMS4BI "\zInclude\IncludeSysMs4Windows.h"

Remarks

Warning :
- convert float, double, long values to STRING

See also

GRID, ADDITEMGD, GETITEMCURRENTCHECKGD, SETBKCOLORGD, SETCOLORTEXTGD, SETFONTSGD



KEYWORD : SETBKCOLORGD, SETCOLORTEXTGD, SETFONTSGD

Definition

Defines the background colour, text colour or font for an item in a Windows grid.

Syntax

 		   	
SetbkcolorGD(varWinGrid: Column: colour integer, colour integer...);
SetcolortextGD(varWinGrid: Column: colour integer, colour integer...);
SetFontsGD(varWinGrid: Height, Width, Escapement, Orientation, Weight, Italic,
Underline, StrikeOut, CharSet, OutPrecision, ClipPrecision, Quality, PitchAndFamily, pszFaceName) ;

Example

 	
#includeSYSpathMS4BI "\zInclude\IncludeSysMs4Windows.h"     
Begin_Transaction : Trans1 Execute Transaction With Exit_TRANS1 != 1	
Begin_Dialog		
		 
       BackgroundColor : Color(192,193,218)
		WinExtendStyle : :Ws_Ex_DlgModalFrame
	 ....
	Grid 10,60, 530, 500, Grid1 Property : 
	                          Heightcolumn 24 Heightline 28, Max Column 4, Max Line 530
		
		Create : 
		Column 1 : "N°     " ,Property :ButtonPush,Size 50
	 	Column 2 : "Select",Property : Checkbox,Size 45
		Column 3 : " Measures/View " ,  Property : CHAR, Size 340,Left
		Column 4 : "type " ,Property : CHAR,Size 80,Left

      	...	
 	 
End_Dialog	
 Begin_Initialize	
 	SetbkcolorGD(Grid1: Column: 1 yellow,Column: 2 orange, Column: 3 black,Column: 4 green);
        SetcolortextGD(Grid1: Column: 1 black,  Column: 3  green, Column: 4  black);
          SetFontsGD(grid1:21,  7, 0, 0,Fw_normal, 0,0, 0, Ansi_CHARSET, Out_DEFAULT_PRECIS,
				Clip_DEFAULT_PRECIS, Default_QUALITY, Ff_SWISS, "Colibri") ;
		 
  End_Initialize 
            
	OpenDialog (UserDialog); 
	...
End_Transaction ;
	

Prerequisites

#includeSYSpathMS4BI "\zInclude\IncludeSysMs4Windows.h"

Remarks

SETFONTSGD : all possible constant values can be found here :
#includeSYSpathMS4BI "\zInclude\IncludeSysMs4Windows.h"

See also

GRID, ADDITEMGD, GETITEMCURRENTCHECKGD, GETITEMTEXTGD

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