IDC billing system report (2)

Source: Internet
Author: User
2. Compared with the previous excel files, I think the report is a bit the same. The general idea is as follows: first define. (Report: DimWithevents object variable As class name is used to load events of this class. After Withevents, you can see the events of this class in the code editing window (if any ). Because the class is not like a control, double-click Control

2. Compared with the previous excel files, I think the report is a bit the same. The general idea is as follows: first define. (Report: The Dim Withevents object variable As class name is used to load events of this class. After Withevents, you can see the events of this class in the code editing window (if any ). Because the class is not like a control, double-click Control

Ii. Code
Compared with the previous excel, I think the report is a bit the same. The general idea is as follows:
First.
(Report: Dim Withevents object variable As Class Name

This method is used to load events of this class. After Withevents, you can see the events of this class in the code editing window (if any ).

Unlike controls, double-click controls to edit events.

Note the following constraints when using the WithEvents variable:

WithEvents variables cannot be derived object variables. That is to say, it cannot be declared As an As Object-the class name must be specified when the variable is declared.
The WithEvents variable cannot be declared As New. You must explicitly create an event source object and assign it to the WithEvents variable .)
Instantiate the report and open the report location.
Link the data source. (Because the data source has been connected to the report, the program can still run normally after I comment this sentence. Write address in excel)
Query the table and display the table content.

Let's take a look at the code below:

'Definition
    Dim WithEvents report As grproLibCtl.GridppReport                   
'Load a New report Set report = New grproLibCtl. gridppreport' load the report template file report. loadFromFile (App. path & "\ daily report. grf ") 'set data connection string' report. detailGrid. recordset. connectionString = ConnectString ': the data source is connected to the report. Txtsql = "select * from checkday_Info where date = '" & Date & "'" report. detailGrid. recordset. querySQL = txtsql 'execute 'to display the report content grddayBill. report = report grddayBill. the 'start' report Template has four date or time values: report. parameterByName ("Date1 "). value = Format (Date, "yyyy-MM-dd") report. parameterByName ("Datetime "). value = Now report. parameterByName ("username "). value = UserName

Iii. Summary

Therefore, it is not too difficult to clarify the principles and ideas of many new things.

I am very grateful to Yang Chen for the two blogs.

Settlement and report of the data room Charging System (3) VB and report code "one school will be a dumb version"

Bill settlement and report of the data room Charging System (2) weekly report making the "One School will be a dumb version"

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.