How can I print different bands depending on the value of a Field in a DataSet using FastReport?

I have a product's dataset and I want to have distinct bands for each type of product, something like, if the product is a fruit, print it's weight, if the product is a car print its color and so on.

And I want to let my users customize it, so each band for each type o product will be perfect.

My DataSet have all fields from all type of products and I have a field which determines the product type of the actual record.

Is there some easy to way to do it?

Answers


FastReports allows you to intercept the program's default report construction process with events at several useful places. If you have, for example a master band, in its OnBeforePrint event, you can put code that checks out the type of product and then a case statement could set the visible property to true only on detail bands that are the right kind of property.

I have found the news group at news://newsgroups.fast-report.com/fast-reports.public.fastreport.4 to be an incredible source of help and encouragement. I am sure you can find a much better answer to your question there.


Need Your Help

Annuity or Angle Operation Symbol in LaTeX

math latex symbols angle

How do I set the symbol for the angle or annuity operation in LaTeX? Specifically, this is the actuarial a angle s = (1-vs)/i.

Excel built-in dialogs

excel vba dialog built-in

Does anybody know how to call the import data built-in dialog excel from a macro (vba)?