View Issue Details

IDProjectCategoryView StatusLast Update
0022753LazarusLazReportpublic2012-09-22 19:19
ReporterChristianAssigned ToJesus Reyes 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.0.1 (SVN)Product Build 
Target Version1.2.0Fixed in Version1.1 (SVN) 
Summary0022753: [Patch] fix Lazreport not selecting Fields from Datasets on Dialogs correctly
Descriptionat example when using the new Zeos or SQLDb connectors
TagsNo tags attached.
Fixed in Revision38797
LazTarget1.2
Widgetset
Attached Files
  • lrutils_fix.patch (1,415 bytes)
    Index: components/lazreport/source/lr_utils.pas
    ===================================================================
    --- components/lazreport/source/lr_utils.pas	(revision 38441)
    +++ components/lazreport/source/lr_utils.pas	(working copy)
    @@ -357,11 +357,26 @@
               S4:=Copy(S3, 1, n-1);
               Delete(S3, 1, n);
               Owner:=Owner.FindComponent(S2);
    -          if Assigned(Owner)then
    -            DataSet := TfrTDataSet(Owner.FindComponent(s4));
    +          Component := frFindComponent(Owner, s4);
    +          if Assigned(Component) then
    +            begin
    +              if Component is TDataSet then
    +                DataSet := TfrTDataSet(Component)
    +              else if Component is TDataSource then
    +                DataSet := TfrTDataSet(TDataSource(Component).DataSet);
    +            end;
             end
             else
    -          DataSet := TfrTDataSet(Owner.FindComponent(s2));
    +          begin
    +            Component := frFindComponent(Owner, s2);
    +            if Assigned(Component) then
    +              begin
    +                if Component is TDataSet then
    +                  DataSet := TfrTDataSet(Component)
    +                else if Component is TDataSource then
    +                  DataSet := TfrTDataSet(TDataSource(Component).DataSet);
    +              end;
    +          end;
             RemoveQuotes(s3);
             if DataSet <> nil then
               Field := TfrTField(DataSet.FindField(s3));
    
    lrutils_fix.patch (1,415 bytes)

Activities

2012-08-30 14:03

 

lrutils_fix.patch (1,415 bytes)
Index: components/lazreport/source/lr_utils.pas
===================================================================
--- components/lazreport/source/lr_utils.pas	(revision 38441)
+++ components/lazreport/source/lr_utils.pas	(working copy)
@@ -357,11 +357,26 @@
           S4:=Copy(S3, 1, n-1);
           Delete(S3, 1, n);
           Owner:=Owner.FindComponent(S2);
-          if Assigned(Owner)then
-            DataSet := TfrTDataSet(Owner.FindComponent(s4));
+          Component := frFindComponent(Owner, s4);
+          if Assigned(Component) then
+            begin
+              if Component is TDataSet then
+                DataSet := TfrTDataSet(Component)
+              else if Component is TDataSource then
+                DataSet := TfrTDataSet(TDataSource(Component).DataSet);
+            end;
         end
         else
-          DataSet := TfrTDataSet(Owner.FindComponent(s2));
+          begin
+            Component := frFindComponent(Owner, s2);
+            if Assigned(Component) then
+              begin
+                if Component is TDataSet then
+                  DataSet := TfrTDataSet(Component)
+                else if Component is TDataSource then
+                  DataSet := TfrTDataSet(TDataSource(Component).DataSet);
+              end;
+          end;
         RemoveQuotes(s3);
         if DataSet <> nil then
           Field := TfrTField(DataSet.FindField(s3));
lrutils_fix.patch (1,415 bytes)

Jesus Reyes

2012-09-22 19:19

developer   ~0062570

Applied, thanks.

Issue History

Date Modified Username Field Change
2012-08-30 14:03 Christian New Issue
2012-08-30 14:03 Christian File Added: lrutils_fix.patch
2012-09-06 07:13 Jesus Reyes Status new => assigned
2012-09-06 07:13 Jesus Reyes Assigned To => Jesus Reyes
2012-09-22 19:19 Jesus Reyes Fixed in Revision => 38797
2012-09-22 19:19 Jesus Reyes LazTarget => 1.2
2012-09-22 19:19 Jesus Reyes Status assigned => resolved
2012-09-22 19:19 Jesus Reyes Fixed in Version => 1.1 (SVN)
2012-09-22 19:19 Jesus Reyes Resolution open => fixed
2012-09-22 19:19 Jesus Reyes Note Added: 0062570
2012-09-22 19:19 Jesus Reyes Target Version => 1.2.0