Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7
This is the forum to discuss the Wrox book Professional SQL ServerReporting Services by Paul Turley, Todd Bryant, James Counihan, George McKee, Dave DuVarney; ISBN: 9780764568787
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 13th, 2004, 11:03 PM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to yoclee Send a message via MSN to yoclee
Default Problem in Chapter 9

I have some problem in Chapter 9. When i want to get the parameter value from reporting service, an error occur as below:

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 190: textbox.Text = parameter.DefaultValues(0)


Below is my coding in aspx.vb
For Each parameter In parameters
            Dim label As New Label
            Dim textbox As New TextBox

            label.Text = parameter.Prompt

            textbox.ID = parameter.Name
            textbox.Text = parameter.DefaultValues(0)

            Me.Panel2.Controls.Add(label)
            Me.Panel2.Controls.Add(textbox)


Reporting service cannot get the parameter from the aspx. How can i solve this problem? thanks.



  #2 (permalink)  
Old July 23rd, 2004, 12:59 PM
Authorized User
 
Join Date: Jun 2004
Location: Peterborough, Ontario, Canada.
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had EXACTLY the same problem.

In my case it was because I did not assign a default value for that parameter (in the report) and I was therefor assigning the text to null (can't happen). I just wrapped it in a try catch and it worked fine.

Sandy Murdock MCP
  #3 (permalink)  
Old August 2nd, 2004, 11:10 AM
Registered User
Points: 40, Level: 1
Points: 40, Level: 1 Points: 40, Level: 1 Points: 40, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Cincinnati, , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I too have the same problem. I downloaded the code, and ran the project, it gave the same error.

Does anyone have a suggestion?

Thanks,
rwiethorn

rwiethorn
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Having a problem in chapter 2 Okie BOOK: Beginning Access 2003 VBA 1 August 9th, 2007 10:30 AM
Chapter 5 Problem gogeo BOOK: Beginning Access 2003 VBA 1 October 10th, 2005 10:34 AM
Problem in chapter 7 gpauta JSP Basics 1 June 1st, 2004 04:31 AM
problem in chapter 4 gpauta JSP Basics 3 May 11th, 2004 06:31 AM



All times are GMT -4. The time now is 01:27 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.