Jump to content

Henry Olive

Members
  • Content Count

    321
  • Joined

  • Last visited

Community Reputation

5 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Henry Olive

    ClientDataSet Wrong Aggregate

    Thank you Olli73, Happy New Year Both Qty & Price fields are TFMTBCDField; Select Sum(Round(Price * Qty, 2)) as Total gives correct result
  2. Henry Olive

    ClientDataSet Wrong Aggregate

    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
  3. Henry Olive

    DBGrid PickList Change

    Thank you Hans DBGrid.ColExit triggers ONKEYDOWN w/o any problem I thought if is there any better solution
  4. Henry Olive

    ClientDataSet Wrong Aggregate

    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
  5. Henry Olive

    DBGrid PickList Change

    Thank you so much Lajos
  6. Henry Olive

    End Of File

    Thank you so much Stano, Uwe
  7. Henry Olive

    DBGrid PickList Change

    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
  8. Henry Olive

    End Of File

    Thank you so much Serge
  9. Henry Olive

    End Of File

    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
  10. Henry Olive

    Folder ReadOnly, Hidden, Normal

    Thank you so much Remy
  11. 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;
  12. Henry Olive

    Make Bold DBRrid Row Color

    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
  13. Henry Olive

    Make Bold DBRrid Row Color

    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
  14. Henry Olive

    Wrap texts in DBGrid

    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
  15. Henry Olive

    Form Activate

    Thank you so much Remy
×