Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 13th, 2004, 11:03 PM
Registered User
 
Join Date: Jul 2004
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.



 
Old July 23rd, 2004, 12:59 PM
Authorized User
 
Join Date: Jun 2004
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
 
Old August 2nd, 2004, 11:10 AM
Registered User
 
Join Date: Jan 2004
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





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.