1 (edited by prahousefamily 2016-07-27 07:57:59)

Topic: Script In Dialog Report : CheckListBox OK! happy

How to import data form dataset to items in checklistbox fro create parameter
i try script  show message  it work OK!
but i try add items note work
how to fix or share Knowledge ? Thank you ...
https://i.imgsafe.org/82c45567ff.png

Post's attachments

Attachment icon ReportDialog.zip 164.23 kb, 534 downloads since 2016-07-15 

My Visual Database : I Love You
Easy For Beginner Student For Me

Re: Script In Dialog Report : CheckListBox OK! happy

Unfortunately I can't understand your question. Also I can't see your attached picture.

Dmitry.

3 (edited by prahousefamily 2016-07-19 01:21:01)

Re: Script In Dialog Report : CheckListBox OK! happy

Hi Dmitry.
Now I am  try use dialog in report  for create parameter in Element

CheckListBox1:TfrxCheckListBoxControl
control representing a list of items, selected by means of a checkbox

but how to import data in dataset 
go to is items(TStrings) in Properties CheckListBox1 For effect in report

Help Me Please !


https://i.imgsafe.org/cc252e95da.png

Same Example
01
https://i.imgsafe.org/cc8fbca678.png
02
https://i.imgsafe.org/cc8fd2b10f.png
03
https://i.imgsafe.org/cc8fe939cb.png



FastReport VCL 5 Demo     Jul 1, 2016 9:32 AM     2.33
Download
https://www.fast-report.com/en/download … files/194/

Post's attachments

Attachment icon 82c45567ff.png 68.27 kb, 348 downloads since 2016-07-18 

My Visual Database : I Love You
Easy For Beginner Student For Me

Re: Script In Dialog Report : CheckListBox OK! happy

Unfortunately I can't see attached screenshots, please attach them or try to use another hosting for pictures.

Dmitry.

5 (edited by prahousefamily 2016-07-20 17:45:03)

Re: Script In Dialog Report : CheckListBox OK! happy

Unfortunately I can't see attached screenshots, please attach them or try to use another hosting for pictures.
Dmitry.

Dmitry. I Change Host Image Upload  I Hope You Can See
Help Me Please !

http://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=2201&download=0

Post's attachments

Attachment icon S0.png 113.13 kb, 240 downloads since 2016-07-20 

My Visual Database : I Love You
Easy For Beginner Student For Me

Re: Script In Dialog Report : CheckListBox OK! happy

Screen Short

Post's attachments

Attachment icon Screen Short.zip 173.89 kb, 510 downloads since 2016-07-20 

My Visual Database : I Love You
Easy For Beginner Student For Me

Re: Script In Dialog Report : CheckListBox OK! happy

Please check out this script for report.

var
       ds: TfrxDataSet;  


begin
       ds := Report.GetDataset('country');
       while not ds.eof do
       begin
           CheckListBox1.Items.Add( ds.Value('ccode') );                                       
           ds.Next;
       end;          
  
       DialogPage1.ShowModal;  
end.
Dmitry.

8 (edited by prahousefamily 2016-07-27 08:05:30)

Re: Script In Dialog Report : CheckListBox OK! happy

Hi Dmitry.
Code You Post It OK Work !!!!
Thank You Very Much
And Now I Fix Error For Learn Script Report  Easy...... Happy Happy Happy



I And My Student Thank you Dmitry Again...




And Next Version Report Dialog 2.0
-Calendar  Between
-Text  Exact,Like


Screen Short
001
https://s31.postimg.org/tig7gccd3/2016_07_27_14_41_10.png
002
https://s31.postimg.org/y7jmrdgrb/2016_07_27_14_41_26.png
003
https://s32.postimg.org/41l6p67oh/2016_07_27_14_42_08.png


Code Script In Report

var
ds: TfrxDataSet;
procedure CheckListBox1OnClick(Sender: TfrxComponent);
var i : integer;
begin
    Memo13.lines.clear ;
    for i := 0 to CheckListBox1.items.Count - 1 do
    begin
        if CheckListBox1.Checked[i] = true then
        begin
            Memo13.lines.add(checklistbox1.Items.Strings[i]);
        end;
    end;
end;
procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
begin
    if
    Pos(<city."CountryCode">,Memo13.Lines.Text) >= 1
    Then MasterData1.Visible := True Else MasterData1.Visible :=False ;
end;
procedure GroupHeader1OnBeforePrint(Sender: TfrxComponent);
begin
    if
    Pos(<city."CountryCode">,Memo13.Lines.Text) >= 1
    Then GroupHeader1.Visible := True Else GroupHeader1.Visible :=False ;
end;
procedure GroupFooter1OnBeforePrint(Sender: TfrxComponent);
begin
    if
    GroupHeader1.Visible = true
    Then  GroupFooter1.Visible := True Else  GroupFooter1.Visible :=False ;
end;
procedure BitBtn2OnClick(Sender: TfrxComponent);
Var
i : Integer ;
begin
    Memo13.lines.clear ;
    begin
        for i := 0 to CheckListBox1.items.Count - 1 do
        CheckListBox1.Checked[i] := true ;
    end;
    begin
        for i := 0 to CheckListBox1.items.Count - 1 do
        begin if CheckListBox1.Checked[i] = true then
            begin
                Memo13.lines.add(checklistbox1.Items.Strings[i]);
            end;
        end;
    end;
end;
procedure BitBtn3OnClick(Sender: TfrxComponent);
Var
i : Integer ;
begin
    Memo13.lines.clear ;
    begin
        for i := 0 to CheckListBox1.items.Count - 1 do
        CheckListBox1.Checked[i] := False ;
    end
end;
begin
    ds := Report.GetDataset('country');
    while not ds.eof do
    begin
        CheckListBox1.Items.Add( ds.Value('ccode') );
        ds.Next;
    end;
end.
Post's attachments

Attachment icon ReportDialog Fix 1.0.zip 165.58 kb, 597 downloads since 2016-07-27 

My Visual Database : I Love You
Easy For Beginner Student For Me