How to print different ranges depending on field value in dataset using FastReport?
I have a product dataset and I want to have different stripes for each type of product, for example, if the product is a fruit, print its weight, if the product is a car, print its color, etc.
And I want my users to customize it, so every group for every type o product would be perfect.
My DataSet has all fields from all product types and I have a field that defines the product type of the actual record.
Is there an easy way to do this?
source to share
FastReports allows you to intercept the default reporting process with events in several useful places. If you have, for example, a main group, in your OnBeforePrint event, you can put code that checks the product type, and then a case statement can set the visible property to true only on verbose ranges that are the correct kind of property.
I found the newsgroup at news: //newsgroups.fast-report.com/fast-reports.public.fastreport.4 to be an incredible source of help and support. I'm sure you can find a much better answer to your question.
source to share