Perfect!
Thats what i want!
Thanks Derek, appriciate for your help and example.
My Visual Database → Posts by kkalgidim
Perfect!
Thats what i want!
Thanks Derek, appriciate for your help and example.
Hi,
My project has
customer table
order table
order table has paid boolean field. So i can check if customer paid or not from this field.
I want to add new calculated field for customer if previos orders paid or not?
Becuase when customer come to my shop and said i want to pay for the last order.
By this way i can check it if customer has any order not paid before
I attached the project
I am using search button on Form1 and show on grid1
according to my language on project
kim=customer table
siparis=order table
ara=search
siparis.odendimi = order.paid
I hope someone helpme
Hi,
i am using myvisualdatabase version v1.52
on my project i am using comcobox.
when type in combo box it filters by name
i am using this function to filter from db
procedure Form1_ComboBox1_OnKeyPress (Sender: string; var Key: Char);
var
id: integer;
begin
if ord(Key)= 13 then
begin
id := Form1.ComboBox1.dbItemID;
Form1.ComboBox1.DroppedDown:=False;
Form1.ComboBox1.dbItemID := id;
Key := #0;
Exit;
end;
if ((ord(Key)= 8) OR (ord(Key)= VK_ESCAPE )) then // for backspace button
begin
s_cbGroups := '';
Form1.ComboBox1.Text := '';
UpdateDatabase('kim');
Key := #0;
Form1.ComboBox1.DroppedDown:=False;
Form1.ComboBox1.dbItemID := -1;
Exit;
end;
s_cbGroups := s_cbGroups + Key;
Key := #0;
Form1.ComboBox1.dbFilter := '(isim LIKE ''%'+ s_cbGroups +'%'''+')';
id := Form1.ComboBox2.dbItemID;
UpdateDatabase('kim');
Form1.ComboBox2.dbItemID := id;
Form1.ComboBox1.DroppedDown:=True;
Form1.ComboBox1.Text := s_cbGroups;
Form1.ComboBox1.SelStart := Length(s_cbGroups);
end;
procedure Form1_ComboBox1_OnCloseUp (Sender: string);
var
id,id2: integer;
begin
id := Form1.ComboBox1.dbItemID;
id2 := Form1.ComboBox2.dbItemID;
Form1.ComboBox1.dbFilter := '';
UpdateDatabase('kim');
Form1.ComboBox1.dbItemID := id;
Form1.ComboBox2.dbItemID := id2;
s_cbGroups := '';
end;
For example when i try to find name "John"
i type jo
and normally it was finding john instantly.
But now the name number increased to 600 customer so it become slow
how can i make it fast?
Thanx
Do you know any family tree application designed with mvdb?
How can we do it? Db design relationship vs?
I downloaded latest minor update ver 1.52
Problem fixed on this version . So i did not use function for total sum. I used grid setting for it.
For date intervals i used 2 calendar object with >= and <= filter
so i am getting result between 2 date filed
Also i used buttonf for practical use as yerterday, last week, last month.
Thanks for your help Derek and Dmitry
i am using version 1.49
when i use sum on grid settings it does not appear!
Bu latest version it appears
Thank you Derek
Calendar clicl version is really useful but i want to create buttons like
yesterday
last week
last month
is it possible to make it on calendar version?
Hi,
I created a yerterday button with sql query settings.
When click on yerterday button it shows the records of yerterday.
How can i get total sum on grid footer?
test app attached
Hi,
i am using mvd v1.49
i have 2 combobox list names of person
i want to filter result in combo box so i used example on this url
http://myvisualdatabase.com/forum/misc. … download=1
problme is: i filtered combobox1 and select person name
when i click on combobox2 to filter combobox1 selected person become empty
i tried it on latest version of mvd it works fine.
i think theremust be a bug on my version
is it possible to fix it?
i found solution from this topic
http://myvisualdatabase.com/forum/viewtopic.php?id=1985
procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
if Form1.Edit1.Text = '' then
begin
Cancel := True;
ShowMessage('Your message here.');
end;
end;
thank you. works fine now.
hi,
i want to make a field not null. so i click on not null box on database settings
when i try to save the field with nothing it gives me error as i wanted.
but i want to modify error message like "please enter a value"
now error message is : "not null constraint failed ..."
i attached simple example about what i want
hi i attached sample project.
trying to print the orders of tomorrow
i have filtered grid results (order of tomorrow )
i have put a print button but its not showing results.
take a look please
Thanx Dmitry
i found this link http://myvisualdatabase.com/forum/viewtopic.php?id=1136
i fixed it by looking example
but now i am facing another problem.
i cant print the filtered grid
it pretend like its not filtered.
i want to print the results on the grid. (its filtered grid wih auto execution)
filter is : Date(teslimtarihi) = Date('Now','localtime','+1 day')
shows the tomorrow orders.
i attached project
related form is : frmSonrakiTeslim
print button name YAZDIR ->Button3
i want to print all results on grid only 1 unrelated results shows
hi,
i am using version 1.49
i have 2 text field as integer to store debt
text field 1 -> debt
text field2 -> remaining debt
when debt amount is entered
remaining debt must be automatically the same value.
after some payment i will redude the remainbg debt manually
how can i give default valur for remaining debt as debt value ?
form name is frmBorclar.
sql query Button is on the bottom of form
Hi,
i am using a button with sqlquery action
when click on button i want -> list all orders older than 15 days. so i used this query
SELECT *
FROM siparis
WHERE (julianday('now') - julianday(orderday))>14;
result comes but it looks like below
2016-08-03 00:00:00.000
what i want is 03-08-2016 only
Another qustion.
i want orders older tha 15 days with the name of person
person name is in person table.
how can i get person.name and orders older than 15 days with one query?
attached my files
teslimtarihi: orderdate
kim : person table
siparis : order table
hi,
my program system time is 3 or 4 hour earlier then my system.
how can i fix it?
because
grid filter: Date(teslimtarihi) = Date('Now')
but it return not today it return if its yesterday.
so i make it ---> Date(teslimtarihi) = Date('Now', '+1 days')
it worked for 3 hours then problem again. because i tried it before 23:00 according to my system time
how can i fix this issue? is there a way to set it to my time zone
EDİT ######
i change the date time field to onlt date field. now it only looks the date not time. it looks like fixed. i will test it 05 -10-2016 23:00
my version is 1.49.
so your code not opening because my verison is old according to yours.
Hi,
i got order table and person table
when i create new order, one filed is person who pay order
other field is person which order delivered to.
i want to use same person table to select payer person and delivery person. like a pool of persons
according to my project i can only get id of the person now but i want name of the person. what should i do?
translation for my project:
kimden: payer person
kime: delivery person
order table: siparis
person table: kim
i attached project files, help pls
Oh, i got it.
Thanks for your help.
Thanx its now working fine.
i triy to load grid with active statusprojects on first load of the program by adding
gorev.id_durum=1 AND section to following line
Form1.TableGrid1.dbFilter:=' gorev.id_durum=1 AND gorev.id_personel='+IntToStr(idUser) ;
But with this command i can not search comleted status projects.
now search button search related employee records. That problem solved.
But when i add
Form1.TableGrid1.dbUpdate;
after
Form1.TableGrid1.dbFilter:='gorev.id_personel='+IntToStr(idUser); // show tasks according to user
it gives error: no such column gorev.id_personel
so at start grid not loaded with related records
it mustbe related with my gorev table. You said that something wrong with table and made a calc_fix column to solve problem.
Now it looks like same problem. Can you check it. You can try with same project file above. Just add
Form1.TableGrid1.dbUpdate;
after
Form1.TableGrid1.dbFilter:='gorev.id_personel='+IntToStr(idUser); // show tasks according to user
and login with ferhatfaz user
pass:ferhat07
Run app
it asks login pass.
enter user: ferhatfaz
enter pass:ferhat07
automatically Form1 comes with datas on grid
all data comes but i want only ferhatfaz user datas (specifically i want ferhatfaz user's AKTIF state datas on program run automatically)
click on search button on form1 (select nothing just click)
all datas comes but i want only ferhatfaz user datas
but if you select state of project or anything else and hit search button it shows only ferhatfaz user datas.
You can see
project (proje)
task (gorev)
employee (personel) tables relation on database section.
i chaged the button and form to populate dbupdate. i did same function for save project button to populate. and employees save button already disabled . So problem solved.
Now i am trying to find a way for employee to search filtered results just related with that employee.
if nothing selected and hit the search button its finding all the records. But if i select search parameter (for ex date or any combobox) it works fine, finds related recors.
is there any way to say that if nothing selected find all records related with employee (just for employee account not admin)?
for now i am using this script for employee account
Form1.TableGrid1.dbFilter:='task.id_employee='+IntToStr(idUser); // show tasks according to user -- but it shows all records if nothing selected
My Visual Database → Posts by kkalgidim
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi