Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7755241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:31:09+00:00 2026-06-01T12:31:09+00:00

I have to prepare a report which is getting some fields data from conf

  • 0

I have to prepare a report which is getting some fields data from conf file and show related data on report.

I prepare a conf file and i can read it’s data with C# but i can not compare them with ms sql’s data. To sum up, i want to show my own sql query’s result with Crystal Reports and i want to get Where statement’s values from a conf file.

Is there any document or something like that? I can not find an effictive document.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:31:10+00:00Added an answer on June 1, 2026 at 12:31 pm

    I would build the Crystal report with parameters then use those in the record selection expert. You can read the app.config values using ConfigurationManager.AppSettings["parameter_name"].ToString() then pop them into the crystal parameters using:

    using System;
    using System.Windows.Forms;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    
    namespace WindowsApplication1
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                ReportDocument cryRpt = new ReportDocument();
                cryRpt.Load("PUT CRYSTAL REPORT PATH HERE\CrystalReport1.rpt");
    
                ParameterFieldDefinitions crParameterFieldDefinitions ;
                ParameterFieldDefinition crParameterFieldDefinition ;
                ParameterValues crParameterValues = new ParameterValues();
                ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
    
                crParameterDiscreteValue.Value = textBox1.Text;
                crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields;
                crParameterFieldDefinition = crParameterFieldDefinitions["Customername"];
                crParameterValues = crParameterFieldDefinition.CurrentValues;
    
                crParameterValues.Clear();
                crParameterValues.Add(crParameterDiscreteValue);
                crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
    
                crystalReportViewer1.ReportSource = cryRpt;
                crystalReportViewer1.Refresh(); 
    
            }
        }
    }
    

    Taken from: http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-string-parameter.htm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this query and I have an error: images = Image.find_by_sql('PREPARE stmt FROM
I have this partial code: if ($getRecords = $con->prepare(SELECT * FROM AUCTIONS WHERE ARTICLE_NO
Does anyone know how to prepare data to plot a CDF (I have a
I have a question. I have to prepare a good report module for an
I have a data frame with a number of infections identified from clinical isolates
I have a simple question about sending a file (XML file) from my webapp
I have created a report in MS Access report and write some VBA code
If I'd switch from Sun JDK to OpenJDK which surprises do I have to
I have simple query that loads data from two tables into GUI. I'm saving
I have a SqlCommand that I want to call Prepare() on whose CommandType =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.