Skip to forum content
My Visual Database
A Simple Solution for Creating Databases
You are not logged in. Please login or register.
Active topics Unanswered topics
Search options (Page 1 of 4)
identity wrote:Hi every one
How can I make the TableGrid columns display from right to left?
I don't mean right-aligning the text inside the cells. I want to change the column order/direction so that the first column appears on the right, the second column next to it, and so on, similar to a right-to-left layout.
Is there a property or setting in My Visual Database to change the TableGrid column direction to RTL? Or even a script
Thanks alot
Also me looking for this feature, but it's seems not available on MVD. I found it in Free-Pascal
Dear Jean,
Please correct the Light Pink to $00C1B6FF
I need removal characters from string line for example remove 1 from the end of word
I try use DeleteStr like this example
Form1.Edit2.Text := DeleteStr(Form1.Edit1.Text, 1, -1);
But, it's not working, any suggestion how to remove the last character ?
I will take a tour, thanks for sharing
For me I use a CheckBox as marked as deleted item, and on main table I hide each data entry marked in that CheckBox then I can restore it or delete it forever
I attached example maybe someone make improvement
sparrow wrote:There's no direct way.
It is possible to call a third-party program (Ghostscript) from MVD to convert PDF to raster format (JPG) and then work with these graphic files in the report.
Hello,
Can you share example ? (Simple and small project)
Hello everybody
is there way to add pdf pages imported from database as embedded inside printable report ?
Please see this screenshot as example


Hi derek,
Your script work like magic, simple and accurate
Hello,
I need round up to number without fractions, I create this script but I believe there is much butter way to rounding up numbers.
Anyone will be welcome to optimize the script (the Project in Attachment)
Var
Correction : Real;
procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
Correction := Form1.Edit1.Value - Trunc(Form1.Edit1.Value); // Find fraction value
If (Correction < 0.5) And (Correction <> 0) Then Correction := 0.5 Else Correction := 0;
Form1.Edit2.Value := Round(Form1.Edit1.Value + Correction);
end;
sparrow wrote:29/01/2000 - 01/03/2025
30/01/2000 - 01/03/2025
31/01/2000 - 01/03/2025
01/02/2000 - 01/03/2025
???
Hi sparrow
29/01/2000 - 01/03/2025 = 25y-1m-0d
30/01/2000 - 01/03/2025 = 25y-0m-30d
31/01/2000 - 01/03/2025 = 25y-0m-29d
01/02/2000 - 01/03/2025 = 25y-0m-28d
This is correct ? if wrong please write the correct answer.
Hi sparrow,
Thanks for your feedback, I make change in script to make the required correction as bellow
Var
AllDays, Year, Month, Day, RemDay : Int;
procedure Form1_ButtonCalculate_OnClick (Sender: TObject; var Cancel: boolean);
begin
AllDays := DaysBetween(Form1.DateTimePicker1.DateTime, Form1.DateTimePicker2.DateTime);
Year := Trunc(AllDays / 365.25); // Get Years.
RemDay := Trunc(AllDays - (Year * 365.25)); // Remining days from Year.
Month := Trunc(RemDay/30.4167); // Get Months.
Day := Trunc(RemDay - (Month * 30.4167)); // Get Days.
Form1.EditYear.Value := Year;
Form1.EditMonth.Value := Month;
Form1.EditDay.Value := Day;
end;
Approval Source https://www.calculatorsoup.com/calculat … ulator.php

By the way, the 1st way to find the Earth is Round: Eratosthenes (Died 194 BC and measured the circumference of the Earth with good accuracy at that time by using simple tools without lasers and satellites).
Hi jean.brezhonek, derek, sparrow,
I used deferent type of calculation (From old school) please test it and give me a feedback.
Var
AllDays, Year, Month, Day, RemDay : Int;
procedure Form1_ButtonCalculate_OnClick (Sender: TObject; var Cancel: boolean);
begin
AllDays := DaysBetween(Form1.DateTimePicker1.DateTime, Form1.DateTimePicker2.DateTime);
Year := Trunc(AllDays / 365); // Get Years.
RemDay := Trunc(AllDays - (Year * 365)); // Remining days from Year.
Month := Trunc(RemDay/30); // Get Months.
Day := RemDay - (Month * 30); // Get Days.
Form1.EditYear.Value := Year;
Form1.EditMonth.Value := Month;
Form1.EditDay.Value := Day;
end;
Hi derek
Thanks, your script is amazing, that what I looking for.
Dear Friends,
I create apps that can calculate Years, Months and Days between 2 date, can any one improve the script ? I believe do some mistake or there is much butter way to calculate the date.
Any suggestion will be welcome.
The easy way by using Search option
I hope this will helping you
Bold as Active / Regular as InActive
procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
If (Form1.Button1.Font.Style = fsBold) Then
Begin
Form1.Button1.Font.Style := 0;
Form1.Label1.Caption := 'Button 1 : InActive (Regular)'; // Replace with InActive Scenario code.
End Else
Begin
Form1.Button1.Font.Style := fsBold;
Form1.Label1.Caption := 'Button 1 : Active (Bold)'; // Replace with Active Scenario code.
End;
end;
The only effect can do on button is font style (Bold, Italic, Underline and StrikeOut)
I used a Bold for button feature as (Active / Inactive)
Hello derek,
Thank you and 'Sparrow ' this is will help, I read now on Lazarus IDE form this problem caused by Windows limitation, we can use same code on Linux without problem
Hello MVD Fans,
How to change the text color of button ? ? ?
I try with this code
Form1.Button1.Font.Color := clRed;
And this code
Form1.Button1.Font.Color := RGB(255, 0, 0);
But no one of them change the color of button text !
prahousefamily wrote:Thank You sparrow
I Try Solution 1 Create a calculated field with the TEXT field type And Use Query Converter Text To Format It OK ...
But
Solution 2 tnxdatecolumn(Form1.TableGrid1.Columns[с]).formatmask := 'yyyy-mm-dd hh:mm:ss'
Nothing has changed
It would be great if you could show me a sample project.
Don't forget add Script call on (OnChange) for TableGrid
Thanks, this is will help me.
If you share the MVD with your friends by using DropBox or Google Drive, you can not run the apps by 2 users or more in same time, this is will cause problems with SQLite file, I believe due to the delay in writing data.
This is was my 1st step on my JSON API Project, It's Online version supporting https protocol, I hop it's give some help to you.
Hello,
I create a MVD app protected by login form (Username and Password) shared with my friends by DropBox, but when another body login to the MVD the SQLite created a conflicted copy
How to prevent conflicted SQLite copy problem or block Multi-Login to the app
Dear sparrow
I do link the table in my attached project PrintTest.zip please see the screenshot :

This is a correct link tables or not ?? please help
Posts found: 1 to 25 of 78