You can use Formula Field to change GroupName based on DropDown selection .
Thank You
You Can follow this steps :
1.Save selected value of dropdown in variable
2.Assgin to Querystring in Response.Redirect
3.Retrive from Query string in second Page
4.Assign retrived value to formula field
5.Finally In Crystal Report , Check in If Else and assign value to group name accordingly
Here I have taken One DropDown and Button , on button click , seconf Page will get called.
To Save selected value in variable in first page :
Dim strGroupType As String
strGroupType = ddlInput.SelectedItem.Text.ToString()
Response.Redirect("secondPage.aspx?GroupName=" + strGroupType)
In Second Page , To retrive value from QueryString
Dim strGroupName = Request.QueryString("GroupName")
To Set in Fornula Field
Dim strFormulas(1) As String
strFormulas(0) = strGroupName.ToString()
rptViewer.SetFormaulas = strFormulas
Finally In Crystal Report :
If {(strGroupName)= "IT"} Then
grpName := "IT"
ElseIf {(strGroupName)= "Purchase"} Then
grpName := "Purchase"
Else
grpName := "Department"