![]() |
Generating Simple Report![]() ![]() ![]() ![]() ![]()
The idea of a report starts with the premise that you have lots of data, but the data is not in a readily usable form. You want to print out the data in a nice format so that you can actually use the information. Suppose that you have a database of inventory for a computer store). Each month, you may want to print out a list of items on sale. A typical list might be formatted as follows :
Organizing data in text files To print reports you need a source of data. Before showing you have to generate formatted reports, this section focuses on data storage in text files. You can store a lot of useful information in an organized format in a plain text file. One common way to organize information is to present it in a tabular form. You can store the sample inventory information by using this approach of separating the fields with a special character. If you were to use the vertical bar ( I ) as a separator, the text file containing the inventory information might have the following appearance : 9702101 1166 MHz Pentium, 16 MB/2. 1 GB 1 1795.50 9702103 1166 MHz Pentium MMX, 32 MB/3.2GB 12375.95 This file can serve as the inventory database, with each line containing the information about a specific item. When you write Perl programs to work with such data files, you can use the split function to separate out the fields contained in each line if text. For example if Vine contains a line of data and the fields separator is the vertical bar, you car obtain the array of fields with the following line of code @fields = split (/ \ I / , $ line) ;
|
||||||||||
PERL Perl Program Data Types Types of Variables Operator Types Functions String Functions Array Functions Expressions Statement Blocks The if Statement Unless Statement While Loops Until Loop For Loop Foreach Loop Jump Keywords Subroutines Perl References Die Function Exit Function Localtime Function Standard Files File Test Operators File Functions Opening Files Reading into Hash Printing Revisited Globbing Splitting a Record into Fields Perl's Special Variables Regular Expression Simple True-False Searches Inexact Matches in Regular Expressions Matching Any Character Characters with Class Special Locations Quantifiers Greedy Matching Modifiers Localtime Function Subsituations Letter for Letter Translations Generating A Simple Report Defining a Report Template Specifying the Picture Line Specifying the Argument Line Adding a Header Writing the ReportDomain Names Home Importance of a domain name How does a web domain name work? Domain name syntax Choosing a domain name Domain Transfer Domain Parking IP AddressWeb Design HTML DHTML XML JAVASCRIPT VBSCRIPT PHOTOSHOPWeb Hosting Web Server Web Server Software Microsoft Internet Information Server Web hosting ISP Shared web hosting Virtual web hosting Dedicated web hosting Web hosting colocation Managed web hostingE Commerce Principles of E-Commerce E-Banking Electronic Payment System E-Security Credit Cards Smart Cards
The Mailbox POP Server SMTP Server IMAP Protocol |
| Home | Web Hosting | Web Design | Sitemap |
| Copyright (C) 2007. Web Domain design hosting. All rights reserved. |