Edit.text And ComboBox.dbItemID Script  To Report Clear Reset FrxDBDataset
I Have Problem
How to reset FrxDBDataset (Report Dataset) Every Change Edit.text And ComboBox.dbItemID

001 OK It Correct
http://s8.postimg.org/64a19qfas/2015_10_27_Image_001.jpg

002 OH Not OK
http://s27.postimg.org/fumlmipjm/2015_10_27_Image_003.jpg


I add script parameter from Form1 in report dataset  :person
form1.Edit1.Text , form1.ComboBox1.dbItemID

' WHERE person.cid LIKE  "%'+ form1.Edit1.Text +'%" AND                   '+
' refer_ampur.id =                                                        '+
inttostr(form1.ComboBox1.dbItemID)

, person);


Full Code Person

procedure Form1_Button7_OnClick (Sender: string; var Cancel: boolean);

var
    frxDBDataset1, frxDBDataset2,frxDBDataset3: TfrxDBDataset;
    person, icd10c, icd9c: TDataSet;
begin

SQLQuery(
' SELECT                                                                  '+
' person.id,                                                              '+
' person.cid,                                                             '+
' person.hn,                                                              '+
' person.hhc_no,                                                          '+
' person.fname,                                                           '+
' person.lname,                                                           '+
' person.id_sex,                                                          '+
' person.birth,                                                           '+
' person.age,                                                             '+
' person.id_province,                                                     '+
' person.id_aumpur,                                                       '+
' person.id_tambol,                                                       '+
' person.street,                                                          '+
' person.moo,                                                             '+
' person.soi,                                                             '+
' person.house_address,                                                   '+
' person.in_tesban,                                                       '+
' person.id_co_village,                                                   '+
' person.tel,                                                             '+
' person.profile_image,                                                   '+
' person.profile_image_filename,                                          '+
' person.date_go_ward,                                                    '+
' person.date_go_out,                                                     '+
' person.date_register,                                                   '+
' person.dete_send_ok,                                                    '+
' person.date_hhc1,                                                       '+
' person.date_hhc2,                                                       '+
' person.date_hhc3,                                                       '+
' person.id_patient_level,                                                '+
' person.id_co_internal,                                                  '+
' person.refer_number,                                                    '+
' person.id_co_hos,                                                       '+
' person.person_result_soft,                                              '+
' person.person_result_nogood,                                            '+
' person.person_result_death,                                             '+
' person.person_result_change_house,                                      '+
' person.person_result_etc,                                               '+
' person.person_note,                                                     '+
' person.id_patient_status,                                               '+
' person.hhc1_note,                                                       '+
' person.hhc2_note,                                                       '+
' person.hhc3_note,                                                       '+
' person.id_refer_ampur,                                                  '+
' person.hhc_no_year,                                                     '+
' person.date_admit,                                                      '+
' sex.sex_code,                                                           '+
' province.province_name,                                                 '+
' aumpur.aumpur_name,                                                     '+
' tambol.tambol_name,                                                     '+
' co_village.co_village_full,                                             '+
' patient_level.patient_level_name,                                       '+
' co_internal.co_internal_full,                                           '+
' co_hos.co_hos_full,                                                     '+
' patient_status.patient_status_name,                                     '+
' refer_ampur.refer_ampur_code,                                           '+
' (substr(person.birth,1,4)+543)||substr(person.birth,5,6)as birththai    '+
' FROM                                                                    '+
' person                                                                  '+
' INNER JOIN sex ON person.id_sex = sex.id                                '+
' LEFT JOIN province ON person.id_province = province.id                  '+
' LEFT JOIN aumpur ON person.id_aumpur = aumpur.id                        '+
' LEFT JOIN tambol ON person.id_tambol = tambol.id                        '+
' LEFT JOIN co_village ON person.id_co_village = co_village.id            '+
' LEFT JOIN patient_level ON person.id_patient_level = patient_level.id   '+
' LEFT JOIN co_internal ON person.id_co_internal = co_internal.id         '+
' LEFT JOIN co_hos ON person.id_co_hos = co_hos.id                        '+
' LEFT JOIN patient_status ON person.id_patient_status = patient_status.id'+
' LEFT JOIN refer_ampur ON person.id_refer_ampur = refer_ampur.id         '+
' WHERE person.cid LIKE  "%'+ form1.Edit1.Text +'%" AND                   '+
' refer_ampur.id =                                                        '+
inttostr(form1.ComboBox1.dbItemID)  

, person);

