1

(13 replies, posted in General)

Hi all,

I had same issue and solved it by creating 2 tables in database, one called DATA and other called IMPORT
So I made it to import into IMPORT table and then update data in DATA table, after process is done, drop IMPORT table

Of course, added duplicate check
Also added select file, read column name and import to corresponding field so no matter where is column "First Name" it goes to field "First_name"

That is easiest you can do

2

(6 replies, posted in General)

Found alternate way,

Edited forms.xml ShowOnTaskbar to FALSE to all but first form and got wanted effect

BR

3

(6 replies, posted in General)

k245 wrote:

try this code

procedure Default_OnClose (Sender: TObject; Action: string);
var
  tmpForm:TAForm;
begin
  tmpForm := TAForm(Sender);
  if tmpForm.CalledForm<> nil then
    tmpForm.CalledForm.Show
end;

procedure Default_OnShow (Sender: TObject; Action: string);
var
  tmpForm:TAForm;
begin
  tmpForm := TAForm(Sender);
  if tmpForm.CalledForm<> nil then
    tmpForm.CalledForm.Hide;
end;

procedure Init;
var
  tmpForm: TAForm;
  i: integer;
begin
  for i := 0 to Screen.FormCount - 1 do
  begin
    tmpForm := TAForm(Screen.Forms[i]);
    if tmpForm.dbOnClose = '' then
      tmpForm.OnClose := 'Default_OnClose';
    if tmpForm.dbOnShow = '' then
      tmpForm.OnShow := 'Default_OnShow';
  end;
end;

procedure q_OnShow (Sender: TObject; Action: string);
begin
  // if such handler already exists, you need to add a call to the default handler
  Default_OnShow (Sender, Action);
  ShowMessage('Show');
end;

begin
  Init;
end.



Thanks friend, I works but needs tuning
-First form is hidden, rest forms stay like before
-Any possibility to disable it in taskbar when is hidden?

For instance for whole program, no matter how many forms I have, I want to have just one icon in taskbar, when I click it to get me to active form

BR

4

(6 replies, posted in General)

I have already made project with action buttons, many buttons and many on click actions...

is there possibility to make script to check which form is active and hide all others maybe with this logic.


count all active forms - take names - take name of last active form - hide all but last

For instance when I open project and I go to forms, whole taskbar gets occupied with inactive forms


BR

5

(6 replies, posted in General)

Hi to all,

I need solution for program to hide all forms that are not used and not active, just to show one active form no matter which one I open

BR

6

(0 replies, posted in General)

Greetings all,

I need solution for filtering dates with combobox, I've got a table with dates in it, like this:

name              surname           started_date
Adam              Smith               31.08.2021
John                Doe                 25.08.2021
Jason              Mich                31.08.2021


So I need combobox to show 2 dates so I can filter them by date

TY

7

(0 replies, posted in General)

Greetings all,

I need idea, if possible, first I found MVD for smaller projects but after some time, I made so many of them that are based on same MYSQL server and same "problem" (same job)

I wanted to combine them into one big but wanted also to keep them apart (for easier editing, debugging)

For instance I've got:
1. Orders
2. Warehouse
3. Planning...

