Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show Group dynamically

Status
Not open for further replies.

tommy99

Technical User
Oct 26, 2003
13
AE
Hi !

I have designed a Report in Crystal (v8.x) showing a list of employees with their salary figures from a FOX2X table. The table has the fields like ID, Name, Department, Designation, Salary etc. The report is shown correctly when called from a VFP program.

Now I wish to group the same report as a summary but grouped on Department or designation. The user will decide in the VFp form whether the report will be grouped on Department or Designation and this will be passed to the crystal report as a parameter. Now how is it possible to group the report in Crystal dynamically with the selection from VFP program ? If the value passed from VFP is 'Designation', the report should show the summary in crystal with Groups
as 'Designation'. If the value passed from VFP is 'Department', the report should be grouped on 'Department'. Tried with passing parameters but no luck. How can we chose the Group by field in Crystal dynamically from a VFP program, passed as parameter value ?

Any help will be appreciated.

Tom


 
Hi,
Create a formula the uses the passed parameter value to set the grouping info:
Code:
If {?parameter} = 'Department' then
{TABLE.DEPARTMENT}
else if {?parameter = 'Designation' then
{TABLE.DESIGNATION}
Then Insert a Group section based on the Formula ..
If neither value is passed no grouping will take place.
[profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top