SQLQuery(
' SELECT                                                             '+
' person_icd10_list.id,                                              '+
' person_icd10_list.id_person,                                       '+
' person_icd10_list.id_icd10_co,                                     '+
' person_icd10_list.last_update,                                     '+
' icd10_co.icd10_code,                                               '+
' icd10_co.desc_en                                                   '+
' FROM person_icd10_list                                             '+
' INNER JOIN icd10_co ON person_icd10_list.id_icd10_co = icd10_co.id '
, icd10c);

SQLQuery(
' SELECT                                                         '+
' person_icd9_list.id,                                           '+
' person_icd9_list.id_person,                                    '+
' person_icd9_list.id_icd9_co,                                   '+
' person_icd9_list.lastupdate,                                   '+
' icd9_co.icd9_code,                                             '+
' icd9_co.desc_en                                                '+
' FROM person_icd9_list                                          '+
' INNER JOIN icd9_co ON person_icd9_list.id_icd9_co = icd9_co.id '
, icd9c);

 // create person
    frxDBDataset1 := TfrxDBDataset.Create(Form1);
    frxDBDataset1.UserName        := 'person';
    frxDBDataset1.CloseDataSource := True;
    frxDBDataset1.OpenDataSource  := True;
    frxDBDataset1.DataSet         := person;
    
// create icd10c
    frxDBDataset1 := TfrxDBDataset.Create(Form1);
    frxDBDataset1.UserName        := 'icd10c';
    frxDBDataset1.CloseDataSource := True;
    frxDBDataset1.OpenDataSource  := True;
    frxDBDataset1.DataSet         := icd10c;

// create icd9c
    frxDBDataset1 := TfrxDBDataset.Create(Form1);
    frxDBDataset1.UserName        := 'icd9c';
    frxDBDataset1.CloseDataSource := True;
    frxDBDataset1.OpenDataSource  := True;
    frxDBDataset1.DataSet         := icd9c;
    
    Form1.frxReport.Clear;
    Form1.frxReport.DataSets.Clear;
    Form1.frxReport.DataSets.Add(frxDBDataset1);
    Form1.frxReport.DataSets.Add(frxDBDataset2);
    Form1.frxReport.DataSets.Add(frxDBDataset3);
    
// DESIGN MODE           
    Form1.frxReport.LoadFromFile(ExtractFilePath(Application.ExeName)+'Report\demo.fr3');
    Form1.frxReport.DesignReport;

// PREVIEW MODE
      //frxDBDataset1.DataSet.Close;
      //frxDBDataset2.DataSet.Close;
      //frxDBDataset3.DataSet.Close;

    Form1.frxReport.LoadFromFile(ExtractFilePath(Application.ExeName)+'Report\demo.fr3');
    Form1.frxReport.ShowReport;

    frxDBDataset1.Free;
    frxDBDataset2.Free;
    frxDBDataset3.Free;

end;

277

(10 replies, posted in FAQ)

@outlook @live @hotmail
It Work !
But Gmail not Work

For @outlook @live @hotmail Set
Outgoing (SMTP) Server

Server address: smtp-mail.outlook.com
Authentication: Yes
Encrypted Connection: TLS
User name: Your email address
Password: Your password

Display " Read time out" --- It ok Sended  to email but delay 10-15 second

Reference http://windows.microsoft.com/en-us/wind … e-from-app

278

(10 replies, posted in FAQ)

Not Work !

" Connect  time out. "
I try gmail.com,hotmail not work or set config smtp server !

279

(30 replies, posted in General)

Format Date Time  , Date  No Display In Table Grid In  Fist Time Run Project
Fix By Alter table MySQL to text

