Changing Groups Using Report Designer Component 
Author Message
 Changing Groups Using Report Designer Component

Is there a simple way to enable an enduser to change the grouping/sorting at
runtime?

For example, I have a person table with two fields I want the user to be
able to choose what they want to group on - position (student, nurse,
teacher...) or sex (m/f).

I have a selection criteria form where they choose either position or sex
using option buttons, once OK is hit, the corresponding group report should
print out.  I am using the report designer component with VB5, and Access
97.


Thank you for your time

Kristy



Fri, 05 Jan 2001 03:00:00 GMT  
 Changing Groups Using Report Designer Component
Is there a simple way to enable an enduser to change the grouping/sorting at
runtime?

For example, I have a person table with two fields I want the user to be
able to choose what they want to group on - position (student, nurse,
teacher...) or sex (m/f).

I have a selection criteria form where they choose either position or sex
using option buttons, once OK is hit, the corresponding group report should
print out.  I am using the report designer component with VB5, and Access
97.


Thank you for your time

Kristy



Fri, 05 Jan 2001 03:00:00 GMT  
 Changing Groups Using Report Designer Component
You can make what they call an unlinked subreport, one grouped on sex
one on position, then based on a value you can show one report or the
other depending on the value

Jim

Quote:

> Is there a simple way to enable an enduser to change the grouping/sorting at
> runtime?

> For example, I have a person table with two fields I want the user to be
> able to choose what they want to group on - position (student, nurse,
> teacher...) or sex (m/f).

> I have a selection criteria form where they choose either position or sex
> using option buttons, once OK is hit, the corresponding group report should
> print out.  I am using the report designer component with VB5, and Access
> 97.


> Thank you for your time

> Kristy



Sat, 06 Jan 2001 03:00:00 GMT  
 Changing Groups Using Report Designer Component
This is a response I got from Seagate, hope it can help someone.

This EMail was sent: 7/21/98 2:53:30 PM (Pacific Standard Time)

*** This incident has been closed.  To reopen, simply reply to this email
with the additional information.  Do not use this Control Number for a
different question as it will go to the wrong support group ***

----------------------------------------------------------------------------
----------------------------------

Response To: Kristy Lanter

Hi Kristy,

            Thank you for contacting us at Seagate Software Technical
Support .There are two ways of doing this but we'll take the easy one but it
still
requires a bit of explaination. I'll explain this step by step.


formula place any field in this formula (you can't group on a blank
formula).
    We will be changing the contents of this formula at runtime depending on
what button you push.Suppress the formula

2) Group on the formula.

3) Place the following code in your Program to change the contents of the
formula to the field at run time ;
    You can do this on command1_click as below.

'place this in a module
Public Report As New CrystalReport1
================================

'puts this into the formula at run time / command button1 / position
Private Sub Command1_Click()
Report.FormulaFields(1).Text = ("{field.position}") 'field
End Sub

'puts this into the formula at run time / command button 2 / sex
Private Sub Command2_Click()
Report.FormulaFields(1).Text = ("{customer.Sex}")
End Sub

'calls form 2/ below
Private Sub Command3_Click()
Form2.Show
End Sub

=======================
'form2
Private Sub Form_Load()

CRViewer1.ReportSource = Report
CRViewer1.ViewReport

End Sub

Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth

End Sub

4) So when the contents of the formula are changed the group changes. It now
groups on the field that has been passed to the formula.
_______________________________________________________________
The Seagate Software Vancouver office has moved.
Our new address at Cambie and Robson in downtown Vancouver is:
840 Cambie Street Vancouver B.C. Canada V6B 4J2.

http://www.seagatesoftware.com

All telephone and fax numbers remain the same.

Try this link for our on-line Knowledge Base:
http://www.seagatesoftware.com/crystalinfo/techsupp/
_______________________________________________________________



Sun, 07 Jan 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Report Designer Component - Changing Data Source At Run-Time

2. Changing a formula @ Run Time - Report Designer Component

3. Changing SQL statement in Report Designer Component

4. Has someone used the Crystal Report Designer Component?

5. Problem selecting records using ADO/Report designer component 6

6. Using Crystal Report Designer Component need to use mulitiple databases with same tables

7. Using Crystal 8.0 Report Designer Component

8. Problem selecting records using ADO/Report designer component 6

9. Crystal Reports 6 Report Designer Component

10. Crystal Reports Report Designer Component

11. Crystal Report Designer Component (Previewing a report.)

12. Crystal Reports "Report Designer Component"

 

 
Powered by phpBB® Forum Software