如何使用 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
FastReports 允许您通过多个有用位置的事件来拦截程序的默认报告构建过程。 例如,如果您有一个主带,在其 OnBeforePrint 事件中,您可以放置检查产品类型的代码,然后 case 语句可以仅在属于正确类型属性的详细带上将可见属性设置为 true。
我在 找到了新闻组news://newsgroups.fast-report.com/fast-reports.public.fastreport.4 成为令人难以置信的帮助和鼓励来源。 我相信您可以在那里找到更好的答案。
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.