1

(1 replies, posted in General)

Hello to all MVD fans,
I need to calculate the length of a slope (LP) to bring a train track over a bridge.
I have the length (L) of the track and the height of the bridge (H).
In fact this amounts to calculating the hypothenuse of the triangle formed (law dear to Pythagoras).
I use the formula (adapted for MVD) present in the attachment.
I wanted to use the Hypot function, but error message: 'No such function'.
However, it is included in the Mathes class which is implemented in MVD.
Could someone tell me if it is possible to use this Hypot function normally?
Thank you for your answers
J.B.

2

(7 replies, posted in General)

Hello Salavatore
Oups ! You've forgot to join your project.
What do you mean by "using a specific guide".
To use the scripts, you must first activate the dedicated button (fourth button from the left on the toolbar)
But I think you already know that.
JB

3

(5 replies, posted in FAQ)

Hello Salavatore, Hello Derek (How are you ?)
To illustrate what Derek rightly says about using a TreeView in MVD, here is an example of what you get with a TV.
I admit that the one used by MVD is not great in my opinion, I would have preferred a TV like in Delphi7 much simpler to implement.
To illustrate what Derek describes, in my application on the management of a database on birds responding to a command, the choice of a family in the initial TV displays the different birds belonging to this family and a click on the name of a bird calls the form describing it (with photo and song, or even video when it exists).
At first, I had trouble understanding the philosophy of MVD's TV.
After many emails with Dmitri, I managed to master it, but it took time.
Hang in there if you want to get there, don't forget to allow users to create parents and children, you can also automatically sort alphabetically without using Up and Down buttons (like I did at the beginning - it's a pain!)
Good luck and if you need anything, come back to us, you will have all the necessary information.
JB

4

(4 replies, posted in Script)

Oups I've forgotten the snippet
JB

5

(4 replies, posted in Script)

Hello Prahousefamily
You could use this snippet.
often use it and it makes the job.
JB

6

(3 replies, posted in General)

Hello Emmanuel
Welcome to the world of MVD.
With MVD, you can get (and succeed) almost anything you want.
In the case that brings you, I don't think I'm wrong in thinking that you have never started anything in MVD to solve your case.
So can you provide us with some information on the base that you have already built: excel file of the data to be processed, a sketch of how you plan to represent this in MVD, if we need to consider future additions, modifications or deletions, etc ... that kind of thing?
The more information you give us about your project, the easier it will be for forum users to help you.
Good luck
JB

7

(5 replies, posted in General)

Hello Destiny
Don't forget that on a PC, Windows manages a good part of what concerns the display, including fonts.
Sometimes, it's really annoying when you want to get effects in MVD and Windows prevents you from doing so because it wants to remain the boss in certain areas.
JB

8

(5 replies, posted in General)

Hello Destiny,
Have you also installed your font in the Windows fonts folder?
If not, click on the name of your font, Windows will present it to you and offer to install it (via the Installer button).
Is your font a TTF?
PS:
Ah Crozon!
I know it perfectly, being from Ar Faou.
JB

9

(5 replies, posted in General)

Hello Destiny
Yes, I have already done this with several of my MVD applications.
But you must provide your font with your project and modify the XML file accordingly as in my previous post.
However, if the user of your application does not have this font on his machine, you will have to tell him to install it first.

I think that on one occasion, one of my users did not want to install my font ('Calibri') on his machine and that Windows had automatically replaced it with a generic one (Arial I think).
But to be verified.
But maybe there are other, simpler methods.
JB

10

(2 replies, posted in General)

Hello Destiny

If by changing MVD font you mean permanently changing the default font used by MVD, you edit the MVD XML file and replace the default font with this code:

// Open the forms.xml file in any text editor and replace
FontName = "Tahoma" FontSize = "8"
with
FontName = "Segoe UI" FontSize = "9"
// Just in case, save a copy of the forms.xml file

If you mean to allow the user to choose the font (nd save it in Register) for his project, you do this:

procedure Form1_OnShow (Sender: string; Action: string);
begin
    Form1.GridEmployees.Font := LoadFont;
end;

procedure Form1_Button5_OnClick (Sender: string; var Cancel: boolean);
var    FontDialog: TFontDialog;
begin
    FontDialog := TFontDialog.Create(Form1);
    FontDialog.Font := Form1.GridEmployees.Font;
    if FontDialog.Execute then
    begin
        Form1.GridEmployees.Font:= FontDialog.Font;
        Form1.GridEmployees.dbUpdate;
        SaveFont(Form1.GridEmployees.Font);
    end;