prahousefamily
I can't see attached images.
Download
For Dmitry.zip

280

(30 replies, posted in General)

Format Date Time  , Date  No Display In Table Grid In  Fist Time Run Project
Fix By Alter table MySQL to text

001
http://s4.postimg.org/fdmx839x7/2015_09_21_Image_001.png

002
http://s3.postimg.org/dlzo3u6m9/2015_09_21_Image_002.png

281

(30 replies, posted in General)

#(Auto Increment) not display in TableGrid
2015-09-17 Image 001

282

(30 replies, posted in General)

I And My Student Thank You  Very Much ..
I Wait Long Time And Now : Happy Happy  And Happy
-------------------------------------------------------------------------

Happy

OK Lover You DriveSoft:Dmitry

How To Set  Use ODBC  Export And Import ?

Help Me Please  Show Example

how  to use Free tool for sync table in mysql to sqlite  by realtime or set time ?

-mysql have data 1,000 record per day

procedure Form1_TableGrid2_OnCellDoubleClick (Sender: string; ACol, ARow: Integer);
begin
  form1.ComboBox1.dbItemID :=   form1.TableGrid2.dbItemID ;
  form1.Edit1.text :=
  SQLExecute ('select qty from tableb where id = ('+inttostr(form1.TableGrid2.dbItemID)+')');
end;

How Edit Script  Even DoubleClick Cell TableGrid To Send Value To Combobox And Text ?
http://s8.postimg.org/odbzmij1f/2015_08_28_Image_001.png

In Project  subreport
http://myvisualdatabase.com/forum/viewt … 9305#p9305
i will Edit Dialog In Report For Search Data And Print ?
http://s7.postimg.org/jdfx0qxdl/2015_08_25_Image_001.png
How to Edit Script Or Example use component

  • textbox
    date time edit
    radio button
    list control
    combo box control
    checklist box control

http://s23.postimg.org/cjfy2rmcp/2015_08_25_Image_002.png

289

(6 replies, posted in General)

Thank You jean.brezhonek Verymuch
Best Comment
I will try Fix code and project fro teach my student
Thank you again

Ha Ha Ha

For France, about Country Head of State, since Jacques Chirac, we had to others presidents. The last currently active is called François Hollande.
And France has now 66,03 millions peoples.

Um.... This Old Database is Old Data Ha Ha Ha

290

(6 replies, posted in General)

tcoton smile Thank You For Comment

Love tcoton

*****
This Project for teach my student easy start ....

291

(6 replies, posted in General)

World Database from MySQL Convert To SqLite
Compile MVD 1.52
You Can Download For Example Easy Start...
world_db.7z

-Basic 3 Table
Master Table : Country
Detail Table 1 : City
Detail Table 2 : Country Language
http://s21.postimg.org/5y3ic67ud/2015_08_24_Image_014.png

-Basic Script
Show Message
Grid Color When Column  Set value

//start script
//script 001 show message even form show
procedure frm_001_main_OnShow (Sender: string; Action: string);
begin
   showmessage('Hello World! Basic Example')
end;
//script 002 grid color highlight if Country Language Is Official ='T' At frm_001_main
procedure frm_001_main_TableGrid1_OnChange (Sender: string);
var
   i,c: integer;
   k,q: integer;
begin
     c := frm_001_main.TableGrid1.RowCount - 1;
     q := frm_001_main.TableGrid1.Columns.Count - 1;
     for i := 0 to c do
begin
     if frm_001_main.TableGrid1.Cells[19,i] ='T' then
     for k := 0 to q do frm_001_main.TableGrid1.Cell[k,i].Color := $507FFF  ;
end;
end;
//script 003 grid color highlight if Country Language Is Official ='T' At frm_002_country
procedure frm_002_country_TableGrid2_OnChange (Sender: string);
 var
   i,c: integer;
   k,q: integer;
begin
     c := frm_002_country.TableGrid2.RowCount - 1;
     q := frm_002_country.TableGrid2.Columns.Count - 1;
     for i := 0 to c do
