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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:46:09+00:00 2026-05-20T04:46:09+00:00

I have the following c# code in a web form: protected void GridView1_SelectedIndexChanged(object sender,

  • 0

I have the following c# code in a web form:

protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string url;
            string startdate;
            string enddate;
            string costcenter;
            string account;

            //url = "http://server/reportserver?/Finance/Cost Spending/Cost Center Details&rs:Command=Render&rc:Parameters=false";
            url = "http://server/reportserver?/Finance/Cost Spending/Cost Center Totals&rs:Command=Render&rc:Parameters=false";
            costcenter = "&costcenter=990";

            startdate="&startdate=" + Convert.ToString(txtStartDate.Text);
            enddate = "&enddate=" + Convert.ToString(txtEndDate.Text);

            account="&account=" + Convert.ToString(GridView1.SelectedRow.Cells[1].Text);

            url =url + startdate + enddate + costcenter + account;


            //TextBox1.Text = Convert.ToString(GridView1.SelectedRow.Cells[1].Text);
                Response.Redirect(url, false);

        }

I’ve tested a very similer version of this code against another report, the only different being the costcenter parameter. The other report worked fine, but every time i run this code i get the error: “the ‘costcenter’ parameter is missing a value”. The only thing i can think of that’s significantly different between the two reports is that in the Cost Center Totals report the costcenter parameter is used to populate the accounts parameter (both are multi-select).

Here’s what the parameters page looks like:
parameters

  • 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-05-20T04:46:10+00:00Added an answer on May 20, 2026 at 4:46 am

    Ok, I figured out the issue thanks to Alison’s poke at the parameters/data sets. What was happening was I had 4 parameters, start date, end date, cost center, and accounts. In the report the account data set relies on the cost center parameters to populate the drop down list. I created a copy of the report, removed the cost center parameter, and removed the data set from the account parameter. I updated the code and ran it and BAM! It worked.

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

Sidebar

Related Questions

I have following code for updating user's column public void UpdateLastModifiedDate(string username) { using
I am a PHP newb. I have the following code for a web form.
Let's say I have following ASP.NET Web Form engine code, how can I express
I Have following code with LINQ var q = (from web in DataContext.Webs select
I have the following code: public partial class queryTerm : System.Web.UI.UserControl { private static
I have the following code: SPList list = web.Lists[this.ListName]; SPListItem item = list.Items.Add(); now
I have the following piece of code in my web page. After the method
I have an ASP.NET web site with something similar to the following code: .aspx
I am writing code to performance test a web site. I have the following
I have seen a web page source code containing the following css declaration at

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.