How to display Crystal Report

Discussion in 'ASP .Net Datagrid Control' started by Kamal Ahmed, Jul 2, 2005.

  1. Kamal Ahmed

    Kamal Ahmed Guest

    Hi all,
    I dont know how to display a parameterized Crystal report in Asp.Net page...
    e.g. I give input of Student Code range and then click on View to display
    Crystal Report.

    Could anyonw help me ??
     
    Kamal Ahmed, Jul 2, 2005
    #1
    1. Advertising

  2. Kamal Ahmed

    Elton Wang Guest

    Hi Kamal,



    Following code snippet demonstrates how to add a parameter to CR and to show
    the report in ReportViewer



    CrystalDecisions.CrystalReports.Engine.ReportDocument report = new
    CrystalDecisions.CrystalReports.Engine.ReportDocument();
    report.Load(report_name);
    CrystalDecisions.Shared.ParameterValues rptValues = new
    CrystalDecisions.Shared.ParameterValues();
    CrystalDecisions.Shared.ParameterDiscreteValue rptValue = new
    CrystalDecisions.Shared.ParameterDiscreteValue();
    rptValue.Value = Parameter_Value;
    rptValues.Add(rptValue);
    report.DataDefinition.ParameterFields[0].ApplyCurrentValues(rptValues);
    //***
    // Set report logon info or data source
    //***
    CRViewer.ReportSource = report;
    CRViewer.RefreshReport();

    HTH

    Elton Wang


    "Kamal Ahmed" <> wrote in message
    news:...
    > Hi all,
    > I dont know how to display a parameterized Crystal report in Asp.Net

    page...
    > e.g. I give input of Student Code range and then click on View to display
    > Crystal Report.
    >
    > Could anyonw help me ??
    >
    >
     
    Elton Wang, Jul 5, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Wallace
    Replies:
    0
    Views:
    1,060
    James Wallace
    Oct 17, 2003
  2. =?Utf-8?B?SmFpZ2FuZXNo?=

    Reading report content using Crystal Report Viewer XI

    =?Utf-8?B?SmFpZ2FuZXNo?=, Jan 4, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    1,190
    =?Utf-8?B?SmFpZ2FuZXNo?=
    Jan 4, 2006
  3. Learner
    Replies:
    1
    Views:
    1,124
    Richard Dudley
    Jan 11, 2006
  4. =?Utf-8?B?QmVu?=

    Crystal Report - No data on report

    =?Utf-8?B?QmVu?=, Apr 5, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    2,197
    =?Utf-8?B?QmVu?=
    Apr 5, 2006
  5. Comfort
    Replies:
    0
    Views:
    557
    Comfort
    Oct 18, 2004
Loading...

Share This Page