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

  • Home
  • SEARCH
  • 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 6251417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:36:39+00:00 2026-05-24T13:36:39+00:00

I have a form which I want the user to be able to export

  • 0

I have a form which I want the user to be able to export to a PDF/Print off, so I included a report viewer and have sent the values over as parameters.

All these have worked fine except for the ListBox which I’m running into problems with.

This ListBox has some possible number of items in it which I would like to send over to the report for display.

Currently have:

 List<string> passengersParameter = new List<string>();

 for ( int i = 0 ; i < moreForm.passengerListBox.Items.Count ; i++ )
 {
     passengersParameter.Add( moreForm.passengerListBox.Items[i].ToString() );
 }

 parameters.Add( new ReportParameter("passengerList", passengersParameter.ToArray()));

This displays the first entry of the list just fine when I have the parameter added on the report, however, when I set it to Text and select Allow Multiple Values the parameter just displays #Error

Is there something else I need to do in order for it to display all the values from the array? I’m at a loss.

  • 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-24T13:36:40+00:00Added an answer on May 24, 2026 at 1:36 pm

    Finally figured out how to get this to work.

    Apparently we can’t just pass a list into the report: we need to add a DataSet.

    So for my example above

    testData chaos = new testData();
    
    ...
    
    foreach ( Passenger victim in showMe.Passengers )
            {
                // msdn.microsoft.com/en-us/library/5ycd1034(v=VS.100).aspx
                DataRow skeez = chaos.Tables["Victims"].NewRow();
    
                skeez["Name"] = victim.ToString();
    
                chaos.Tables["Victims"].Rows.Add( skeez );
            }
    
            this.victimsBindingSource.DataSource = chaos.Tables["Victims"];
    

    Just make sure to add a DataSet to the report then set it programatically with your populated data (above).

    Then (if using VS 2010) make sure to choose the DataSource on the Report Viewer and also set the BindingSource (should automatically be generated by VS).

    Hopefully that helps you.

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

Sidebar

Related Questions

I have a form which I want to submit upon button click which is
I have a form which on submit I want to run a script via
I have a form which has only tab control in it. I want to
I have an application in which there is a form which I want to
I have the following rails form (which works) but I want to remove the
I have a TreeView in my form for which I dont want to have
I want to globalize my application. I have created a small form which asks
I have a cgi script which takes form input, I want to facilitate the
I have a form which takes both the user details and an image uploaded
I want to be able to customise the user registration form in Drupal 6

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.