end;

procedure SaveFont(Font: TFont);
var   reg: TRegistry;
begin
     reg := TRegistry.Create;
     reg.Access := KEY_ALL_ACCESS;
     reg.RootKey := HKEY_CURRENT_USER;

     if reg.OpenKey('software\YourProjectName', true) then
     begin
          Reg.WriteString('Font.Name', Font.Name);
          Reg.WriteInteger('Font.Size', Font.Size);
          Reg.WriteBool('Font.Style.fsBold', fsBold in [Font.Style]);
          Reg.WriteBool('Font.Style.fsItalic', fsItalic in [Font.Style]);
          Reg.WriteBool('Font.Style.fsUnderline', fsUnderline in [Font.Style]);
          Reg.WriteBool('Font.Style.fsStrikeOut', fsStrikeOut in [Font.Style]);
          reg.CloseKey;
     end;

     reg.Free;
end;

function LoadFont: TFont;
var   reg: TRegistry;
begin
     result := TFont.Create;
     reg := TRegistry.Create;
     reg.Access := KEY_ALL_ACCESS;
     reg.RootKey := HKEY_CURRENT_USER;

     if reg.OpenKey('software\YourProjectName', true) then
     begin
          if reg.ValueExists('Font.Name') then result.Name := Reg.ReadString('Font.Name');
          if reg.ValueExists('Font.Size') then result.Size := Reg.ReadInteger('Font.Size');

          if reg.ValueExists('Font.Style.fsBold') then
              if Reg.ReadBool('Font.Style.fsBold') then result.Style := result.Style + fsBold;
          if reg.ValueExists('Font.Style.fsItalic') then
              if Reg.ReadBool('Font.Style.fsItalic') then result.Style := result.Style + fsItalic;
          if reg.ValueExists('Font.Style.fsUnderline') then
              if Reg.ReadBool('Font.Style.fsUnderline') then result.Style := result.Style + fsUnderline;
          if reg.ValueExists('Font.Style.fsStrikeOut') then
              if Reg.ReadBool('Font.Style.fsStrikeOut') then result.Style := result.Style + fsStrikeOut;

          reg.CloseKey;
     end;

     reg.Free;
end;

Cordially
JB

11

(12 replies, posted in Reports)

Hi Allanfollow, Hello Derek, how are you ?
To use FastReport in MVD, place a button on your form and choose as action: Report if you want to use an existing grid in your report or Action: Report(SQL) if in your report you want to set conditions or integrate data fields. other tables.
You will find in the PJ a little operating procedure that I translated from an article by Dmitri.
It's in French but with the help of Mr Google, you can translate it into your native language.
Come back to us if you have any problems.

JB

12

(4 replies, posted in General)

Hello StateOne, Hello Vladimir
Your file is an audio file.
What do you want to do with it?
Read it via an MVD application?
If so, turn it into mp3 and MVD will read it.
Otherwise, you are not on the right forum.
J.B.

Hello andre

Tell us more about your project.
What do you have in mind? (product purchasing management, weekly menu table, recipe table, purchase invoicing? ....)
The subject is vast and deserves that you take the time to structure it rationally.
J.B.

14

(3 replies, posted in General)

Hello Adam
Is it an obligation for you to do everything on the same form?
I believe that in his example on a Treeview, Dmitri called a second form to display the data, but I will have to find his project on the forum.
JB

15

(3 replies, posted in General)

Hi Adam,
Change your sorting mode in the Treeview as follows:
frmSummary.TreeView1.dbCustomOrderBy := 'ParentID, Name';
So you can get rid of the Up and Down buttons
(I think you were using them to alphabetize the Name field?)
As for calling the Tablegrid, there is no difficulty
(See image in attachment)
J.B.


J.B.

16

(8 replies, posted in General)

Hello identity
Can you tell us more
- Do you get error messages during import?
- Does this concern a problem with formats, import of cells with titles, date format, etc.?
- CSV format not compliant?
More information will help us help you
Sincerely
JB

17

(6 replies, posted in General)

Hello andy, Hello Derek how are you ?

You wil find in attachment a project I wrote for my son for his job.
Since then it has evolved into a more commercial project.
But it could be one of the modules of the project that you intend to develop.
You already have an idea of the work that a single module can represent (and even this one is minimal).
For a commercial project, it’s huge!
As my friend Derek recommends, first work in isolation on each of the modules you plan to put in place. Once each is well developed independently, you can then group them together behind a single interface.
Good luck !
J.B.

