Thanks derek,
is it correct to use "OnChange" event or is there better code?
276 2019-05-02 10:35:05
Re: Receipts on sales mandate (29 replies, posted in General)
277 2019-05-02 09:42:27
Re: Receipts on sales mandate (29 replies, posted in General)
Thanks derek,
please teach me to do the calculations with Delphi. At school I studied Pascal and Visual Basic but we talk about it many years ago.
With these memories I managed to develop simple calculations such as subtractions, sums, multiplications and divisions but I stopped myself by not understanding the right code for expressions and percentages.
I enclose the project where I tried, you should understand what I tried to do, I also put a comment.
Thanks derek you are always very kind.
278 2019-04-30 18:44:26
Re: Receipts on sales mandate (29 replies, posted in General)
Well, at least I know I'm understanding something.
What is the code to set a variable that is the value of a textbox?
279 2019-04-30 08:22:30
Re: Receipts on sales mandate (29 replies, posted in General)
Hi derek,
thanks as usual.
The instructions in the script section I had more or less understood, I didn't understand why removing the scripts the calculations disappeared too.
From what you tell me but above all from what I understand, if I want the results of the calculations to be saved in a record, I don't have to use calculated fields. Did I get it right?
280 2019-04-29 17:16:07
Re: Receipts on sales mandate (29 replies, posted in General)
Hi Derek,
studying your project there are some things that I didn't understand.
I saw that it also performs calculations, but if I remove "scripts" the calculations are gone. In the scripts section, at least as far as I understand, there are no instructions for making calculations.
What interests me, is that it would have been one of the things I wanted to ask to do calculations.
Could you kindly explain this to me?
Thank you!
281 2019-04-27 16:37:19
Re: Receipts on sales mandate (29 replies, posted in General)
I'm reading. I Always forget it exists.
282 2019-04-26 14:49:46
Re: Receipts on sales mandate (29 replies, posted in General)
Bravo derek!
that's just what I wanted. Only now I have to study well because at the moment I haven't understood anything!
283 2019-04-26 12:22:08
Re: Database differences (2 replies, posted in General)
Thank you very much Admin.
284 2019-04-26 12:20:39
Re: Receipts on sales mandate (29 replies, posted in General)
Hi derek,
as always thank you very much. I'm trying to understand your project to be able to apply it to mine.
For the moment I immediately had a doubt: in your project I tried to create a button to print a report with the list of all the articles of a receipt but I didn't understand anything.
285 2019-04-25 16:49:44
Topic: Database differences (2 replies, posted in General)
Beyond that MySQL needs a server and SqlLite no, what are the pros and cons of using one or the other database manager with MyVisual Database?
286 2019-04-25 16:46:26
Topic: Receipts on sales mandate (29 replies, posted in General)
Hello to all,
I would like to make a new project but I set my sights even before I started.
Beyond a typical registry table on which I have no doubts, a customer brings some things to sell, can be a single item or more on a certain day. The same customer can bring one or more items to sell on another day.
So in the end I should make a receipt for the first day and one for the second day, obviously on the first receipt there must be the list of items brought on the first day and on the second receipt instead the list of items brought on the second day, considering that the same customer can bring items to sell more than once a year.
In short, the same customer must receive receipts by automatically including only the objects of that particular situation.
I immediately insisted because I don't understand what structure of tables I should do for items to sell and any sales mandate.
I hope I managed to explain.
Someone who can give me some advice?
Thank you and greetings.
287 2019-04-15 19:25:45
Re: Not all fields in the report (7 replies, posted in General)
Thanks Derek, you solved all my issues.
288 2019-04-15 18:10:02
Re: Not all fields in the report (7 replies, posted in General)
Thanks very much Derek.
I would always have another request on this project: if you look at the commented part in the scripts and you uncommented it, you will see that "frmInfo" is hidden by clicking on it, as instructed, but you will see that then the program completely crashes.
289 2019-04-15 14:32:43
Re: Not all fields in the report (7 replies, posted in General)
What a stud! I hadn't filled the fields and for this reason I didn't see anything.
I made some adjustments to the program and now I have a problem that I can't solve: by clicking on the first form (frmStart) and searching for a user, having done the search by double-clicking on the user, I rightly open the frmInsertion form, but to close this form whether you click on the X or the "Chiudi" button, the form closes only after clicking a second time on the X or on the Close button.
Thanks a lot!
290 2019-04-12 12:47:09
Topic: Not all fields in the report (7 replies, posted in General)
Hi everyone,
I made this project, in the second form (frmIns Insertion) I put a button (Print) to print a report that is a receipt. The problem is that despite having put all the fields in the report, only some of these fields appear to me.
Can anyone take a look at the project I'm attaching?
Thank you so much.
291 2019-04-04 12:23:02
Re: Final version 5.3 (2 replies, posted in General)
Un video di esempio con Ficarra e Picone
292 2019-03-27 17:09:27
Re: Default value of a textbox equal to a field (12 replies, posted in General)
How do you add more content for a condition? If I understand the language for the scripts is Delphi, I tried to search but I didn't find anything.
For example "if 'condition' then text1.text = something AND text2.text = something else".
I tried with "and", "&" and "&&" but it doesn't work.
EDIT:
OK, I found it
if 'condition' then
begin text1.text = something;
text2.text = something else";
end;
293 2019-03-27 16:26:15
Re: Default value of a textbox equal to a field (12 replies, posted in General)
Thanks Ivan,
so I don't get errors but the instruction doesn't work or the caption of laberl doesn't become "Qui va il nome del dominio, modificalo --->" but it's empty.
Below is the total code of the script:
procedure Start_OnShow (Sender: string; Action: string);
begin
if Start.grDominio.rowcount <> 1 then Start.Label18.caption := 'Qui va il nome del dominio, modificalo --->' ;
end;
procedure Start_grDominio_OnChange (Sender: string);
begin
if Start.bNuovodominio.visible = True then Start.Label18.caption := 'Qui va il nome del dominio, modificalo --->' ;
if Start.grDominio.RowCount = 1 then Start.bNuovodominio.visible := False else Start.bNuovodominio.visible := true;
Start.grDominio.selectedrow := 0;
Start.Label18.caption:= sqlexecute('select NomeDominio from Dominio');
Start.Label18.font.size:= 10
end;
begin
end.
EDIT:
I put the istruction on the bottom and so it seems to work
procedure Start_grDominio_OnChange (Sender: string);
begin
if Start.grDominio.RowCount = 1 then Start.bNuovodominio.visible := False else Start.bNuovodominio.visible := true;
Start.grDominio.selectedrow := 0;
Start.Label18.caption:= sqlexecute('select NomeDominio from Dominio');
Start.Label18.font.size:= 10
if Start.bNuovodominio.visible = True then Start.Label18.caption := 'Qui va il nome del dominio, modificalo --->' ;
end;
begin
end.
294 2019-03-27 15:03:37
Re: Default value of a textbox equal to a field (12 replies, posted in General)
What's wrong with this education?
if Start.bNuovodominio.visible:= True then Start.Label18.caption := 'Qui va il nome del dominio, modificalo --->' ;
It says ' THEN execpted at 12:33'
295 2019-03-27 14:49:25
Re: Default value of a textbox equal to a field (12 replies, posted in General)
Thanks Derek,
I understand something more and now something is advanced. The only thing I don't understand is why I don't work this statement
procedure Start_OnShow (Sender: string; Action: string);
begin
if Start.grDominio.rowcount = 0 then Start.Label18.caption := Start.grDominio.cells[0,0] else Start.label8.caption := 'Text Here --->' ;
end;
"Start" is a form.
Does not write "Text here" in the label
EDIT:
This is how I solved it:
If Start. grDominio. RowCount < > 1 then Start. Label18. Caption: = ' Text Here ---> ' ;
296 2019-03-27 12:58:08
Re: Default value of a textbox equal to a field (12 replies, posted in General)
Thanks Derek,
Unfortunately I understand little. I Put in an Annex A project that perhaps explains the matter better.
I put a button (Change) to change the value of the record of the Tablegrid but first you have to select the cell otherwise you receive the error ' Unable to certain the record ID '. I would like to hide this tablegrid but so you could not select the record before. So I would need that when the program starts the 0:0 cell is already automatically selected so that I can only click on the button without receiving the error.
To do also look at the script I created, I changed the textbox with a Label.
Thank you very much.
297 2019-03-26 19:24:47
Re: Default value of a textbox equal to a field (12 replies, posted in General)
Thanks Derek,
In the meantime I have done many tests and only one thing I miss: Is there an instruction to automatically select the first line of a tablegrid so that if I press an associated button I should not first select the record from the Tablegrid?
298 2019-03-25 17:30:10
Re: Default value of a textbox equal to a field (12 replies, posted in General)
Thanks derek,
studying your project I tried to adapt it to my needs but there is something I did not understand and it does not work well: I have to click twice on the button and the result does not remain permanently, would you be so kind as to look at the project that I have attached?
Thank you!
299 2019-03-23 19:15:22
Topic: Default value of a textbox equal to a field (12 replies, posted in General)
Hi everyone,
it is possible to put as default value of a TextBox what is written of a field of a table. The table has only one field and one record.
Thank you and greetings.
300 2019-03-22 18:31:25
Re: Restrict a table to a single record (2 replies, posted in General)
Thank You very much Derek. This Way achieves the purpose so it's fine!