On 02/24/2013 09:19 PM, Jesus Reyes wrote:
--- El jue 21-feb-13, Giuliano Colla<[email protected]> escribió:
I've tested a different approach, i.e. not *setting* the
Band name, but just *getting* Band name from BandView, (a
Name property in TfrBand which just returns the name of the
corresponding Bandview, i.e. View.Name). It doesn't produce
side effects, because when the BandView name is set the
corresponding Band object doesn't yet exist.
There are two solutions:
1) I send you the new patch.
2) We leave things as they are, but the examples and the
documentation are modified to make it clear that
TfrBand.Name is always empty, and that one must use
TfrBand.View.Name to obtain a meaningful information.
You're the boss, so it's up to you to decide.
Giuliano
Yes, please send the patch.
Jesus Reyes A.
Here is it.
Giuliano
--- lr_class.pas.orig 2012-11-23 00:47:56.000000000 +0100
+++ lr_class.pas 2013-02-25 20:28:26.000000000 +0100
@@ -556,6 +556,7 @@
DisableInit: Boolean;
CalculatedHeight: Integer;
+ function getViewName: string;
procedure InitDataSet(const Desc: String);
procedure DoError;
function CalcHeight: Integer;
@@ -593,6 +594,7 @@
constructor Create(ATyp: TfrBandType; AParent: TfrPage); overload;
destructor Destroy; override;
function IsDataBand: boolean;
+ property Name: string Read getViewName;
end;
TfrValue = class
@@ -4794,6 +4796,12 @@
DataSet := CurReport.Dataset;
end;
+function TfrBand.getViewName: string;
+begin
+ if Assigned(View) then Result := View.Name
+ else Result := '';
+end;
+
procedure TfrBand.DoError;
var
i: Integer;
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus