8. customized reports based on the basic functions of the performaniseframework

Source: Internet
Author: User

This chapter describes the "Custom reports" in the framework. Similar to the "dictionary management" in the previous chapter, it is also composed of three functions, including configuring reports, authorizing reports by roles, and Viewing Reports;The core idea is to add a report without modifying program code or upgrading. You only need to write a stored procedure and design a report format to use it for the customer.Of course, this function is not omnipotent, and it cannot solve all the report requirements in the project, such as penetrating reports, reporting reports, and so on, and can only be done by your own code;

The content in this chapter is not about making a report, nor about a report tool. The framework does not contain report components. It is used by a third party,"Reportall" for Web and "Grid ++ Report" for winform"They are all lightweight domestic reports, but I personally think they are quite useful. They are more useful than foreign powerful tools such as Crystal Reports and are suitable for small and medium-sized projects;

By the way, let's talk about my understanding of the report in the project. my original idea for writing this series of articles is to share my achievements on the framework over the years, the second is my personal thoughts on some specific functions at work. Although it is not a high-end thing, I think it is still relatively grounded;

The report must be missing in a complete system. The customer may not have any requirements in the early stage of the project. When you are about to accept the report in the later stage, a bunch of tables will come;The most important thing about a report is data accuracy.In this regard, it really takes a lot of effort. Generally, it is not because there is a problem with the data entering the system, but the problem with the export statistics at most. You can think of this to ensure that the export paths are consistent, but you need to know who made the assurance; dozens or even hundreds of reports, which were prepared by Xiao Li, which was made several years ago. Which customer did this? The solution to this problem is to include a complete set of reports from these reports, which must cover all businesses, and the causal relationship between the data and the statistical sequence of the reports, it takes a lot of time and effort to analyze the entire model and maintain the model based on the customer's Position level. Therefore, we feel that the so-called management ideology in the system is, this accounts for a large part. an implementer can clearly explain the entire set of reports to the customer, and his implementation capability should also reach home;Report is the speed of statistics.Because the system has been used for a long time and the data volume is getting bigger and bigger, indexing cannot solve all the problems at this time. Our solution is to create a summary table and regularly transfer the historical data back-end to the summary table, all reports are generated from the summary table, while creating a summary table is a task that consumes brain cells. If it is too rough to do so, some reports will be merged. If it is too detailed, this summary table will be meaningless; severely test your ability to master and analyze your business;

This chapter focuses on the custom report function in the framework.

1) List of custom report functions

Module name

Function Name

Function Description

System reports

Report parameter configuration

Report category Directory, which can be added, modified, or deleted
Report Management,
1) Select a database stored procedure to add a report
2) generate a REPORT query control element based on database stored procedure parameters
3) generate a report file and design the report format
4) Enter query conditions to preview the Report Content

Report permission settings

Reports that can be operated by system roles

System Report Management

Displays reports that can be operated based on the user's logon role
REPORT query

 

2) custom report interface display

 

 

3) custom report core business flow chart and core table

 

 

4) key technical implementation of Custom reports

1. Test the report Stored Procedure

ALTER procedure [dbo].[sp_rpt_test](    @v_mouduleid        int = null,    @v_mouduleid1        int = null,@v_mouduleid2        int = null,@v_mouduleid3        int = null,@v_mouduleid4     int     OUTPUT)as    SELECT  * from basemenu where moduleid=@v_mouduleid

 

8. customized reports based on the basic functions of the performaniseframework

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.