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 7718147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:05:38+00:00 2026-06-01T03:05:38+00:00

This was working correctly in Visual Studio 2008, but since I have switch to

  • 0

This was working correctly in Visual Studio 2008, but since I have switch to Visual Studio 2010 and Crystal Reports for Visual Studio 2010, my passed parameters are ignored.

They display in the report, just ignored when it comes to the selection formula! Here is my code for creating the report and passing the parameters.

 private void Prepare()
    {
        var reportDocument = new ReportDocument();

        string reportPath = string.Format(
            "{0}\\{1}",
            Globals.FormPath,
            this.FormTemplate.Filename);

        reportDocument.Load(reportPath);

        ParameterDiscreteValue parameter;

        foreach (var control in this.FormTemplateFieldControls)
        {
            switch (control.FormTemplateField.DataType)
            {
                case FormFieldDataType.Date:
                    this.AddParameterForDateTime(
                        reportDocument,
                        control.FormTemplateField.Name,
                        (DateTime)control.EditValue);
                    break;
                case FormFieldDataType.DateTime:
                    this.AddParameterForDateTime(
                        reportDocument,
                        control.FormTemplateField.Name,
                        (DateTime)control.EditValue);
                    break;
                case FormFieldDataType.Time:
                    this.AddParameterForDateTime(
                        reportDocument,
                        control.FormTemplateField.Name,
                        (DateTime)control.EditValue);
                    break;
                case FormFieldDataType.Guid:
                    this.AddParameterForGuid(
                        reportDocument,
                        control.FormTemplateField.Name,
                        (Guid)control.EditValue);
                    break;
                default:
                    this.AddParameterForString(
                        reportDocument,
                        control.FormTemplateField.Name,
                        control.EditValue.ToString());
                    break;
            }
        }

        this.SetConnectionInfo(reportDocument);

        var frm = new FormViewer();

        frm.Report = reportDocument;

        frm.ShowDialog();

        frm.Dispose();

        this.Close();
    }

When I run the report from the designer it works just fine. You can see the parameters are being passed as I am displaying them in my report.

alt text

For my reports that run from stored procedures the parameters seem to pass just fine, it’s just the ones composed of all tables.

For what it’s worth, here is my selection formula:

 {employee.HireDate} >= {?StartDate} And {employee.HireDate} <= {?EndDate}
  • 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-01T03:05:40+00:00Added an answer on June 1, 2026 at 3:05 am

    This has been resolved with the latest version of Crystal Reports for Visual Studio 2010.

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

Sidebar

Related Questions

Using Visual Studio 2010 I believe it's working correctly, as in after any document
Since our switch from Visual Studio 6 to Visual Studio 2008, we've been using
I have this button which is not working correctly for hold button for a
I currently have this working but it requires me to have a static method
I am using C# and Visual Studio 2008. I have a class that will
ASP.net C# 3.5 Framework, working in Visual Studio 2008 currently. What I want is
I'm using Visual Studio 2008 Pro. I'm probably missing something very obvious here, but
I'm currently working on an ASP.NET application, and I have downloaded the Visual Studio
Scenario : I have an ASP.NET MVC application developed in Visual Studio 2008. There
I'm working on a Visual Studio Add-in for Visual Studio 2008 that display a

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.