Discuss creating a report print service based on WSE and its implementation
Source: Internet
Author: User
Summary:
I've seen Mr. Lu Yan. On the Web report printing implementation of the article, will certainly for the solution provided in the section applauded, this article tries to show you a more flexible print operation water, and has a certain practicality. It is recommended that you read the two articles of Mr. Lu Yan before reading this article, at the same time, the use of Microsoft's WSE (1.0) as an auxiliary tool, a strange friend, suggested that the first reference to a number of conceptual articles, I put in the end of the article a number of reference materials and the required tools, we can experience.
--------------------------------------------------------------------------------
Directory
Introduction
Software principle
Program implementation
Attention matters
Summarize
Resources
--------------------------------------------------------------------------------
Introduction:
WSE provides a very convenient feature, is to support the transmission of attachments, although we can use other ways to achieve this goal, such as direct return byte data, but for most applications, directly return an attachment, such as a picture more practical, please do not misunderstand my article title, To create a webservice can be easily achieved by printing, our software principles and the way the final print is not much different from what Mr. Lu Yan mentions, we just take advantage of the strong penetration of webservice to make this way more flexible, easier to apply and expand, All the code used in this article is written in C #.
--------------------------------------------------------------------------------
Software principle:
This article takes the form of XML data, the client will need to print the data and some basic parameters, such as image size, image form and so on to the server side, and the server side according to the requirements of the client to generate a specific one or more pictures returned to the client, by the client's print program unified processing, Looking at this logic, we can see that all the business rules are shipped entirely on the server side, and the client only needs a small amount of code to print the report. This avoids the annoyance of a variety of upgrades, and when it comes to adding one or more charts to the actual application, all we need to do is add or modify the server-side business rules, and all the customers have to do is tell us to print the chart.
This paper uses a number of simple XML data, only for demonstration purposes, the client's demo data are as follows:
<?xml version= "1.0" encoding= "Utf-8"?>
<root printtype= "line" width= "450" height= "" title= "Print Demo" >
<child text= "1" value= "color=" "Black" >
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service