Henry Olive
Members-
Content Count
321 -
Joined
-
Last visited
Community Reputation
5 NeutralRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Thank you Olli73, Happy New Year Both Qty & Price fields are TFMTBCDField; Select Sum(Round(Price * Qty, 2)) as Total gives correct result
-
Thank you Serge, Happy new year Price : Numeric(15,5) Qty : Numeric(15,2) Firebird,: Select Sum(Price * Qty) as Total (the result = 573.694,74 ) In Delphi I Created an Aggr.Field and its Expression is Sum(Total) (the result = 573.694,73 ) Thank You
-
Thank you Hans DBGrid.ColExit triggers ONKEYDOWN w/o any problem I thought if is there any better solution
-
Good Day Delphi 10,4 Table Field Values : (F1 = 95.615,79 , F2 = 6) In Firebird SQL i make a calculation like ( F1 * F2 ) as TOTAL and in my query result (In Delphi) = 573.694,74 which is correct I have an Aggregate Field in my CDS and it's Expression = SUM(TOTAL) In my table there is just 1 record and the Aggregate result = 573.694,73 What am i doing wrong ? Thank You
-
Thank you so much Lajos
-
Thank you so much Stano, Uwe
-
Good Day I have a DataSource and DBGrid in a Form (The other database comp. are in Data Module) In the DBGrid's first field's PickList has some items I need to catch dbgrid's first field Change so that i'll fill next fields according to selected items from picklist I wrote some codes on DBGrid.ColExit event and every thing is OK, but after i select an item from picklist and hit DOWN key (Next Row) DBGrid.ColExit doesnt triggered I Know there is Field On Change Event in Client Dataset's field editor, but i dont want to write code in data module I solved my problem with OnKeyDown event if Key = VK_DOWN then DBGrid1ColExit(DBGrid1); I thought may be there is a better solution Thank You
-
Thank you so much Serge
-
Good Day I have a DBGrid and it has some datas which they come from another table I don't want the user to INSERT a new record, user can just edit available datas My Code in DBGrid1KeyDown is : if (Key=VK_DOWN) then if MyTable.RecNo = MyTable.RecordCount then Abort; it works, but i'd like to be sure if the logic here is good or there is a better way Thank You
-
Folder ReadOnly, Hidden, Normal
Henry Olive replied to Henry Olive's topic in RTL and Delphi Object Pascal
Thank you so much Remy -
Good Day I asked a similiar question while ago According to that replies i made below proc In my proc HIDDEN and NORMAL works but READONLY doesnt work even though i dont get any err.msg. what am i doing wrong ? Thank You procedure TFolders.RG1Click(Sender: TObject); var Attr : TFileAttributes; FolderPath : String; begin FolderPath:= CDS1FOLDERPATH.AsString; Attr:= TPath.GetAttributes(PChar(FolderPath)); if not TDirectory.Exists(FolderPath) then begin ShowMessage(FolderPath + ' not Exist'); Abort; end; if RG1.ItemIndex = 0 then // Read Only - RG1 = Radio Group SetFileAttributes(PChar(FolderPath), FILE_ATTRIBUTE_READONLY) else if RG1.ItemIndex = 1 then // Hidden SetFileAttributes(PChar(FolderPath), FILE_ATTRIBUTE_HIDDEN) else if RG1.ItemIndex = 2 then // Open (Not Read Only - Not Hidden) SetFileAttributes(PChar(FolderPath), FILE_ATTRIBUTE_NORMAL); end;
-
Thank you Peter My code : procedure TManTargets.DBGrid2DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin if CDS2.Eof then begin DBGrid2.Font.Style:=[fsBold]; DbGrid2.Canvas.FillRect(rect); DBGrid2.DefaultDrawColumnCell(Rect, DataCol, Column, State); end; end; I dont get error msg. but the code doesnt make Bold the last row of the dbgrid
-
Good Day My DBGrid has JUST 2 rows (cant be more) Group Jan Feb..... ------------------- A 10 20 B 12 16 How can i make JUST second row's Fonts to Bold like below ? Group Jan Feb..... ------------------- A 10 20 B 12 16 Thank You
-
D-10,4 Good Day MyField = Varchar(1500) MyDBGrid.Width = 400 Is it possible to wrap texts inside each row if my field's data longer than dbgrid field width ? Something like below ID History 1 aaaaaa bbbbb cccccc 2 xxxxxx Thank You
-
Thank you so much Remy