

Henry Olive
Members-
Content Count
325 -
Joined
-
Last visited
Everything posted by Henry Olive
-
I wish everyone a healthy day. My Portal Table : Company...PortalAdress...........UserName...Password XXX...............Https://xxx.com.....xxx..................xxx To login the customer portal in my apllication I created a form with a TWebbrowser, I can connect any website w/o any problem I wonder, when i connect any customer's portal can i AUTO fill UserName & Password of the portal enterance form ? Thank You
-
I wish everyone a healthy day. My PageControl looks like below TabSheet1-TabSheet2-TabSheet3-TabSheet4-TabSheet5-TabSheet6....... In some case i need to make TabSheet3 and/or TabSheet4 Invisible I wrote below codes TabSheet3.TabVisible := CDS1UserRight1.asString ='Y'; //User has no Right for this Tab so it is UNvisible TabSheet4.TabVisible := CDS1UserRight2.asString ='Y'; //User has no Right for this Tab so it is UNvisible In this case i need to re-arrange the PageControl1.PageIndexes so i wrote below codes for i:=0 to PC1.PageCount-1 do begin if PC1.Pages.TabVisible=True then PC1.Pages.PageIndex := i; end; Above codes works w/o any errror but I expected to see TabSheet1-TabSheet2-OLDTabSheet5(New TabSheet3) -OLDTabSheet6(NewTabSheet4) **Contents of TabSheets are correct** but their captions are wrong ( I see Invisible TabSheets Captions) What am i doing wrong ? Thank You
-
Re-Index a PageControl.PageIndex
Henry Olive replied to Henry Olive's topic in RTL and Delphi Object Pascal
THANK YOU SO MUCH David, Lajos, Pat -
Re-Index a PageControl.PageIndex
Henry Olive replied to Henry Olive's topic in RTL and Delphi Object Pascal
Thank you so much Uwe for your reply. First I'm so sorry for my poor english may be i cant express my problem good. My PageControl's owner draw = True; May be problem occurs from this proc. // Below proc it self works w/o any problem procedure TMainForm.PC1DrawTab(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean); var XTabSheet: TTabSheet; XRect: TRect; FormColor: String; begin if Active then begin Control.Canvas.Brush.Color:=$006ED7FC; Control.Canvas.Font.Color:=clBlack; end else begin FormColor :=dm.SettingsFormColor.AsString; if MatchText(FormColor,['Windows','Gray']) then Control.Canvas.Brush.Color:=$003C3838 else if MatchText(FormColor,['Brown','Light Brown']) then Control.Canvas.Brush.Color:=$0034527E; ...... end; XRect:=Rect; Control.Canvas.FillRect(XRect); XTabSheet:=PC1.Pages[TabIndex]; DrawText(Control.Canvas.Handle, PChar(XTabSheet.Caption), length(XTabSheet.Caption), XRect, DT_VCENTER + DT_SINGLELINE + DT_CENTER); end; Lets say i have a PageControl and 4 Tabsheets When i try to make INVISIBLE TabSheet3 and Tabsheet4 *i have no problem* (they are last tabsheets !!) but when i make invisible Tabsheet2 and Tabsheet3 ( In RunTime ) Eventhough I expect to see Tabsheet1 - TabSheet4 (TabSheet4's caption is still Tabsheet2 but contents are Correct ) Thank You -
I wish everyone a healthy day. My Table AAAA-01X BBBB-02X CCCC-03X Is there a way to Search & Locate a record like with just '02' searchtext ( that is i want to locate BBBB-02X ) I tried below code but no success SearchText:='02'; if not Dataset.Locate(SERIALNO, SearchText, [LoCaseInsensitive,LoPartialKey]) then ShowMessage ('...........') I need something like Sql's CONTAINING ( I dont want to Filter or SQL, just i need is Locate ) Thank You
-
I wish everyone a healthy day Interbase Months Table SMonth....LMonth 1...................January 2...................February .... Invoice Table ID.....CUSTNO...TNAME.....TOTAL......SMONTH 1.................20..........Buy.............5,000.................1 2.................20..........Buy.............8,000.................2 3.................20..........Sell...........10,000.................1 4.................20..........Sell.............5,000.................2 5.................20..........Sell.............6,000.................2 I'm trying to get below result for CustomerNo 20 LMONTH.......TOTALBUY....TOTALSELL January................5,000............10,000 February..............8,000............11,000 I tried below sql with no success SELECT M.LMONTH, Case When I.TNAME='Sell' then SUM(I.TOTAL) end as TOTALSELL , Case When I.TNAME='Buy' then SUM(I.TOTAL) end as TOTALBUY FROM INVOICE I JOIN MONTHS M ON M.SMONTH=I.SMONTH WHERE CUSTNO=20 GROUP BY M.LMONTH, I.TNAME Can someone please help Thank You
-
Thank you so much Lajos I get below result with your code LMONTH.......TOTALBUY....TOTALSELL January................5,000.........................0 January.........................0..............10,000 February..............8,000.........................0 February.......................0..............11,000 I want below result LMONTH.......TOTALBUY....TOTALSELL January................5,000............10,000 February..............8,000............11,000
-
I wish a healthy day to everyone MyTable : DOCNO (it is an Integer Field) --------- 1285 1286 ...... I want to UPDATE my table and add shortyear begining of DOCNO. like below DOCNO --------- 211285 211286 ...... Thank You
-
Thank you everybody. I'm so sorry i forgot to mention Db Server, It is INTERBASE
-
I wish everyone a healthy day. I have a DIMENSION data as a string like '10*20*30' I want to get each dimension number if user doesnt put empty string between the numbers like(10*20*30) there is no problem but if user put empty string between the numbers like (10 * 20 * 30) then i cant get correct result procedure TForm1.Button1Click(Sender: TObject); var i: Integer; Str, Seperator : String; begin Edit1.Text := '10 * 20 * 30'; Str := Trim(Edit1.Text); // i hoped that Trim removed the empty strings that is converted the Str to 10*20*30 but no for i := 1 to Length(Str) do if Str in ['*'] then begin Seperator := Str; Break; end; Edit2.Text := SplitString(Str,Seperator)[0]; Edit3.Text := SplitString(Str,Seperator)[1]; Edit3.Text := SplitString(Str,Seperator)[2]; end; Thank You
-
Thank you so much Rollo62, Mvanrijnen
-
I wish everyone a healthy day. Edit1.Text := 22/333/44444 ( Not fix can be change, could be 1/2/6) I want to get below result firstnumber:= 22 secondnumber := 333 thirdnumber := 44444 Thank You
-
Thank you Stefan
-
I wish everyone a healthy day. I have below procedure procedure TDm.OrdersDOCNOChange(Sender: TField); begin .... end; How can i disable & re-enable this proc.? I tried dm.Orders.DOCNOChange := Nil; // Err.Msg = Undeclared identifier: 'DOCNOChange' Thank You
-
Disable & re-Enable a Procedure
Henry Olive replied to Henry Olive's topic in RTL and Delphi Object Pascal
Thank you so much Corneli dm.OrdersDOCNO.OnChange := nil; dm.OrdersDOCNO.OnChange := OrdersDOCNOChange; works -
Is there an easy way to get Alfabetical (English) order number of a letter like C=3 , E=5 , H=8 .... Thank You
-
Alfabetical order of a letter
Henry Olive replied to Henry Olive's topic in RTL and Delphi Object Pascal
Thank you so much Vandrovnik, David, Lars My excel sheet always has 12 columns no more Vandrovnik, with below code I get Low cannot be applied to a long string err.msg. Str := Edit1.Text; // Edit1..Text:='D' Num := Ord([Low(Str)]) - Ord('A') + 1; Edit2.Text := IntToStr(Num); But below code WORKS Num := Ord(Str[1]) - Ord('A') + 1; Thank you so much -
Alfabetical order of a letter
Henry Olive replied to Henry Olive's topic in RTL and Delphi Object Pascal
Thank you Vandrovnik, eivind From an Excel Sheet i get column name ( for example F ) then i need to convert F to an integer number ( which is 6 ) so that i can import some datas from excel to my dataset. Str:=Edit1.Text; // Which is D Num := Ord(PChar(Str)) - Ord('A')+1; Edit2.Text := IntToStr(Num); I'm getting 37266172 instead of 4 -
Alfabetical order of a letter
Henry Olive replied to Henry Olive's topic in RTL and Delphi Object Pascal
Thank you Lajos, if Edit1.Text ='A' then // (Edit1.Text =D) Edit2.Text := '1' else Edit2.Text := IntToStr(ord(Edit1.Text) - ord('A')+1); Expecting 4 but getting 37266172 with below code i get correct result ShowMessage(IntToStr(Ord('D') - Ord('A')+1)); -
I wish everyone a healthy day. Excel (Row1 =Date, Row2=Quantity) A............................B.........................C....................... 1...05-01-2021......05-02-2021.....05-03-2021 2...150..................... 200......................250 I need to import above datas into my table as below Date.........................Qty 05-01-2021..........150 05-02-2021..........200 05-03-2021..........250 ........ ........ Could someone please show me how to do ? Thank You
-
Thank you aehimself
-
Thank you FPiette
-
I wish everyone a healthy day Interbase SQL I'm getting expression evaluation not supported err.msg. with below SQL If I remove (Case.........end) which is 2.Line in SQL command, The Sql works What is wrong ? SELECT O.DELVTYPE, SUM(OD.REMAINQTY) QTY, (Case When O.DELVTYPE ='Sea' then O.DELVDATE + 45 else O.DELVDATE + 15 end) as DELVDATE FROM ORDETAIL OD JOIN ORDERS O ON O.RNO=OD.RNO WHERE OD.ITEMNO = 'ABX22' GROUP BY O.DELVTYPE, O.DELVDATE HAVING SUM(OD.REMAINQTY) > 0 Thank You
-
SQL expression evaluation not supported
Henry Olive replied to Henry Olive's topic in RTL and Delphi Object Pascal
Thank you so much David, CorneliusDavid, Lajos