26

(5 replies, posted in General)

Hello Derek,
Thanks a lot. Now I have a better understanding.
The "Edit" button has to be in the form if the tablegrid data is to be edited. Double-clicking the selected row in the tablegrid will activate the "Edit" button, whether it is visible or not. If it is made visible, then one may single-click a row to select it and then click the "Edit" button to modify data. Definitely, making the button invisible makes a form cleaner, since it functions as intended as double-clicking a row is usual user behaviour.
I also learn the use of the goMultiselect option for creating a precise report.
Thanks again for your guidance and teaching.
Regards,
Eyeman

27

(5 replies, posted in General)

Hello Derek & Frank,
Thanks for the above discussion. I want to know two things,
(!) how the Edit button in Form 1 works? There is no procedure Form1_TableGrid1_OnClick in the script, and
(2) in general, how, and when to use the table grid property option @goMultiselect@?
Regards,
Eyeman

Hello Derek,
I have adapted your script in my project. In one form it gives perfect results but in another form “rupee ” is spelt as “rupeess”. Can’t figure out the reason. Please help.
Regards,
Eyeman

Hello Sparrow,
I agree fully with your advice. JOINs are so critical in SQL! Here adding the AND clause using the common field  id_LU_010_Eye_Select, ensures that the correct row (=  id_LU_010_Eye_Select) is selected from both A006 and A006B. So the visual acuity details and Refraction details of the same eye is joined from these 2 tables. This is what I understand.
Regards,
Eyeman

Hello Sparrow,
That's a fabulous solution! That's the condition ( AND...) I was searching for, but could not figure it out. The query now produces the desired output. Thanks a ton for helping me out. I can now develop the report further and strive to accomplish the desired result.
Regards,
Eyeman

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.

Hello Sparrow,
Thank you for the guidance. I changed to Left join for these tables, but still no data. Perhaps other Inner Joins override the Left Joins. I changed all to Left Join and now the data appears in Preview of FastReport. However, all data from child tables are displayed and not for the desired A002.id. How to solve this issue? Need AND clause? Left Join may be ideal, as often the child tables may have a null value.

Hello,
I was trying to create a small report (AA_Form_007_OPD_VISIT_REC.Button13) displaying the glass power of the patient. However, on preview, the data is not displayed. Ditto for Summary Report  (AA_Form_007_OPD_VISIT_REC.Button1). Where is it going wrong?
Regards,
Eyeman.

Hello Derek,
Thank you for the program and guidance. I am working on your advice. I have attached a  report generated from a different program used at another facility. The 1-page summary report needs to contain these details. How do I get this summary from different tables to a tablegrid? Report(SQL) action may be one way to get these data, but it's easy to falter.
Regards,
Eyeman

Hello Derek,
Thank you again for your time and invaluable advice.  I would like to follow the simpler approach and create discrete subreports from separate tables using Report action. However, I am not sure how the creation of the first report would automatically call the next report creation. Also how to combine discrete reports generated into a 1-page  summary report (that is needed to be handed to the patient)?
Regards,
Eyeman

Hello Derek,
Thank you for the guidance. I have made the suggested corrections and some progress. The report needs to include data contained under the tab Clinical_Records in the form AA_Form_007_OPD_VISIT_REC. This data is saved in 11 tables. There are many Look-up tables linked to these tables. I have attached a pdf of the report format that I wish to achieve. However, I am stuck with error messages, that I'm unable to resolve. Can you have a look, please?
Regards,
Eyeman

37

(8 replies, posted in General)

The table (say LU_001)  that is a dictionary, is simply a look-up list linked to other tables (say AA_001) via the Relationship field. A form (say AA_Form_001) that saves data to AA_001 can have a combo box that refers to the foreign key AA-001.id_LU_001.

Hello Sparrow,
Thanks for the modification. The access violation error is resolved, but they're still some syntax errors in the Report(SQL) script. Yet to reach the Report Designer.
Regards,
Eyeman

Hello Sparrow,
The DTP_Time_VISIT field is saving correctly to table AA_002_REC_Visits, field Time_Visit. Something may be wrong with  Report(SQL) script.... I don't know.
Regards,
Eyeman

Hello,
I am trying to create a Report(SQL) to summarize the records made during a visit of a patient. However, I am getting an “Access violation......” error, when the Print Prescription button is clicked in form AA_Form_007_OPD_VISIT_REC. I am therefore unable to open the Report Designer. How to resolve the issue?
Regards,
Eyeman

41

(9 replies, posted in General)

Hello Derek,
You are spot-on! You have rightly identified the problem being, possible null value(s)  in First_Name or Middle_Name or Last_Name fields. Your script works perfectly, giving desired output. Sorry to know that the program did not run on your PC. It takes a little time to open on my PC, but thereafter works smoothly. I thank you a thousand times and cannot express my gratitude enough.
Regards,
Eyeman

Hello Mirzasanower,
You may find my updated project at http://myvisualdatabase.com/forum/viewt … 323#p41323. New features are regularly added and a few discarded. Since its start, I have received a lot of help and support from the learned and generous Forum members.
Regards,
Eyeman

43

(9 replies, posted in General)

Hello Derek,
Can you please have a look at my project?
Regards,
Eyeman

44

(9 replies, posted in General)

Hello Derek,
While applying the above principle in another similar project, I am getting an inconsistent result when editing the record by clicking the edit button in the form DB_Form_002_LIST_OPD_VISIT_REGISTER. For some records, the full name is displayed in the (edit) form caption, while for others it is not. Cannot make out why this is happening. However, while adding a new record or editing a record while clicking buttons in AA_Form_006_PATIENT_REG_REC form, the AA_Form_007_OPD_VISIT_REC form is captioned correctly. Please help.(photos attached)
Regards,
Eyeman

45

(9 replies, posted in General)

Hello Derek,
Thanks again. Now I understand the principle, how to create label caption and form caption. Surely, this learning will be useful in other projects too!
Regards,
Eyeman

46

(9 replies, posted in General)

Hello Derek,
I am enriched once again with your lucid explanation and script. This is what I have been trying to achieve. Though no more required in this project, can the label4 inside the form be configured in a similar way? Thanks a lot!
Regards,
Eyeman

47

(9 replies, posted in General)

Hello,
I want to have the patient name displayed in the form F2_opd_record, either as a label (Label4) or as the form caption. How to get the full name of the patient displayed?
Regards,
Eyeman

48

(25 replies, posted in General)

Is MVD moving from desktop to mobile devices? That would be great!!

49

(18 replies, posted in General)

Hello Derek,
Thanks again for explaining the concept so lucidly. I always learn something new from your posts.
Eyeman

50

(18 replies, posted in General)

Hello Derek,
Your solution is perfect as always. Here I have noted 2 new concepts.
First, AND operator is used for calculated field cftotalcharge. Is it because the table AA_002_BillBreakup contains only foreign keys? Also both tables AA_002_BillBreakup and LU_001_Charges are included under “from”.
Secondly, a calculated field cannot be used in creating an expression for another cal. field ( cfdoctorsfee) and the whole expression for the referenced cal. field (cftotalcharge) must be written.
Thank you a ton,
Eyeman