751

(14 replies, posted in General)

Nop, join would have been too easy, I know how to join multiple tables on multiple levels tongue


If you look at the screenshot on first post, you may understand.

I save data from the red selection in another table than the blue selection. (edit: replace word database by table smile )

By default when I click on Save, I save the blue selection into "computers", but I  save the red selection into "maintenance" when I click on the button "Add Maint."  to get a track of all maintenances occured on this machine smile

What I want to do now, is to display in the lower grid the maintenances which concern only the current record.

For example if I display PcName=L2343, I want to see only the maintenances for this PCName not all maintenances for all PC, if I open another record, the query should show me the accurate data according to the current PCName, this is tricky!!

The trick is to get the PCName as a variable in the sql query... I am a bit tired right now. I will see tomorrow.

752

(14 replies, posted in General)

Now I just need to find a way to query the maintenances just for the PC Name displayed... this is tricky. Any suggestion?

753

(14 replies, posted in General)

I managed to trick it using an SQL statement to populate my other table as using default functions does not the job


it looks like this:

procedure Admin_maint_add_OnClick (Sender: string; var Cancel: boolean);// Save maintenance info into a separate table

begin

    SQLExecute ('INSERT INTO maintenance (PCName,id_pc_typ,maint_details,maint_date) VALUES ('+ Admin.EditPCName.sqlValue+','+Admin.TypList.sqlValue+','+Admin.MaintEdit.sqlValue+', '+Admin.MaintDate.sqlDateTime+')');

    Admin.Close;
end;

754

(16 replies, posted in Script)

Ok, thanks for the tips.
I will use the color picker from MVDB as a reference.

But definitely native windows colour names are not all working in MVDB.

The english link to wikipedia :  https://en.wikipedia.org/wiki/List_of_colors_(compact)

755

(14 replies, posted in General)

I have a special forms with 2 different buttons to save different information in 2 separate tables.
When one is working fine, the other does not, why?

In the attached screenshot, I cannot save the information in Red whereas there is no pb with information in blue.

The grid should display all data in "Maintenance" table ( sql query= select * from maintenance)
I even checked with SQliteStudio and no data is present in maintenance. There is also no error message at all.
I use 1.49




Screenshot attached

756

(16 replies, posted in Script)

Actually it would be nice to have the colour chart being handled by MVDB as I tried a lot of combination which all ended in "blablabla not defined"

clOrange --> does not work for example.
I tried several other colour codes from here : http://www.delphigroups.info/2/bd/428730.html
and most of them do not work...

757

(4 replies, posted in Script)

Ok, it is the same code and actually I think I found a bug:

during my test, I had checked the first checkbox manually to see if "Yes" was properly displayed and I left it checked before implementing the script. Then after that, clearing the text fields did not change the checkbox to "false".

I have unchecked the checkbox manually and now, it is working as expected.

Thanks for the hint!

758

(4 replies, posted in Script)

I managed to switch to "yes" when a remark is present but not to "no" when we delete the comment...

//Rem_status checkbox Admin form, if a remark is present, then check the box automatically
procedure Admin_Remark_OnChange (Sender: string);
begin
    if Admin.Remark.Text<>'' then Admin.Rem_Status.Checked:=True else Admin.Rem_Status.Checked:=False;

end;

Any suggestion?

759

(4 replies, posted in Script)

I need a special script to check if a TextBox contains any text to automatically switch an invisible checkbox to "True" so in the user interface, there is only a "yes" displayed.

example:

Table Computers

Rem_Status                           Remark
0
1                                            Hard disk drive exchanged


On the user interface, there is only "yes" displayed to not clutter the visual and the information could be displayed when opening the row.

Screenshots attached

760

(16 replies, posted in Script)

Thanks a lot, the clMoneyGreen is far much nicer than the clGreen big_smile

I just have to find the colour's dictionary!!

761

(16 replies, posted in Script)

What are the colour codes available in MVDB?

Here we have only red, green and blue, and honestly speaking the blue background is just ugly!! Is it possible to set more "pastel" colours?

762

(187 replies, posted in General)

This is great, do you think it would be possible to use a table to store the languages and use a variable for the captions?

For example button save would have a variable caption $save$ and depending on the language chosen, the caption would change to this language using a value in a table. It could even be dynamic during the use of the application smile


Table translate

LangID               Caption               ItemID           
1                          Save                  2
1                          Cancel               3
2                          Speichern          2
2                          Abbrechen         3
3                          Enregistrer         2
3                          Annuler              3


Table Language

LangID                Description
1                          English
2                          German
3                          French

763

(2 replies, posted in General)

It would be interesting to see an example of the request  smile

Great topic, thanks Dmitry!

765

(187 replies, posted in General)

Thanks Dmitry, I will try that as soon as possible

766

(187 replies, posted in General)

Is it possible to implement multilingual user interface support within MVDB with no modifiable ini file?

As I work for an international company I would like to give the choice to choose the user interface language. This means that depending on language choice, all  object labels would switch to the chose language.

Is it possible to do so inside the database/compiled program? I mean, I do not want users being able to modify anything regarding the translations, so, ini or txt files are banned. The best way would be to have a table "language" and assign translations ID to the object labels.

767

(14 replies, posted in Script)

This is a very interesting topic!! Thanks for sharing.

@casedemarcat

Honestly speaking, nobody is able to understand what you are talking about paying something, maybe there is a translation issue...

Thanks Dmitry, there was some kind of mess in my code... still learning smile

770

(24 replies, posted in General)

It was my fault actually, thanks Dmitriy for your support, I just missed some lines when I copied-paste the original text from dev to prod in the memo... shame on me !

771

(13 replies, posted in General)

I see what you mean, using FastReport to design report is kind of a chore...

Anyway reporting is the biggest piece of cake of a database tool, I totally agree, it should be ready made!
That might be a challenge to implement that is MVDB, maybe using object properties which would design the report by itself... I am dreaming big_smile

772

(24 replies, posted in General)

Actually, I still have an issue with scroll bar, there is some kind of scroll bar displayed but I cannot use it!

On the attached screenshot, there is some text which cannot be displayed at the top.

Hi, there is a bug in 1.48:

If I use the above mentionned trick to hide whether one default menu or all of them, my query for memo does not work anymore!! [ Edit--- if I put it before the SQL execution, if I put it after the SQL execute, the SQL works but the menus are not hidden]


// Display History with select in database
procedure History_OnShow (Sender: string; Action: string);
begin
History.MemoHistory.Text := SQLExecute('SELECT history FROM History WHERE id=1');
History.MemoHistory.ScrollBars := ssVertical; // The component has a single scroll bar on the right edge.
end;

Once I re-enable the menu, the memo return the result!

774

(13 replies, posted in General)

I think I have understood your request, you may want to print a report with existing and selected data from myvisualdatabase project, am I right?

The only way I know until now is to design a report which runs a SQL query, save this report in the "report" folder and link you "Print" button to this specific report, Then you may be able to print it.


So, yes, you can design reports on your own smile

775

(9 replies, posted in Script)

Actually, the solution is pretty simple as long as you well know the program!!

The trick here is to create a button and affect the query to this button but to set the visibility of the button to false and then simulate the click on showing the form or changing data!!

   //Auto count status
procedure Form1_GridSearch_OnChange (Sender: string);//Load automatically information into grid form1.readyGrid on change
begin
    Form1.Button1.Click;
end;

procedure Form1_OnShow (Sender: string; Action: string); // Load automatically information into grid form1.readyGrid
begin
    Form1.Button1.Click;
end;

Very clever smile


Thanks a lot again Dmitriy, you are a master!