826

(2 replies, posted in General)

Yes you can.
You get the number from this field in string format. You need to use the StrToInt (field) function to convert to a number.

827

(3 replies, posted in General)

look here
http://myvisualdatabase.com/forum/viewtopic.php?id=4

procedure frm1oncl (Sender: TObject; Action: TCloseAction);
begin
  Action := caNone;
end;

...

begin

 Form1.OnClose := @frm1oncl;

end.

You are welcome

I will repeat again. )))  I recommend reading help about JOINs in SQL.
This AND ... part of the JOIN. Your two tables A006B and A006 have a common id_LU_010_Eye_Select.

830

(12 replies, posted in Russian)

А смотря где и для чего

Для Edit через OnKeyPress или OnKeyDown пример здесь

http://myvisualdatabase.com/forum/viewtopic.php?id=1879

For the Sex table (in Database tables), put Check - The table is a dictionary, and try now.

Try to fix your request like this.
Add last line "AND ..."
Hope this solves your problem)

...
where
A002.id = $id
AND A006B.id_LU_010_Eye_Select=A006.id_LU_010_Eye_Select
eyeman303 wrote:

Hello Sparrow,
Thank you for the response. I am indebted to you and all the learned Forum members and Derek, in particular for guiding me at every step in my projects. Definitely, I will read more about JOINs. The Report needs to display the data entered in all the child tables for an OPD_ID on a particular date. The A002.id is unique for each OPD_ID and date, and id_A002 is a foreign key in all the child tables. This query is getting additional data for A002.id  referring to a different OPD_ID and date. Why is this happening?
Regards,
Eyeman.

Hi,
Show exactly which column from the query or which row, which data ... you think is wrong. Then we can discuss.
In the file what your request returns (partially).

PS
see answer below

Hi,
Now your queries are referring to a table "invoices" that you do not have .
Let's try to do this.
You will make your program to the maximum.
Now you have everything separately in the program.
Invoice form in its infancy).
Complete the invoice form without the total quantity and amount, but with all the fields that are required. Which order, which client, which products, quantity, how they are displayed ... perhaps you will understand how to calculate the cost by quantity.
If not, then let's talk.

As Derek says I was waiting for this question
Derek did a lot for your project and maybe my questions and answers will help you, him and me.
You understood my answer correctly (Left Join may be ideal, as often the child tables may have a "null" value). But you still have to enter data correctly into your tables.
1.You have a lot of tables and it seems to me that you do not quite understand how JOIN works with all this.
   Without this, you will not be able to display data correctly.
   I recommend reading the help about all JOINs in SQL, especially about NULL and INER JOIN, LEFT JOIN.
2. You see A002.id as you set its ID in WHERE. But JOIN matching  data from other tables. Any condition in JOIN ... ON ... forces data to be matching values according to the equality ... = .... What you want to see is shown to you. Please read the help for all JOINs in SQL. It is not difficult.
3. Try to specify specifically in WHERE or SELECT what you want to get from ANY table. The last record by id, by time or other parameters ... I understand that it is difficult, there are many tables.
4. LEFT JOIN will most likely be perfect. But only in the case when not all tables are filled in correctly (I'm talking about "NULL" and "n / a" and ...). But this will not help to display correct data if it is missing.



When you read the JOIN help and try it yourself, be specific about what is wrong and what you want to see.  I or someone else will try to help. The forum reads and can help you better experts than me.

Sorry for my and google english).

836

(9 replies, posted in General)

If I understood the question correctly.
For action OnCloseUp or OnChange cboSvcInterval component
use in script
dbUpdate function TableGrid.

Form1.TableGrid1.dbUpdate;

Hi,
Tables for all occasions )))

Incorrect use of JOIN in SQL query.
You are using an INNER JOIN which requires the data in both tables to match. You currently do not have data in many tables.

Report (SQL) Button13
INNER JOIN leads to errors when JOIN tables:


inner join AA_012_REC_DOCTORS
on AA_012_REC_DOCTORS.id = A002.id_AA_012_REC_DOCTORS, ( in AA_012_REC_DOCTORS.id not found records)


inner join LU_001_Salutation
on LU_001_Salutation.id = A001.id_LU_001_Salutation, ( in A001.id_LU_001_Salutation - NULL)


inner join LU_022C_Dsph_Intermediate AS L022C
on L022C.id = A006.id_LU_022C_Dsph_Intermediate. ( in A006.id_LU_022C_Dsph_Intermediate -NULL)


Enter correct data in these tables and table AA_002_REC_Visits, AA_001_REC_PATIENT_REG, or use the LEFT JOIN for these three JOIN first.

838

(2 replies, posted in Russian)

В формате SELECT БАЗАДАННЫХ.ТАБЛИЦА.ПОЛЕ

http://myvisualdatabase.com/forum/viewtopic.php?id=2018

839

(4 replies, posted in General)

Hi,
Unfortunately, I have not seen the detailed change history.
Error in ComboBox dbFilter due to round brackets in newer versions.
In ver. 6.3 added the "SortField" and "SortOrder" properties for the ComboBox component, allowing you to specify the field and sort type.
In your case, "properties dbFilter 1 = 1 Order By cptno asc" needs to be split. "Order By cptno asc" needs to be removed. Place "cptno" in "SortField" and specify sorting in "SortOrder". With out of bound, you need to look separately where it appears.


ver 6.1 Added AutoWidth property for ComboBox
ver. 6.3 Added the "SortField" and "SortOrder" properties for the ComboBox component, allowing you to specify the field and sort type.
     - Added the OnAfterEdit event for the TableGrid component
ver 6.4 You can use calculated fields in the Filter property of the ComboBox component, example: {calculated_field} = 1

840

(12 replies, posted in Russian)

senseyesenseye1983, к сожалению программа лишена отладчика а вы не запомнили какие изменения
в вашей программе привели к ошибке )))

Ошибка которая отображается у вас может не относиться к строке из скрипта.
В этом проекте, как пример http://myvisualdatabase.com/forum/viewtopic.php?id=7627 к ошибке в программе (вызов отчета) приводила ошибка совсем в другом месте ( DateTimePicker) где автор был уверен, что там все ОК. И ошибка в программе указывала на строку в скрипте которая не имела отношения к ошибке.

В вашем случае выхода два:

1. Если программа небольшая - переписать заново. Возможно еще и оптимизируете свою программу )
2. Если хочется повозиться.
    Работаем с отдельной копией программы. Удаляем по одной форме вашей программы и находим форму которая приводит к ошибке.
   Далее ВНИМАТЕЛЬНО анализируем все обьекты на данной форме, свойства, настройки, изменение настроек обьектов в скрипте.
   КАЖДОГО объекта и КАЖДОЙ настройки.

Удачи.

Hi firstpharaon,
Look at this
Changed calculated field invoice.total and some changes in the settings of the table where there was an error.

842

(18 replies, posted in General)

1. in your database table create a "yes / no"  BINARY field
2 create calculated field in your database table
3. in IMPRIMER add calculated field
4. add checkbox in your Report and link with calculated field in report.

look examples here 088у_fixed.zip project
http://myvisualdatabase.com/forum/viewt … 873#p31873

or here
http://myvisualdatabase.com/forum/viewtopic.php?id=4002

843

(18 replies, posted in General)

If you need to display "Etat" :
1. choose field Etat.Excelent in action button IMPRIMER.
2. change field in FastReport.
If you choose Table.Etat nothing to display. In our database field Table.Etat - NULL.

844

(18 replies, posted in General)

Hi,
As Derek has already reported, check what you submit to the print form, name or id record or something else.

Hi. The error is that you are calling a calculated field from a calculated field. Rewrite the query or create a new one by calculating internally without calling the calculated field.

your project modif

Change field CALENDAR - button100 in the component DTP_Time_VISIT ... and be happy

button100 - wrong value. and report access violation

Hi,
something wrong with the component DTP_Time_VISIT (in the attached file )

Field Calendar incorrect value button100

849

(23 replies, posted in General)

DriveSoft wrote:

ehwagner
Thank you for the project.
I know about this bug, it's look like the usual behavior for the component, I have test it in Delphi, same result. Unfortunately can't change it.

Dimitry,
About this bug with combobox and mouse. This is a litlle modified project ehwagner. May be this help you about this bug. Add button search and table don't visible in project. Mouse cursor don't disappears and search works.