How to hide

Hello group .

I am in soup again .. ;) .

In my report I am adding all the fields dynamically to the master data band.
Like Account : [AccountNo] | BankName : [BankName] |..........etc

However I have 3-15 fields say Field1 to Field15 which I add to master data
band during formatting and before preparing report.

These Field1 to Field15 properties are not valid all the time. That is depending
upon the some other field. So I have written some code to populate these fields
in "OnFirst" and "OnNext" events of TfrDbDataset. In this event I calculate and
find out which of these Field1 to Field15 are valid. And I populate a list with the
valid values and those fields that are not valid I set there visible property to
false.

Now in the OnGetValue Method of the report I have a code like this
FrReport.GetValue (ParName,ParValue);
begin
FldIdx := DBFldNames.IndexOf(ParName);
if FldIdx > -1 then
begin
ParValue := DBValues.Strings[FldIdx];
end
end;

This works fine when I have all the fields(Field1 to Field15) valid.
But gives problem when some of the fields are visible =false;

My question is if a I make a field12 (whose text is [Field12]) invisble why does OnGetvalue event fire with ParName = Field12 (even though that
field is invisible.)?
How can make some fields invisible and corresponding OnGetValue fn doesn't fire for those invisible fields.. ?

Thanks in advance
Amar

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 7:53PM
    in the on get value add if blocks to test for the parameter name.
    regards ;)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.