18

(6 replies, posted in General)

Hello andy2020

Obviously, you will end up creating a fairly complex program.
So, you should not jump straight into MVD.
On a sheet of paper (I know, I'm an old-school programmer), you plan each element of what you envision:
- Purchasing part (net cost, VAT, total cost, etc.)
- Management of your stocks (entries, exits, alert threshold, etc.)
- Sales part (cost details, excluding tax, net sale price, VAT to apply (several possible rates)...)
- Invoicing to follow (therefore creation of a customer file, reminder emails, direct link with Paypal or any other invoicing system)
- Monitor your current sales...and I'm probably forgetting some.
So first thing to do (on paper):
- Create your tables (Customers, suppliers, products... which fields? with Calculated fields? with Password? With Roles? ...)
- Choose your fields carefully (simple, associated with others, obligatory? ...)
It's going to be a complex project, by anticipating it on paper, you'll see what you need and what you can eliminate.
Nothing is more annoying than having to constantly restructure your tables directly on the computer, when everything is anticipated, there are many fewer unpleasant surprises later; an unforeseen modification in a table can force everything to be recalculated with the risk of crashing.
As you can see, you still have a lot of work to do and if you also don't master MVD (and SQL because you can't escape it to automate functions), good luck!
Tell me what type of product you want to work on for your sales, I will try to start working on this project starting from what you want.
J.B.

19

(6 replies, posted in General)

Hello Andy 2020

Welcome to MVD
Give us more details on the goal of your project:
- Do you want to make a sales/purchasing program like a commercial program?
- Do you want to add an inventory management part (inputs/outputs) as sales progress (alarm thresholds, supplier management, etc.)?
- Do you also want to have invoice management (issues, storage)?
- Do you want to plan a reminder section for customers (via email)?
You see, there are plenty of possibilities to develop what you want to do.
In most cases, MVD is able to achieve what you want to do.
But you need to give us more details.
Give us a detailed overview of each of the functions you want implemented.
There we can help you better
Sincerely
J.B.

20

(1 replies, posted in General)

Hello Anakin
To answer your question (buddy in a state) you will find in PJ
a doc file that I made from a response from Dmitri.
This is the step-by-step process to get what you want.
It's in French, but with Google Translate, you can adapt it (and everyone else) into your native language.
Good luck and come back to us if something gets stuck.
Is your photo already declared in your database?
J.B.

Hello kavinacomputers

1 - If your form from which you are going to edit an invoice is complete (purchase cost, VAT, total cost, VAT detail, etc.) you place a button with Action Report; as a Dataset you declare your database and you personalize your invoice as you wish (logo, grid, images, etc.), you test in preview mode and when you are satisfied you save it under the name of your choice with the extension .fr3.
Knowing that you can always come back to it to modify it.
2 - As basic examples you can consult almost all of them, especially Customer Invoice.
Come back to us if you're stuck.
But the old grump in me will always tell you to first plan your project with a paper and a pencil. For a somewhat complex project, I rarely go directly into the computer. Then you transpose in MVD.
And browse the forum, there are surely examples involving invoices.
Good luck
J.B.

Hello kavinacomputers

Welcome to VD !
Go to the Homepage and click on Database example
I see at least 2 examples that you could initially benefit from.
Then come back to us to go further.
Good luck
J.B.

23

(12 replies, posted in General)

Hello Sparrow
Very impressive !
Thank you for coming back with new features.
Very instructive.
Thank you so much
Kind regards
J.B.

24

(12 replies, posted in General)

Hi Sparrow
It works perfectly.
Your new code is terribly effective.
I thank you again
Good luck at home!
Kind regards
J.B.

25

(12 replies, posted in General)

Hello Sparrow
But when I went online to find the correct calculation formula, I noticed some discrepancies. In addition, I did not take into account insurance costs, I only took into account interest at a constant rate. But as it suited my friend as it was, I didn't go any further.
By the way, a question: in your SQLQuery code, is it possible to intersperse values contained for example in a TEdit?
You have to explain: you initially defined a sum of €100,000 as the amount of the loan. This amount comes up frequently in your code. Is it possible to ensure that the value of this sum is replaced by the one that the user enters in the TEdit? Same thing for the value of the annual rate?
Thank you for your answers
Cordially
JB