

Henry Olive
Members-
Content Count
327 -
Joined
-
Last visited
Everything posted by Henry Olive
-
Thank you SO MUCH Lars, Uwe After i get the same error with Lars's suggestion i noticed below situation When i move my mouse cursor on SplitString in Delphi Editor, i saw Delphi shows Quick Report's SplitString In my uses there are QRCtrls, QuickRpt, StrUtils and i need to use a quickreport in that Unit. I also tried to change StrUtils in Uses to System.StrUtils but still get the same error What should i do now ?
-
Thank you so much Uwe I changed the var names to var MyStr, LeftMyStr, RightMyStr but i still get the same error msg. Thank You
-
Good Day, My table looks like below (In a DBGrid) CODE ------- AAA AAA-AA AAA-AA-BB BBB BBB-BB BBB-BB-CC I want to make font color ClRed if the Value.Length <= 3 That is just AAA and BBB value's font.color should be red procedure TAccAccounts.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); var Str : String; begin Str := DBGrid1.Columns[0].Field.Value; if Length(Str) <= 3 then DBGrid1.Columns[0].Font.Color := ClRed else DBGrid1.Columns[0].Font.Color := ClWindowText; Self.Canvas.FillRect(Rect); end; Eventhough Delphi makes AAA clRed but doesnt make BBB clRed it is still clBlack Thank You
-
DBGrid1.Columns[1].Font.Color
Henry Olive replied to Henry Olive's topic in RTL and Delphi Object Pascal
Sorry for late respond i was sick for couple of days Thank You so much Uwe, Lajos, Programmer -
I moved this topic from Object Pascal to here which is correct forum Good Day, Delphi 10.3 I have problem when filtering a table with non english character Button1.Click Event var SearchText :=String; begin SearchText :=Edit1.Text (Which is 'MİSA' ) CDS1.FilterOptions := [foCaseInsensitive]; CDS1.Filtered := False; CDS1.Filter := UPPER ( CATEGORY ) LIKE ' + QuotedStr (SearchText + '%'); CDS1.Filtered := True; end; Eventhough i have MİSA in the table's Category field, I get an empty result What am i doing wrong ? P.s : When i use ( In FB 3 Sql ) SELECT FROM MYTABLE WHERE UPPER(CATEGORY) LIKE 'MİSA%' I get expected results w/o any problem Thank You
-
ClientDataset.Filter ( Non English Character )
Henry Olive replied to Henry Olive's topic in Databases
Thank You Dmitry -
Good Day, Delphi 10.3 I have problem when filtering a table with non english words Button1.Click Event var SearchText :=String; begin SearchText :=Edit1.Text (Which is 'MİSA' ) CDS1.FilterOptions := [foCaseInsensitive]; CDS1.Filtered := False; CDS1.Filter := UPPER ( CATEGORY ) LIKE ' + QuotedStr (SearchText + '%'); CDS1.Filtered := True; end; Eventhough i have MİSA in the table's Category field, I get an empty result What am i doing wrong ? P.s : When i use ( In FB 3 Sql ) SELECT FROM MYTABLE WHERE UPPER(CATEGORY) LIKE 'MİSA%' I get expected results w/o any problem Thank You
-
Good Day, var CardForm:TForm; begin if Dataset = dm.Customer then CardForm := fCustomer else if Dataset = dm.Items then CardForm := fItems; ..... ..... if CardForm = Nil then CardForm := TForm(CardForm).Create(Self); end; I'm getting Access Violation err.msg What am i doing wrong ? Thank You
-
Thank you SO much Peter, Programmer, Pat
-
Thank you so much Programmer, Pat, David I'm really so sorry, i think i couldnt express my problem well cause of my unsuffient english. Suppose you have Form1 (Auto Create), Form2 (NOT Auto Create) , Form3 (NOT Auto Create) Lets say there is a Combobox1 in Form1 and ComboBox1.Items are 'A', 'B' Also there is a Button1 on Form1 According to above explanations here below my codes procedure TForm1.ShowForm (MyText : String); var MyForm : TForm; begin if MyText ='A' then MyForm := Form2 else if MyText ='B' then MyForm := Form3; if MyForm = Nil then MyForm := MyForm.Create(Self); // Problem is here, even if i use MyForm := TMyForm.Create(Self) MyForm.Show; end; procedure TForm1.Button1Click(Sender: TObject); begin ShowForm (ComboBox1.Text); end; Again i'm so sorry for not explaining the problem well.
-
Thank You Stano, Attila Attila, CardForm := TCardForm.Create(Self) with above code i get below err. and cant compile i get [DCC Error] Unit2.pas(34): E2003 Undeclared identifier: 'TCardForm'
-
Good Day, MyQuery Result is like below TotalCost...TotalCostWıthExp 100 110 Is it possible something like below function function.GetBomCosts (ItemCode:String): Value1,Value2 : Double Thank You
-
Good Day, MyVar could be just '22-1' or could be '22-1, 22-2' or could be '22-1, 22-2, 22-3' or more i dont know but always there is a comma ( , ) between the str numbers I'll use these str numbers in a Sql like .... WHERE DOCNOS IN ('22-1', '22-2', ....) My Problem is 1= I don't know how many str numbers there are in MyVar 2= How to add QuotedStr into each document str number for sql where in Thank You
-
Thank you so much Rollo62, Skyzoframe
-
Good Day, I have a PageControl with 4 tabsheets When i move from a tabsheet (for examp. Tabsheet2) to another tabsheet ( for examp. Tabsheet3) I want to find out **from which TabSheet** i came to new TabSheet According to above example tabsheet names i want to find out TabSheet2 Thank You
-
Thank you so much dummzeuch
-
Good Day, Delphi 10.3 To Connect my Database (FB3) i use an INI file (it is in my EXE Path) which is like below [DataPath] Dir=MySrv:c:\MyApp\Data\ ( I fill the database name in Delphi ) In my program there is a Menu which shows (open) the BackUp Folder to the user, with below code BackUpPath := MyIniFile.ReadString('DataPath', 'Dir', '') + 'BackUp'; // MySrv:c:\MyApp\Data\BackUp ShellExecute(Handle, 'Open', PChar(BackUpPath), Nil, Nil, SW_SHOWNORMAL); Since BackUpPath = MySrv:c:\MyApp\Data\BackUp , above ShellExecute command doesnt work ShellExecute requires just c:\MyApp\Data\BackUp portion of the BackUpPath (Server's Local Path) I can do it with below codes , and i get correct result with below RightWord variable and ShellExecute works correctly but I think there should be a better way S:= MySrv:c:\MyApp\Data\BackUp if Pos('c:\',S) > 0 then X:=Pos('c:\',S) else X:=Pos('C:\',S); LeftWord:=Copy(S,1,X-1); RightWord:=Copy(S,X,Length(S)); which is c:\MyApp\Data\BackUp Thank You
-
Thank you so much Vandrovnik
-
Good Day Delphi 10.3 Is it possible to load a PNG directly into the Speed Button Glyph ? Thank You
-
Good Day, I have an App Exe File in an USB and I want to AutoRun the Exe File I created a autorun.inf file in the usb & wrote below codes [Autorun] Open=MyApp.exe Action=Start portable apps Icon=diskicon.ico but when i insert the usb, AutoRun.Inf file doesnt fire what am i doing wrong ? Thank You
-
Good Day, Delphi 10.3 procedure TForm2.Button1Click(Sender: TObject); var ST,ET : TDateTime; Diff : Double; begin ST := StrToDateTime (Edit1.Text); // Text = 08:00 ET := StrToDateTime (Edit2.Text); // Text = 11:30 Diff := HoursBetween(ST,ET); Edit3.Text := FloatToStr(Diff); The result of above proc is 3 i was expecting 3,5 Thank You end;
-
I'd like to thank whoever moved my question to this group. Thank You So Much Tom.
-
I just noticed that there is a Windows Api group, should i write this question to Windows Api ?
-
Thank You SO MUCH Mvanricnen, Lars, Pat
-
Thank you so much Z, Uwe, David David, Yes They can only choose from these 14 items I'm sure you you suggested me a short & clever way but what you mean by (EndIndex - StartIndex) / 2 ?