begin
     if frm_002_country.TableGrid2.Cells[3,i] ='T' then
     for k := 0 to q do frm_002_country.TableGrid2.Cell[k,i].Color := $507FFF  ;
end;
end;

//script last can not delete
begin
end.

Form Preview Effect
http://s24.postimg.org/i2tc10cmr/2015_08_24_Image_002.png
http://s13.postimg.org/6mb7ii2o5/2015_08_24_Image_006.png

-Basic Report Design
http://s21.postimg.org/56o9t23hy/2015_08_24_Image_010.jpg

-Basic Print All And Print Select At Mouse in TableGrid
http://s12.postimg.org/7vx9e9q1o/2015_08_24_Image_011.jpg
http://s7.postimg.org/iqd3q8da2/2015_08_24_Image_012.jpg

Thank You
-Dmitry. For More Example And More People In This Forum

Comming Soon
-Report Design Master Detail
-Function  In Database
   Cal Date Year,Month,Date or Number Day
   Concat String Columa+ColumnB Or More
   Substring In Text,Date
   Script Update Database By Script SQL Resize ,Index ETC

292

(5 replies, posted in Reports)

Thank You Very Much love...

293

(5 replies, posted in Reports)

Where are dataset(Employee,Email,Phone)
link or relation at code ?
Script

    
Employees.frxReport.Clear;
    Employees.frxReport.DataSets.Clear;
    Employees.frxReport.DataSets.Add(frxDBDataset1);
    Employees.frxReport.DataSets.Add(frxDBDataset2);
    Employees.frxReport.DataSets.Add(frxDBDataset3);

Or Report Edit Code

procedure MasterData3OnBeforePrint(Sender: TfrxComponent);
begin
      MasterData3.Visible := <Employee."id">=<Email."id_Employees">;              
end;
  
procedure MasterData2OnBeforePrint(Sender: TfrxComponent);
begin
       MasterData2.Visible := <Employee."id">=<Phone."id_Employees">;           
end;

Yes/Or No

294

(5 replies, posted in Reports)

Help Me Please How To Edit same This Example ?
http://community-static.jaspersoft.com/sites/default/files/static/tutorials/ir_subreports/figure_1.png
http://community-static.jaspersoft.com/sites/default/files/static/tutorials/ir_subreports/figure_12.png
http://community.jaspersoft.com/wiki/subreports
Download MVD
subreport.zip

295

(5 replies, posted in General)

Um I will to add dataset more 1 dataset because edit subreport  to show master and detail data
but detail data that more than 1 table

Um.... i don't know to how edit  show

master data - patient = fname ,lname ,age,birtdday
detail data 1 - show diagnosis = icd10 code
detail data 2 - show service = icd9 code

same  example this
http://community-static.jaspersoft.com/sites/default/files/static/tutorials/ir_subreports/figure_1.png
to
http://community-static.jaspersoft.com/sites/default/files/static/tutorials/ir_subreports/figure_12.png
Subreports!
http://community.jaspersoft.com/wiki/subreports

296

(5 replies, posted in General)

Onho Thank You For  example it Good create dataset in report design

Um if dataset1  link or relation dataset 2
how to set script
http://s18.postimg.org/oa6nhnt1x/2015_08_19_Image_001.jpg
http://s8.postimg.org/b4pv0jbup/2015_08_19_Image_002.jpg

297

(5 replies, posted in General)

i will increase dataset in report editor from 1 to 2 and more
how to ?
http://s1.postimg.org/pcsgxl2ez/Image_007.jpg

how to use function system group
- FindWindow(ClassName , WindowName : String):interger
- GetHardDiskSerial(driveLetter:string):String
- GetTickCount:cardinal
for show system in my computer
http://s29.postimg.org/7htcscsxf/2015_08_13_14_13_27_001.jpg
http://s2.postimg.org/cze16l8d1/2015_08_13_14_09_10_001.jpg

299

(16 replies, posted in Script)

It have not effect  !

300

(16 replies, posted in Script)

how to edit script for display clock in footer
and update time every second . . .
http://www.delphicoding.com/images/mgDigiTimer.jpg