I want to combine them so I can enter any of above from one screen (form) but don't know what is easiest and best way to do it
If I add it to one project, id has HUUUGE script.pas (don't like to add more .pas files because of easier editing)

With scripts? maybe?

uses sysutils;
begin
  executeprocess('notepad.exe',['document.txt']);
end.


Also, Can I make program ALLWAYS show only active form and disable all others?

BR

8

(3 replies, posted in SQL queries)

UPDATE table1
SET  exist_in_table2 =
    CASE WHEN EXISTS (SELECT id FROM table2 WHERE table2.id_table1=table1.id)
            THEN "yes"
            ELSE "no"
        END     


if someone need

9

(3 replies, posted in SQL queries)

Greetings,
I need sql query to check if value exist or not
I got two tables

table1:
id                   name                 exist_in_table2
1                    john                   yes
2                    dave                  no
3                    mark                  no


table2:
id              id_table1
1                     1
2                     6
3                     7



I want to update table1 column "exist_in_table2" to yes if exists or no if not exists

BR

10

(1 replies, posted in General)

Add calculated field and add formula:

( field1 - field2 )



Or if You need to permanently add it You will need formula

procedure frmUlazS_Button1_OnClick (Sender: TObject; var Cancel: boolean);
Begin
         SqlExecute('Update TABLE1 Set amount = amount - ' + frmUlazS.Edit2.sqlValue + ' Where id = ' + frmUlazS.ComboBox1.sqlValue);
end;

11

(1 replies, posted in General)

Anyone?

Want to add in this query something like:


Where ID = Form1.TableGrid1.Selected     cells 3...

12

(0 replies, posted in General)

Greetings to all,

Has anyone some sample of how to make monthly calendar with time calculations for employee?

Start time
Private absence
Business absence
Time of (break time)
End time

So I can get total amount of start time to end time, how many breaks, absence....
Daily-Weekly-Monthly


Thanks

13

(2 replies, posted in General)

Just an idea how can I make this so someone can help me out?
I make 20 fields in database (File fields) and that would be maximum number of files
With import button select all files at once and it would automatically calculate if 8 files add them in first 8 fields
When I click download, download all 8 fields

Is it possible?

14

(2 replies, posted in General)

Hi all,

Anyone got example of multiple file upload?

Working on some files database, so I want to make something like this:

Software for planning:
Revision 1- Date- Files (multiple files; unknown number of files)
Revision 2- Date- Files (multiple files; unknown number of files)
Revision 3- Date- Files (multiple files; unknown number of files)


Software for something else:
Revision 1- Date- Files (multiple files; unknown number of files)
Revision 2- Date- Files (multiple files; unknown number of files)

So I can have database of some files and revisions of those files at glance

TY

15

(1 replies, posted in General)

Hi all,

Anyone has idea how to make sql query on selected values in tablegrid.
I have one button for ALL items with criteria of name
But I want to make one more button to execute only on selected in tbgrid

Here is example of all in tbgrid:

INSERT into table1 (name, lastname, s50, s52, s54, s56, s58, s60, idOrder)
select
name as name,
l_name as lastname,   
sum(s50) as s50,
sum(s52) as s52,
sum(s54) as s54,
sum(s56) as s56,
sum(s58) as s58,
sum(s60) as s60,
"{Edit2}" as idOrder,
from table2
where table2.id_order = (select id from table3 where order.desc = "{Edit1}")
group by name

Thanks

16

(2 replies, posted in General)

This is awesome, thank You

17

(2 replies, posted in General)

Hi MVD,

I made some inventory program and need to extend it by making recipes for products and could not find any examples
If someone got example for that, it would be great.

For example, right now in inventory I have 100kg flour, 100kg sugar, 100lit of milk, 100kg of coffee....

I need to make recipe for coffee with those materials, for 1 coffee i need 0.01kg of coffee, 0.01kg of sugar.....
So I can make example of materials needed for 1000 coffees

Also, when I click MAKE button to decrease levels of used materials in inventory by amount needed for XX numbers of coffees

Thank You

Here is sample of what I need but when I make It OnColumnResize I get error

procedure Form1_TableGrid1_OnAfterSort (Sender: TObject; ACol: Integer);
begin
       form1.ComboBox1.Width := Form1.TableGrid1.Columns[0].Width;
       form1.ComboBox2.Width := Form1.TableGrid1.Columns[1].Width;
       form1.ComboBox2.Left := form1.ComboBox1.Left + form1.ComboBox1.Width + 1;
end;

Hi all,

Is it possible to get cell width and resize combobox with same size?

I use now

frmFifrsForm.TableGrid1.BestFitColumns(bfBoth);

For resizing cells and I want to make dynamic combobox that follows cell width

20

(4 replies, posted in General)

Or use some free sharing sites like mega.nz and send link

21

(0 replies, posted in General)

Greetings to all,
I'am making simple documentation library, for example I have ITEMS table and want to have files saved to folder and labeled

Example of item database:

name "ITEM23"
Description "GLASS BOTTLE"
Revision no 1
Last revision 16.09.2020
Files in revision, multiple: (Manual in PDF, Material needed in xslx table, other file types (dxf, jpg, png...)

Example of folder:

D:/archive/ITEM23/Revision_no_1/ALL FILES in here
D:/archive/ITEM23/Revision_no_2/ALL FILES in here


So when I want files I want to get latest files but also keep older in archive

Thanks for any help

22

(2 replies, posted in General)

Hi to all,
I was looking for solution on how to make MVD app online and found remoteapp and winflector (like windows rdp)
It suits my needs just don't know how will MVD app work with multiple users at one time?
Also, recomendation, mysql or sqlite? For this kind od arrangement. Mysql localhost?

23

(3 replies, posted in Reports)

Thanks guys, didn't see grouping in FastReport

Ty once again wink

24

(3 replies, posted in Reports)

Hi all,
I have orders as follow:

ID    Ordermame       Store
1         order1            store1
2         order2            store2
3         order3            store3
4         order4            store1
5         order5            store2

and addresses:
ID      Storename         Address           State
1        Store1               Buffalo              USA
2        Store2               London              UK
3        Store3               Berlin                DE

I need to make report but to group them by store address

So it would look like:


Store1
Buffalo, USA

Order1
Order3


On next page, same info but different address;

Store2
London, UK

Order2
Order5


And on final page, same report form but different address:

Store3
Berlin, DE

Order3

Thank You

25

(0 replies, posted in General)

I'm working on small project for orders tracking and got stuck (multiple problems)
Is there someone who can and would like to help with project I would offer a reward
Please let me know on skype: argracic