1

(1 replies, posted in General)

hello MVD's i need somme help plz

2

(3 replies, posted in General)

close your project in tach

derek wrote:

Why are you using a text field?
A date field with the correct formatting should give you what you have asked for and there is no risk of users inputting dates into a text field with the incorrect format.
Derek.

why the format of date not changed in fastreport ?
format yyyy/MM

derek wrote:

Why are you using a text field?
A date field with the correct formatting should give you what you have asked for and there is no risk of users inputting dates into a text field with the incorrect format.
Derek.

Thaanks that's what i need exactly

blackpearl8534 wrote:

Please upload project

blackpearl8534 wrote:

Please explain the question... what do you want to do??

I want to filter data by two textbox  for exampl whe i put 2021 in the first textbox and 2022 in the second i find only data in the marge of 2021 till 2022 look the picture min to max
I know that there is a a kind of solution by using datetimepiker
But i want to filter by textbox because the data type in the feild is a text and not a date/time
I wish that u understand me
Thanks

7

(9 replies, posted in General)

there is the code to convert number to word in franch
procedure MISSIONCADRE_Button3_OnClick (Sender: TObject; var Cancel: boolean);
begin
    //mission.Label33.Caption := ToWords(mission.Edit23.Value);
    MISSIONCADRE.Label33.Caption := MoneyToWords(MISSIONCADRE.Edit25.Value);
    MISSIONCADRE.Edit23.text := MoneyToWords(MISSIONCADRE.Edit25.Value);
end;

function RoundOff(num:Real; places:integer=2): Real;
begin
    result := StrToFloat(Format('%.'+IntToStr(places)+'f', [num]));
end;

function LPad(PadString : string ; HowMany : integer ; PadValue : string='0'): String;
var
   Counter : integer;
   x : integer;
   NewString : string;
begin
   Counter := HowMany - Length(PadString);
   NewString := '';
   for x := 1 to Counter do
   begin
      NewString := NewString + PadValue;
   end;
   Result := NewString + PadString;
end;

function RPad(PadString : string ; HowMany : integer ; PadValue : string='0'): String;
var
   Counter : integer;
   x : integer;
   NewString : string;
begin
   Counter := HowMany - Length(PadString);
   NewString := '';
   for x := 1 to Counter do
   begin
      NewString := PadValue+NewString;
   end;
   Result := PadString+NewString;
end;

{
    /// https://stackoverflow.com/questions/115 … r-in-words
}
function MoneyToWords(const Number: double; UseCurrency: Boolean = True): String;
var
    _fraction,_i,_maxLen,_levels,_numLen,_cutPos,_hundred,_tens,_currNum,_singles: Integer;
    _strNum,_fr: String;
    _arrStr : Array of String;
    _LIST1 : Array of String =['', 'un', 'deux', 'trois', 'quatre', 'cinq', 'six', 'sept', 'huit', 'neuf', 'dix', 'onze',
            'douze', 'treize', 'quatorze', 'quinze', 'seize', 'dix-sept', 'dix-huit', 'dix-neuf'
        ] ;
    _LIST2 : Array of String = ['', 'dix', 'vingt', 'trente', 'quarante', 'cinquante', 'soixante', 'soixante-dix', 'quatre-vingt', 'quatre-vingt-dix', 'cent'] ;
    _LIST3 : Array of String =['', 'mille', 'million', 'milliard', 'billion', 'quadrillion', 'quintillion', 'sextillion', 'septillion',
            'octillion', 'nonillion', 'decillion', 'undecillion', 'duodecillion', 'tredecillion', 'quattuordecillion',
            'quindecillion', 'sexdecillion', 'septendecillion', 'octodecillion', 'novemdecillion', 'vigintillion'
        ] ;
