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 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

  	
#include  "#SYSPATHMS4BI+\zInclude\IncludeSysMs4Windows.h"     

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	
 	Grid_SetBkColor(Grid1: Column: 1 yellow,Column: 2 orange, Column: 3 black,Column: 4 green);
        Grid_SetColorText(Grid1: Column: 1 black,  Column: 3  green, Column: 4  black);
          Grid_SetFonts(grid1:21,  7, 0, 0,Fw_normal, 0,0, 0, Ansi_CHARSET, Out_DEFAULT_PRECIS,
				Clip_DEFAULT_PRECIS, Default_QUALITY, Ff_SWISS, "Colibri") ;
		 
  BEGIN 
    DBconnect{Ms4DB}(LEnvDB); 
	Ms4_SQLFetch{ms4db}("select * from sqlite_master ")
 	Row_ForEach  :
			I++; clear ztypeMeasure,zMeasure;
 		 	 
			ztypeMeasure 	:= Column_GetData:1,CHAR ;
			zMeasure 	    := Column_GetData:2,CHAR ;
 
	GRID_AddItem(Grid1: I , Column:1 I, Column:2  $_uncheck ,Column: 3 zMeasure,Column: 4 ztypeMeasure)	;
	End_Row_ForEach ; 
   END;		
		OpenDialog (UserDialog); 
End_Initialize ;
Begin_Transaction : Trans1 Execute Transaction With Exit_TRANS1 != 1	      

  	
	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..*/ 

	   	  GRID_GetitemCurrentCheck(Grid1) Return  (Line,col,x);
 		 /* check line GRID */  	
		 IF ((Line > 0) And ($_check = x))
		 	THEN   
 	 			GRID_GetItemTexT(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

#include "#SYSPATHMS4BI+\zInclude\IncludeSysMs4Windows.h"

Remarks

This example :
driver:\MandragorePlanete\MS4BI\zInclude\Call\function\LoadDbWin.ms4
driver:\MandragorePlanete\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

GRID_ADDITEM, GRID_GETITEMCURRENTCHECK, Grid_SetBkColor, Grid_SetColorText, Grid_SetFonts



KEYWORD : GRID_ADDITEM

Definition

Creates an item in a grid.

Syntax

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

 
	

Example

  	
#include  "#SYSPATHMS4BI+\zInclude\IncludeSysMs4Windows.h"     

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 
    DBconnect{Ms4DB}(LEnvDB); 
	Ms4_SQLFetch{ms4db}("select * from sqlite_master ")
 	Row_ForEach  :
			I++; clear ztypeMeasure,zMeasure;
 		 	 
			ztypeMeasure 	:= Column_GetData:1,CHAR ;
			zMeasure 	    := Column_GetData:2,CHAR ;
 
	GRID_AddItem(Grid1: I , Column:1 I, Column:2  $_uncheck ,Column: 3 zMeasure,Column: 4 ztypeMeasure)	;
	End_Row_ForEach ; 
   END;		
	OpenDialog (UserDialog); 
End_Initialize ;
        Begin_Transaction : Trans1 Execute Transaction With Exit_TRANS1 != 1	    
	
				...
		End_Transaction ;
	

Prerequisites

#include "#SYSPATHMS4BI+\zInclude\IncludeSysMs4Windows.h"

Remarks

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

See also

GRID, GRID_GETITEMCURRENTCHECK, GRID_GETITEMTEXT, GRID_SETBKCOLOR, GRID_SETCOLORTEXT, GRID_SETFONTS



KEY WORD : GRID_GETITEMCURRENTCHECK

Definition

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

Syntax

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

Example

  	
#include  "#SYSPATHMS4BI+\zInclude\IncludeSysMs4Windows.h"     

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); 
	Begin_Transaction : Trans1 Execute Transaction With Exit_TRANS1 != 1	
  	Require  x := Pressed  (ButtonGdOk) ;	
	IF (X Not_Void) THEN 		
 		  Line :=0;col :=0;x :=0;/* or clear..*/
	   	  GRID_GetitemCurrentCheck(Grid1) Return  (Line,col,x);
 		 /* check GRID line*/  	
		 IF ((Line > 0) And ($_check = x))
		 	THEN   
	 	.... 
	End_if ;
	...
End_Transaction ;
	

Prerequisites

#include "#SYSPATHMS4BI+\zInclude\IncludeSysMs4Windows.h"

Remarks

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

See also

GRID, GRID_ADDITEM, GRID_GETITEMTEXT, Grid_SetBkColor, Grid_SetColorText, Grid_SetFonts



KEY WORD : GRID_GETITEMTEXT

Definition

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

Syntax

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

Example

  	
#include  "#SYSPATHMS4BI+\zInclude\IncludeSysMs4Windows.h"     

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); 
Begin_Transaction : Trans1 Execute Transaction With Exit_TRANS1 != 1		
  	Require  x := Pressed  (ButtonGdOk) ;	
	IF (X Not_Void) THEN 		
 		  Line :=0;col :=0;x :=0;/* or clear..*/
	   	  GRID_GetitemCurrentCheck(Grid1) Return  (Line,col,x);
 		 /* check line GRID */  	
		 IF ((Line > 0) And ($_check = x))
		 	THEN   
	 	 		 GRID_GETITEMTEXT(grid1:Line,3) return (zMeasure);
                   Ms4_Query: Win {Ms4DB}("  SELECT   *  FROM    [%s] ",zMeasure)  ;  
	End_if ;
	...
End_Transaction ;
	

Prerequisites

#include "#SYSPATHMS4BI+\zInclude\IncludeSysMs4Windows.h"

Remarks

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

See also

GRID, GRID_ADDITEM, GRID_GETITEMCURRENTCHECK, Grid_SetBkColor, Grid_SetColorText, Grid_SetFonts



KEYWORD : Grid_SetBkColor, Grid_SetColorText, Grid_SetFonts

Definition

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

Syntax

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

Example

  	
#include  "#SYSPATHMS4BI+\zInclude\IncludeSysMs4Windows.h"     

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	
 	Grid_SetBkColor(Grid1: Column: 1 yellow,Column: 2 orange, Column: 3 black,Column: 4 green);
        Grid_SetColorText(Grid1: Column: 1 black,  Column: 3  green, Column: 4  black);
          Grid_SetFonts(grid1:21,  7, 0, 0,Fw_normal, 0,0, 0, Ansi_CHARSET, Out_DEFAULT_PRECIS,
				Clip_DEFAULT_PRECIS, Default_QUALITY, Ff_SWISS, "Colibri") ;
		OpenDialog (UserDialog); 	 
  End_Initialize 
 Begin_Transaction : Trans1 Execute Transaction With Exit_TRANS1 != 1	           

	...
End_Transaction ;
	

Prerequisites

#include "#SYSPATHMS4BI+\zInclude\IncludeSysMs4Windows.h"

Remarks

Grid_SetFonts : all possible constant values can be found here :
#include "#SYSPATHMS4BI+\zInclude\IncludeSysMs4Windows.h"

See also

GRID, GRID_ADDITEM, GRID_GETITEMCURRENTCHECK, GRID_GETITEMTEXT

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

MS4BI Trial Version : Informations :
this message will disappear : Purchase Professional Licence :

https://getms4bi.com