Wrox Programmer Forums

Need to download code?

View our list of code downloads.

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

You are currently viewing the BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 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 Search this Thread Display Modes
  #1 (permalink)  
Old August 14th, 2006, 09:56 AM
Registered User
 
Join Date: Aug 2006
Location: manchester, , United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 12 - Rendering Through Windows

I'm still struggling to get this code sample to work. I've downloaded code from the site in both C# and VB.Net and neither work. Does any body know if this code should work with SQL Server 2005 Express Advanced Edition or should I be using the developer edition at the very least? The application builds without errors and works until the Get Parameters button is clicked. I was hoping to utilise this code in a project where all reports have default values so I need to be able to determine these values. The line in red in the code example below is the point at which the execution fails.

Thanks

Mike

        Private Sub btnParameters_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnParameters.Click
            'return the list of parameters for the report item
            Dim reportItem As ReportItem = CType(cboReports.SelectedItem, ReportItem)

            Dim parameters() As ReportParameter
            parameters = _rs.GetReportParameters(reportItem.Path, Nothing, False, Nothing, Nothing)

            'add the parameters to the parameter list UI
            Dim left As Integer = 10
            Dim top As Integer = 20
            Dim parameter As ReportParameter
            For Each parameter In parameters
                Dim label As New Label
                Dim textBox As New TextBox

                label.Text = parameter.Prompt
                label.Left = left
                label.Top = top

                textBox.Name = parameter.Name
                textBox.Text = parameter.DefaultValues(0)
                textBox.Left = left + 150
                textBox.Top = top
                top += 25

                grpParamInfo.Controls.Add(label)
                grpParamInfo.Controls.Add(textBox)
            Next parameter
        End Sub

Mike
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM
Chapter 12 - Rendering Through Windows mjoc69 Reporting Services 0 August 8th, 2006 03:25 AM
Chapter 12 - Rendering Through Windows mjoc69 BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 0 August 8th, 2006 03:21 AM
Errors on Chapter 12 example(12.8) sonnie ASP.NET 2.0 Professional 2 June 7th, 2006 10:55 AM
Programmatic Rendering - Chapter 9 booksnore2 BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 July 7th, 2004 07:36 PM



All times are GMT -4. The time now is 03:34 AM.


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