begin
    result := '';
    _fraction := 0;
    _strNum := VarToStr(Number);
    _strNum := ReplaceStr(_strNum,',','');
    if ValidFloat(_strNum) then begin
        if StrToFloat(_strNum) > 0 then begin
            _strNum := FloatToStr(RoundOff(StrToFloat(_strNum)));
            _arrStr := SplitString(_strNum,'.');

            if Length(_arrStr) > 1 then begin
                _fr := _arrStr[1];
                _fraction := StrToInt(_arrStr[1]);
            end;

            _strNum := _arrStr[0];
            _numLen := Length(_strNum);
            _levels := Int((_numLen + 2) / 3);
            _maxLen := _levels * 3;

            _strNum := LPAD(_strNum, _maxLen);

            for _i:=1 to Int(Length(_strNum)/3) do begin
                Dec(_levels);
                _cutPos := (3*_i)-3;
                if _i>1 then begin
                    Inc(_cutPos);
                end;

                _currNum := StrToInt(Copy(_strNum,_cutPos,3));
                _hundred := Int(_currNum/100);
                if _hundred > 0 then begin
                    result := result + _LIST1[_hundred] + ' cent ';
                end;

                _tens := _currNum mod 100;
                if _tens < 20 then begin
                    result := result + _LIST1[_tens];
                end else begin
                    result := result + _LIST2[Int(_tens/10)];
                    _singles := _currNum mod 10;
                    if _singles > 0 then
                        result := result + ' ' + _LIST1[_singles];
                end;

                if _levels > 0 then
                    if _currNum > 0  then
                        result := result + ' ' + _LIST3[_levels] + ' ';
            end;

            if result[Length(result)]=' ' then
                result :=  Copy(result,0,Length(result)-1);

            if _fraction > 0 then begin
                if Length(_arrStr[1]) > 1 then
                    result := result + ' and ' + LPad(_arrStr[1],2) + '/100'
                else
                    result := result + ' and ' + RPad(_arrStr[1],2) + '/100'
            end;
        end;
    end;
end;

blackpearl8534 wrote:

Create search button and find incream search in editbox properties and select search button in incream search option.
You can use filter in editbox properties like %$% etc

thanks blak its work
i need somthing pleas how to do this filtre

how to automatic filter when recap_Edit1_OnChange

10

(9 replies, posted in General)

jean.brezhonek wrote:

Hello negadi37
Try this :

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
     if ValidFloat(Form1.Edit1.Text) then
         Form1.Edit2.Text:=ToWords(Form1.Edit1.Value);
end;
JB

its works perfectly thanks but can i change the words to franch language ?

11

(9 replies, posted in General)

how to convert number to letter
exmp:
250.00 (TWO HUNDRED AND FIFTY )

in french

12

(7 replies, posted in General)

derek wrote:

Hi,
So what you want is to filter a tablegrid by 'from' and 'to dates.
Have a look at the attached - you can filter by date and by trip;  when you filter by trip, you can either use the combobox to select a trip or click in the trip tablegrid (and obviously you can use any combination of trip value and date values).
Derek.

no its not a filter its a date feild start date and end date i want to show all date between
same like in the picture

13

(7 replies, posted in General)

sibprogsistem wrote:
negadi37 wrote:

please i need help how to do that in MVD

   
   
file

thnks for your effort but not like that i to show all the date between not only the first date and the last one
exmp:
from 01/04/2022 to 05/04/2022
01/04/2022
02/04/2022
03/04/2022
04/04/2022
05/04/2022

14

(7 replies, posted in General)

derek wrote:

Hi Negadi, Hi Sibprogsistem,

It's hard to say without seeing your project (specifically your data structure).
If you can zip your project (without the .exe file) it would help.
But have a look at the attached which may give you some ideas (but there are probably other ways too).
Regards,
Derek

thnks mr Drek but not like that i want just to show the days between a period in a table grid exmp:

from 01/04/2022 to 05/04/2022
01/04/2022
02/04/2022
03/04/2022
04/04/2022
05/04/2022

15

(7 replies, posted in General)

please i need help how to do that in MVD