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 June 22nd, 2004, 02:29 PM
Authorized User
 
Join Date: Jun 2004
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 8, Report Scripting, Code errors

I was unclear on some of the instructions for writing the console app in chapter 8 so I downloaded the code and tried to use it.

I get errors, for example:
ReportServer.CatalogItem

is not defined.

All references to Report Server.[what ever] get the same 'is not defined' error.

Is there a problem in the code or have I done something wrong in creating the actual application?

Sandy Murdock MCP
__________________
Sandy Murdock MCP
 
Old June 22nd, 2004, 09:13 PM
Authorized User
 
Join Date: May 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sandy,
You have to create the proxy class that points to the Reporting Server Web Service. This is done by right clicking on the "References" portion of the solution in Solution Explorer and Selecting "Add Web Reference". Choose the Reporting server web service and Add a reference. That should solve your problem.

Thanks,
Todd Bryant

 
Old June 23rd, 2004, 08:35 AM
Authorized User
 
Join Date: Jun 2004
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried to add the web reference but got an error saying I already had a reference to that same service. I replaced the old with a new one and tried to compile.

I still get the same error.

Sandy Murdock MCP
 
Old June 23rd, 2004, 10:55 AM
Authorized User
 
Join Date: May 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You might need to add a "using" statement for C#, or an "imports" statement to the top of the file to bring the object into scope.

When you add the reference, it asks you for a name. The default name for the reference to a local site is "localhost". If you used the default, you will need to add one of the following lines.

using localhost; //C#
Imports localhost 'VB

That will bring the object into scope so that your code will compile. I believe that the instructions probably gave you a name to use such as "ReportingService" or something like that. What ever you used, you will need to modify the directive appropriately.
 
Old June 23rd, 2004, 11:31 AM
Authorized User
 
Join Date: Jun 2004
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

GOT IT!

You were on target except I couldn't do an imports. You got me with the 'name' of the localhost service.

I could either make sure that I named the thing properly (which I guess I did not) or (what I actually did 'cause it's the hard way) where the program had ReportServer. replace it with localhost.

Thank you!

Sandy Murdock MCP
 
Old June 23rd, 2004, 11:50 AM
Authorized User
 
Join Date: May 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you click on the show all files button at the top, and look at your "web references" you can actually right click on the Reference and rename it.

Just for future reference....Pun intended.



Todd Bryant
MCSD,MCDBA,MCSE,MCT





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 10 code errors in the book GranDad BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 January 26th, 2007 12:25 AM
Chapter 4 Example Code Errors beckerm13 BOOK: Professional Ajax ISBN: 978-0-471-77778-6 3 September 28th, 2006 03:40 PM
Errors in Code; Chapter 14, pages 566-567 ou812 BOOK: Beginning ASP 3.0 10 June 20th, 2004 09:43 AM
Scripting Syntax Errors, please help Matt6sic6 Javascript 5 June 1st, 2004 12:22 AM





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