1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to connection crystal report in c# 2010

Discussion in 'C#' started by HKen, May 22, 2012.

  1. HKen

    HKen New Member

    Joined:
    May 18, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    1.how to connection crystal report in c# 2010?
    2.How to pass parameters to pass parameters to Crystal Reports?
    3.How to batch to pass parameters and not the preview mode ?

    thanks
     
  2. pein87

    pein87 New Member

    Joined:
    Aug 6, 2010
    Messages:
    173
    Likes Received:
    47
    Trophy Points:
    0
    Occupation:
    Web Dev
    Location:
    Limbo
    You need to download crystal reports separately and install it. I've never used it before but I do know its not included and needs to be downloaded. Once you do it will show as a template when you create a new project.
     
  3. Sirkrna

    Sirkrna New Member

    Joined:
    Aug 20, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    programmer
    Home Page:
    connection crystal report in c# 2010, if it can help you:
    Code:
    string Etype;
    string checkBox;
    
    CrystalDecisions.Shared.ParameterDiscreteValue objParameterDiscreteValue = new 
    CrystalDecisions.Shared.ParameterDiscreteValue();
    CrystalDecisions.Shared.ParameterField objParameterField = new 
    CrystalDecisions.Shared.ParameterField();
    CrystalDecisions.Shared.ParameterFields objParameterFields = new 
    CrystalDecisions.Shared.ParameterFields();
    
    public EquipmentReportTypeByType(string eType, string CheckBox)
            {
                InitializeComponent();
                Etype = eType;
                checkBox = CheckBox;
                if (checkBox == "Type By Type")
                {
                   crystalReportViewer1.ReportSource = new ReportTypeByType();
                    objParameterDiscreteValue.Value = Etype´╝Ť
                    objParameterField.ParameterFieldName = "@EType";
                    objParameterField.CurrentValues.Add(objParameterDiscreteValue);
                    objParameterFields.Add(objParameterField);
                    crystalReportViewer1.ParameterFieldInfo = objParameterFields;
                    crystalReportViewer1.Show();
                }
    
            }
    
     

Share This Page