Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: sort control Post Reply Post New Topic
Author Message
supermedo84
Newbie
Newbie


Joined: 12 Jul 2008
Location: Egypt
Online Status: Offline
Posts: 8
Quote supermedo84 Replybullet Topic: sort control
     Posted: 04 Aug 2008 at 4:56am
i made report with sort control and host this report in asp application but sort control dont work

any help
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 04 Aug 2008 at 11:11am
Can you give more details about how you have the sort control setup/built?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
supermedo84
Newbie
Newbie


Joined: 12 Jul 2008
Location: Egypt
Online Status: Offline
Posts: 8
Quote supermedo84 Replybullet Posted: 06 Aug 2008 at 9:21am
i used
*crystal report 2008 to create my report "business object"
*using asp .net 2005 to create web application

*i used passing parameters to pass parameter to the report which has 4 parameters
 EmpID ,, ProID ,, StartDate,, EndDate


and make selection record depend in this parameters

i get the passed values to this parameters from combobox

    private void trythrid()
    {
        //Instantiate variables
        ReportDocument reportDocument = new ReportDocument();
        ParameterFields paramFields = new ParameterFields();

        //Set instances for input parameter 1 -  @ProID
        ParameterField paramField_ProID = new ParameterField();
        paramField_ProID.Name = "ProID";
        ParameterDiscreteValue paramDiscreteValue_ProID = new ParameterDiscreteValue();
        paramDiscreteValue_ProID.Value = ddl_ProName.SelectedItem.Value.ToString();
        paramField_ProID.CurrentValues.Add(paramDiscreteValue_ProID);
        paramFields.Add(paramField_ProID);

        //Set instances for input parameter 2 -  @EmpID
        ParameterField paramField_EmpID = new ParameterField();
        paramField_EmpID.Name = "EmpID";
        ParameterDiscreteValue paramDiscreteValue_EmpID = new ParameterDiscreteValue();
        paramDiscreteValue_EmpID.Value = ddl_Employee.SelectedItem.Value.ToString();
        paramField_EmpID.CurrentValues.Add(paramDiscreteValue_EmpID);
        paramFields.Add(paramField_EmpID);

        //Set instances for input parameter 3 -  @StartDate
        ParameterField paramField_StartDate = new ParameterField();
        paramField_StartDate.Name = "StartDate";
        paramField_StartDate.IsOptionalPrompt = true;
        ParameterDiscreteValue paramDiscreteValue_StartDate = new ParameterDiscreteValue();
        paramDiscreteValue_StartDate.Value = tbx_StartDate.Text;
        paramField_StartDate.CurrentValues.Add(paramDiscreteValue_StartDate);
        paramFields.Add(paramField_StartDate);

        //Set instances for input parameter 4 -  @EndDate
        ParameterField paramField_EndDate = new ParameterField();
        paramField_EndDate.Name = "EndDate";
        paramField_EndDate.IsOptionalPrompt = true;
        ParameterDiscreteValue paramDiscreteValue_EndDate = new ParameterDiscreteValue();
        paramDiscreteValue_EndDate.Value = tbx_EndDate.Text;
        paramField_EndDate.CurrentValues.Add(paramDiscreteValue_EndDate);
        paramFields.Add(paramField_EndDate);


        CrystalReportViewer1.ParameterFieldInfo = paramFields;
        reportDocument.Load(@"D:\MeDo0 Work\Syngnta_TimeSheet2.0\Code\LoggedTime.rpt");


        //set the database loggon information. **Note that the third parameter is the DSN name
        reportDocument.SetDatabaseLogon("sa", "123","mabdeen-xp-4981", "TimeSheetV2", false);
       
        //Load the report by setting the report source
        CrystalReportViewer1.ReportSource = reportDocument;
    }

the file loaded sucessfully with correct data but when i press sort control of crystal report no action happen

i don't know whyyyy and what the problem

note i created sort control by crystal report by right click on field and bind sort control and sort control work correctly in the report file
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum