View Issue Details

IDProjectCategoryView StatusLast Update
0015951LazarusPatchpublic2010-03-10 23:40
ReporterChristian Assigned ToJesus Reyes  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.28.3 (SVN) 
Fixed in Version0.9.29 (SVN) 
Summary0015951: Patch for lazreport to Accept DataSources in Field Editor Tool
DescriptionField Editor tool ignores dtDataSet,dtDataSource Types at Time attatched patch fixes this
TagsNo tags attached.
Fixed in Revision23930
LazTarget-
WidgetsetGTK, GTK 2, Win32/Win64, WinCE, Carbon, QT, fpGUI
Attached Files

Activities

2010-03-10 22:26

 

lazreport.patch (10,599 bytes)   
Index: components/lazreport/source/lr_iflds.lfm
===================================================================
--- components/lazreport/source/lr_iflds.lfm	(revision 23926)
+++ components/lazreport/source/lr_iflds.lfm	(working copy)
@@ -16,9 +16,9 @@
     AnchorSideLeft.Control = Owner
     AnchorSideTop.Control = Owner
     Left = 6
-    Height = 18
+    Height = 16
     Top = 6
-    Width = 135
+    Width = 95
     BorderSpacing.Around = 6
     Caption = '&Available datasets'
     FocusControl = DatasetCB
@@ -31,8 +31,8 @@
     AnchorSideRight.Control = GroupBox1
     AnchorSideBottom.Control = ButtonPanel1
     Left = 6
-    Height = 228
-    Top = 67
+    Height = 244
+    Top = 57
     Width = 247
     HelpContext = 106
     Anchors = [akTop, akLeft, akRight, akBottom]
@@ -41,7 +41,6 @@
     ItemHeight = 0
     MultiSelect = True
     TabOrder = 0
-    TopIndex = -1
   end
   object DatasetCB: TComboBox
     AnchorSideLeft.Control = Owner
@@ -49,13 +48,13 @@
     AnchorSideTop.Side = asrBottom
     AnchorSideRight.Control = GroupBox1
     Left = 6
-    Height = 31
-    Top = 30
+    Height = 23
+    Top = 28
     Width = 247
     HelpContext = 97
     Anchors = [akTop, akLeft, akRight]
     BorderSpacing.Around = 6
-    ItemHeight = 0
+    ItemHeight = 15
     OnChange = DatasetCBChange
     Sorted = True
     Style = csDropDownList
@@ -72,14 +71,14 @@
     Anchors = [akTop, akRight]
     BorderSpacing.Around = 6
     Caption = 'Placement'
-    ClientHeight = 44
-    ClientWidth = 165
+    ClientHeight = 47
+    ClientWidth = 169
     TabOrder = 2
     object HorzRB: TRadioButton
       Left = 8
       Height = 19
       Top = 5
-      Width = 89
+      Width = 75
       HelpContext = 115
       AllowGrayed = True
       Caption = '&Horizontal'
@@ -91,7 +90,7 @@
       Left = 8
       Height = 19
       Top = 25
-      Width = 69
+      Width = 59
       HelpContext = 122
       AllowGrayed = True
       Caption = '&Vertical'
@@ -105,13 +104,13 @@
     AnchorSideRight.Control = Owner
     AnchorSideRight.Side = asrBottom
     Left = 259
-    Height = 60
+    Height = 75
     Top = 77
     Width = 173
     Anchors = [akTop, akRight]
     BorderSpacing.Around = 6
-    ClientHeight = 52
-    ClientWidth = 165
+    ClientHeight = 57
+    ClientWidth = 169
     TabOrder = 3
     object HeaderCB: TCheckBox
       AnchorSideLeft.Control = GroupBox2
@@ -119,7 +118,7 @@
       Left = 6
       Height = 19
       Top = 6
-      Width = 131
+      Width = 103
       HelpContext = 132
       BorderSpacing.Around = 6
       Caption = '&Include headers'
@@ -132,7 +131,7 @@
       Left = 6
       Height = 19
       Top = 31
-      Width = 117
+      Width = 94
       BorderSpacing.Around = 6
       Caption = 'Include &bands'
       TabOrder = 1
