dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Enterprise
Expertise: Beginner
Jun 25, 1998

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Dynamic Crystal Groups

Often, when adding Crystal reports to your system, you'll find that users want the same basic report grouped different ways, like sales reports by customer state or salesman or region, and so on. Don't code that report over and over--use one Crystal report to do all of them.

Add a formula to your report--lets call it Group1 for this example. Then add a group to your report. Instead of grouping on a database field, group on the formula Group1. Now, at runtime when you want to execute the report grouped by customer state, for example, change the value of formula Group1 to the name of the database field you want to group on. Using the Crystal object library in VB, the code might look something like this:

 
rept.FormulaFields.Item("Group1").Text = "{Customer.State}"
(The code using the OCX or Crystal designer will be similar)

Then run your report--presto! Your report is grouped by customer state.

David Lambert
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date