Thanks Tcoton,

it worked well with the code below:

procedure start_kpi;
begin
  form1.label2.caption := 'TOTAL CLAIMS: ' + floattostr(sqlexecute('select SUM(claimvalue) from expenses')) + ' £ (100%)';
end;

procedure employee_kpi;
var  vbar, vclaimno: integer;
begin
  vbar := sqlexecute('select SUM(claimvalue) from expenses where id_employee =' +floattostr(form1.tablegrid1.dbitemid))/sqlexecute('select SUM(claimvalue) from expenses')*100;
form1.panel2.width := 10;
  form1.panel2.width := form1.panel2.width + (vbar * 4);
  vclaimno := sqlexecute('select SUM(claimvalue) from expenses where id_employee =' +floattostr(form1.tablegrid1.dbitemid));
  form1.label1.caption := floattostr(vclaimno) + ' £  (' + floattostr(vbar)+ '%)';
end;

Thanks alot I'll give it  a try and let you know

HI,

I'd like to summarize the percentage of expenses by employees please

I like this gauge posted sometime ago , but I would like the gauge to display percentage results based on the claims and not based on record count .per employee. Link is given below.


https://www.dropbox.com/t/i69CVm3Y2gNBqp2g


Help will be highly appreciated.

Thanks a bunch.

I got an "undeclared identifier" error on the test.sql

Thanks cdb,

I tried using the script but got an error on the last part    testsql.show;

here's what I did

procedure neworeditprocess_Button5_OnClick (Sender: TObject; var Cancel: boolean);

begin
     
     ShowRecord(neworeditactivity,'processes',neworeditprocess.ComboBox1.dbItemID);
     testsql.show;

end;

Is there any thing I'm missing

Hi guys,

Thanks Derek for the last support. Can someone please help with an example of how to automatically fill a text field in a new record with an existing record from another form and table.

See attached picture for my dilemma.

Thanks guys

Thanks sooooooo much Derek, this is just perfect. Truly appreciated!

Thanks Derek,

I check it and let you know. A million thanks once again.

10

(5 replies, posted in General)

Thanks Derek . I just did

Hi guys,

Please, please and please, I need an example of how to create a serial number from 5 different processes fields (comboboxed). The serial number needs to be a combination of all the 5 ids e.g. Process 1, Process 2, Process 3 serial number should be 1.2.3 and this should show up on the same page where the processes have been selected from the different combo boxes. Can someone please help. I have no coding knowledge but need this pretty bad. Please see attached picture for better understanding

Thanks

Dear all,

I'm not a coding expert but I need an audit trail on several tables on mySQL database project. this is to ensure that every USER that updates, deletes or adds a new record can be identified with DATE AND TIME OF CHANGES.

Thanks