@@ -140,8 +139,8 @@
   end
   object ButtonPanel1: TButtonPanel
     Left = 6
-    Height = 40
-    Top = 301
+    Height = 34
+    Top = 307
     Width = 426
     TabOrder = 4
     ShowButtons = [pbOK, pbCancel, pbHelp]
Index: components/lazreport/source/lr_iflds.lrs
===================================================================
--- components/lazreport/source/lr_iflds.lrs	(revision 23926)
+++ components/lazreport/source/lr_iflds.lrs	(working copy)
@@ -7,44 +7,43 @@
   +#1#11'ClientWidth'#3#182#1#8'OnCreate'#7#10'FormCreate'#6'OnShow'#7#8'FormSh'
   +'ow'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.29'#0#6'TLabel'
   +#6'Label1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7
-  +#5'Owner'#4'Left'#2#6#6'Height'#2#18#3'Top'#2#6#5'Width'#3#135#0#20'BorderSp'
-  +'acing.Around'#2#6#7'Caption'#6#19'&Available datasets'#12'FocusControl'#7#9
-  +'DatasetCB'#11'ParentColor'#8#0#0#8'TListBox'#7'FieldsL'#22'AnchorSideLeft.C'
-  +'ontrol'#7#5'Owner'#21'AnchorSideTop.Control'#7#9'DatasetCB'#18'AnchorSideTo'
-  +'p.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'GroupBox1'#24'Anchor'
-  +'SideBottom.Control'#7#12'ButtonPanel1'#4'Left'#2#6#6'Height'#3#228#0#3'Top'
-  +#2'C'#5'Width'#3#247#0#11'HelpContext'#2'j'#7'Anchors'#11#5'akTop'#6'akLeft'
-  +#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#16'ClickOnSelChange'#8
-  +#10'ItemHeight'#2#0#11'MultiSelect'#9#8'TabOrder'#2#0#8'TopIndex'#2#255#0#0#9
-  +'TComboBox'#9'DatasetCB'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSide'
-  +'Top.Control'#7#6'Label1'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSid'
-  +'eRight.Control'#7#9'GroupBox1'#4'Left'#2#6#6'Height'#2#31#3'Top'#2#30#5'Wid'
-  +'th'#3#247#0#11'HelpContext'#2'a'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'
-  +#0#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#0#8'OnChange'#7#15'DatasetC'
-  +'BChange'#6'Sorted'#9#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#1#0#0#9'TG'
-  +'roupBox'#9'GroupBox1'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRig'
-  +'ht.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#3#1
-  +#6'Height'#2'A'#3'Top'#2#6#5'Width'#3#173#0#7'Anchors'#11#5'akTop'#7'akRight'
-  +#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#9'Placement'#12'ClientHeight'#2
-  +','#11'ClientWidth'#3#165#0#8'TabOrder'#2#2#0#12'TRadioButton'#6'HorzRB'#4'L'
-  +'eft'#2#8#6'Height'#2#19#3'Top'#2#5#5'Width'#2'Y'#11'HelpContext'#2's'#11'Al'
-  +'lowGrayed'#9#7'Caption'#6#11'&Horizontal'#7'Checked'#9#5'State'#7#9'cbCheck'
-  +'ed'#8'TabOrder'#2#0#0#0#12'TRadioButton'#6'VertRB'#4'Left'#2#8#6'Height'#2
-  +#19#3'Top'#2#25#5'Width'#2'E'#11'HelpContext'#2'z'#11'AllowGrayed'#9#7'Capti'
-  +'on'#6#9'&Vertical'#8'TabOrder'#2#1#7'TabStop'#8#0#0#0#9'TGroupBox'#9'GroupB'
-  +'ox2'#21'AnchorSideTop.Control'#7#9'GroupBox1'#18'AnchorSideTop.Side'#7#9'as'
-  +'rBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9
-  +'asrBottom'#4'Left'#3#3#1#6'Height'#2'<'#3'Top'#2'M'#5'Width'#3#173#0#7'Anch'
-  +'ors'#11#5'akTop'#7'akRight'#0#20'BorderSpacing.Around'#2#6#12'ClientHeight'
-  +#2'4'#11'ClientWidth'#3#165#0#8'TabOrder'#2#3#0#9'TCheckBox'#8'HeaderCB'#22
-  +'AnchorSideLeft.Control'#7#9'GroupBox2'#21'AnchorSideTop.Control'#7#9'GroupB'
-  +'ox2'#4'Left'#2#6#6'Height'#2#19#3'Top'#2#6#5'Width'#3#131#0#11'HelpContext'
-  +#3#132#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#16'&Include headers'#8'Ta'
-  +'bOrder'#2#0#0#0#9'TCheckBox'#6'BandCB'#22'AnchorSideLeft.Control'#7#9'Group'
-  +'Box2'#21'AnchorSideTop.Control'#7#8'HeaderCB'#18'AnchorSideTop.Side'#7#9'as'
-  +'rBottom'#4'Left'#2#6#6'Height'#2#19#3'Top'#2#31#5'Width'#2'u'#20'BorderSpac'
-  +'ing.Around'#2#6#7'Caption'#6#14'Include &bands'#8'TabOrder'#2#1#0#0#0#12'TB'
-  +'uttonPanel'#12'ButtonPanel1'#4'Left'#2#6#6'Height'#2'('#3'Top'#3'-'#1#5'Wid'
-  +'th'#3#170#1#8'TabOrder'#2#4#11'ShowButtons'#11#4'pbOK'#8'pbCancel'#6'pbHelp'
-  +#0#0#0#0
+  +#5'Owner'#4'Left'#2#6#6'Height'#2#16#3'Top'#2#6#5'Width'#2'_'#20'BorderSpaci'
+  +'ng.Around'#2#6#7'Caption'#6#19'&Available datasets'#12'FocusControl'#7#9'Da'
+  +'tasetCB'#11'ParentColor'#8#0#0#8'TListBox'#7'FieldsL'#22'AnchorSideLeft.Con'
+  +'trol'#7#5'Owner'#21'AnchorSideTop.Control'#7#9'DatasetCB'#18'AnchorSideTop.'
+  +'Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'GroupBox1'#24'AnchorSi'
+  +'deBottom.Control'#7#12'ButtonPanel1'#4'Left'#2#6#6'Height'#3#244#0#3'Top'#2
+  +'9'#5'Width'#3#247#0#11'HelpContext'#2'j'#7'Anchors'#11#5'akTop'#6'akLeft'#7
+  +'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#16'ClickOnSelChange'#8
+  +#10'ItemHeight'#2#0#11'MultiSelect'#9#8'TabOrder'#2#0#0#0#9'TComboBox'#9'Dat'
+  +'asetCB'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#6
+  +'Label1'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7
+  +#9'GroupBox1'#4'Left'#2#6#6'Height'#2#23#3'Top'#2#28#5'Width'#3#247#0#11'Hel'
+  +'pContext'#2'a'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#20'BorderSpaci'
+  +'ng.Around'#2#6#10'ItemHeight'#2#15#8'OnChange'#7#15'DatasetCBChange'#6'Sort'
+  +'ed'#9#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#1#0#0#9'TGroupBox'#9'Grou'
+  +'pBox1'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#5
+  +'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#3#1#6'Height'#2'A'
+  +#3'Top'#2#6#5'Width'#3#173#0#7'Anchors'#11#5'akTop'#7'akRight'#0#20'BorderSp'
+  +'acing.Around'#2#6#7'Caption'#6#9'Placement'#12'ClientHeight'#2'/'#11'Client'
+  +'Width'#3#169#0#8'TabOrder'#2#2#0#12'TRadioButton'#6'HorzRB'#4'Left'#2#8#6'H'
+  +'eight'#2#19#3'Top'#2#5#5'Width'#2'K'#11'HelpContext'#2's'#11'AllowGrayed'#9
+  +#7'Caption'#6#11'&Horizontal'#7'Checked'#9#5'State'#7#9'cbChecked'#8'TabOrde'
+  +'r'#2#0#0#0#12'TRadioButton'#6'VertRB'#4'Left'#2#8#6'Height'#2#19#3'Top'#2#25
+  +#5'Width'#2';'#11'HelpContext'#2'z'#11'AllowGrayed'#9#7'Caption'#6#9'&Vertic'
+  +'al'#8'TabOrder'#2#1#7'TabStop'#8#0#0#0#9'TGroupBox'#9'GroupBox2'#21'AnchorS'
+  +'ideTop.Control'#7#9'GroupBox1'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'Anc'
+  +'horSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4
+  +'Left'#3#3#1#6'Height'#2'K'#3'Top'#2'M'#5'Width'#3#173#0#7'Anchors'#11#5'akT'
+  +'op'#7'akRight'#0#20'BorderSpacing.Around'#2#6#12'ClientHeight'#2'9'#11'Clie'
+  +'ntWidth'#3#169#0#8'TabOrder'#2#3#0#9'TCheckBox'#8'HeaderCB'#22'AnchorSideLe'
+  +'ft.Control'#7#9'GroupBox2'#21'AnchorSideTop.Control'#7#9'GroupBox2'#4'Left'
+  +#2#6#6'Height'#2#19#3'Top'#2#6#5'Width'#2'g'#11'HelpContext'#3#132#0#20'Bord'
+  +'erSpacing.Around'#2#6#7'Caption'#6#16'&Include headers'#8'TabOrder'#2#0#0#0
+  +#9'TCheckBox'#6'BandCB'#22'AnchorSideLeft.Control'#7#9'GroupBox2'#21'AnchorS'
+  +'ideTop.Control'#7#8'HeaderCB'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'
+  +#2#6#6'Height'#2#19#3'Top'#2#31#5'Width'#2'^'#20'BorderSpacing.Around'#2#6#7
+  +'Caption'#6#14'Include &bands'#8'TabOrder'#2#1#0#0#0#12'TButtonPanel'#12'But'
+  +'tonPanel1'#4'Left'#2#6#6'Height'#2'"'#3'Top'#3'3'#1#5'Width'#3#170#1#8'TabO'
+  +'rder'#2#4#11'ShowButtons'#11#4'pbOK'#8'pbCancel'#6'pbHelp'#0#0#0#0
 ]);
