Scheduling Reports With .NET
By Efrem Litwin
In recent years, an increasing number of companies has been turning to Microsoft .NET as the development environment of choice for developing customized applications. .NET works with Visual Basic, C#, C++, and J# as its supported programming languages with functionality for creating and consuming Web
Services.
This development environment’s appeal to companies is that it is conducive for creating and deploying applications quickly and efficiently. It can integrate other applications through the use of its built-in Web Services consumption utility and has the ability to create Web Services so that other .NET or Java™
applications can reuse the functionality.
In the September 2003 issue of the WebFOCUS Newsletter ("WebFOCUS Web Services: How They Work"), I explained how WebFOCUS reports can be run from a .NET application through the use of WebFOCUS Web Services. The
application passes the appropriate parameters to the Web Service functions and WebFOCUS returns the output to the application. It is then up to the application to decide how to display the output. WebFOCUS Web Services is a great way for companies to create their own applications with a look and feel that their user
community recognizes. A home-grown portal is another use of WebFOCUS Web Services.
Now what if a company would like to develop an application giving the user the ability to either run the WebFOCUS report immediately or schedule it to run later? The report then could be distributed by e-mail or to the Report Library. How would this be accomplished?
Well, our tool for scheduling and distributing WebFOCUS reports is called ReportCaster. It has its own Web-based front end to create schedules and view reports stored in the Report Library. The .NET application would need Web Services as the method of interaction with ReportCaster. With the release of WebFOCUS 5.3,
ReportCaster Web Services have been added as an extension to the ReportCaster product. Customers who have licensed the WebFOCUS Web Services Enablement Option can use Web Services within their .NET or Java applications to schedule WebFOCUS reports. The scheduling of a WebFOCUS report is only one of more than 70
functions available through ReportCaster Web Services.
As with WebFOCUS Web Services, each ReportCaster Web Service function has parameters that it expects as input and returns defined output. When using the ReportCaster scheduling function, some of the input needed would be schedule description, task type information such as application name and report
name, distribution type information such as e-mail information or Report Library information, and time type information such as "run once, weekly, monthly, or yearly."
Screen 1 shows an example of an application developed in Visual Basic .NET in which the parameters for the schedule function are being gathered in a .NET Form. Car54 is being scheduled to run weekly at 8:00 PM on Fridays and have its output distributed by e-mail.

Screen 1
There are a total of seven ReportCaster Web Services. Each Web Service contains a variety of functions pertaining to specific functionality within ReportCaster. The Authentication Web Service has one function for authenticating a user to ReportCaster. The function returns a security token, which is used in every
subsequent ReportCaster Web Service function call. The Address Book Web Service has various functions for maintaining and retrieving e-mail distribution lists. The Report Library Web Service has various functions for maintaining and retrieving Report Library content.
The Console Web Service has various functions for getting a list of jobs that are running or in the ReportCaster job queue. An administrator could use functions for changing the job priority and removing jobs from the queue. The Log Web Service has various functions for maintaining and retrieving the ReportCaster
Log files. The User Web Service has various functions for maintaining and retrieving ReportCaster Users and Groups.
The Schedule Web Service, which probably would be used most of the time, has various functions for maintaining, retrieving and running ReportCaster schedules. Screen 2 shows an example of an application developed in Visual Basic .NET in which the information for the Car54 Schedule is displayed in an ActiveX Browser.

Screen 2
For a .NET application to be able to interact with another application via Web Services, the Web Service Description Language File (WSDL) for the Web Service would have to be consumed. This would mean that .NET would read the WSDL file and create all the code needed for calling the various Web Service functions. To
view the Web Service Description Language (WSDL) file for each of the ReportCaster Web Services, go to http://ReportCasterport/rcaster/services.
All of the ReportCaster functions are fully documented with Visual Basic .NET and Java examples for each function. The documentation can be downloaded from www.informationbuilders.com.
Java and all Java-based marks are trademarks of Sun Microsystems, Inc. in the U.S. and other countries.

|