Wrox Programmer Forums
|
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 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 August 14th, 2006, 09:56 AM
Registered User
 
Join Date: Aug 2006
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





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





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