Index: components/lazreport/source/lr_iflds.pas
===================================================================
--- components/lazreport/source/lr_iflds.pas	(revision 23926)
+++ components/lazreport/source/lr_iflds.pas	(working copy)
@@ -57,7 +57,10 @@
 procedure TfrInsertFieldsForm.FormShow(Sender: TObject);
 begin
   DataSet := nil;
-  frGetComponents(CurReport.Owner, TDataSet, DatasetCB.Items, nil);
+  if Curreport.DataType = dtDataSet then
+    frGetComponents(CurReport.Owner, TDataSet, DatasetCB.Items, nil)
+  else
+    frGetComponents(CurReport.Owner, TDataSource, DatasetCB.Items, nil);
   if DatasetCB.Items.Count > 0 then
     DatasetCB.ItemIndex := 0;
   GetFields;
lazreport.patch (10,599 bytes)   

Jesus Reyes

2010-03-10 23:01

developer   ~0035211

I applied only the relevant source code part.

Thanks.

Issue History

Date Modified Username Field Change
2010-03-10 22:26 Christian New Issue
2010-03-10 22:26 Christian File Added: lazreport.patch
2010-03-10 22:26 Christian Widgetset => GTK, GTK 2, Win32/Win64, WinCE, Carbon, QT, fpGUI
2010-03-10 22:53 Jesus Reyes Status new => assigned
2010-03-10 22:53 Jesus Reyes Assigned To => Jesus Reyes
2010-03-10 23:01 Jesus Reyes Fixed in Revision => 23930
2010-03-10 23:01 Jesus Reyes LazTarget => -
2010-03-10 23:01 Jesus Reyes Status assigned => resolved
2010-03-10 23:01 Jesus Reyes Fixed in Version => 0.9.29 (SVN)
2010-03-10 23:01 Jesus Reyes Resolution open => fixed
2010-03-10 23:01 Jesus Reyes Note Added: 0035211
2010-03-10 23:40 Christian Status resolved => closed