CN104657091B - Template data formats Method of printing in a kind of taxation control system - Google Patents

Template data formats Method of printing in a kind of taxation control system Download PDF

Info

Publication number
CN104657091B
CN104657091B CN201310589729.2A CN201310589729A CN104657091B CN 104657091 B CN104657091 B CN 104657091B CN 201310589729 A CN201310589729 A CN 201310589729A CN 104657091 B CN104657091 B CN 104657091B
Authority
CN
China
Prior art keywords
data
nominal value
printing
styles
value element
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310589729.2A
Other languages
Chinese (zh)
Other versions
CN104657091A (en
Inventor
宋颖
魏贺生
李少维
夏慧强
张巍
潘俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisino Corp
Original Assignee
Aisino Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aisino Corp filed Critical Aisino Corp
Priority to CN201310589729.2A priority Critical patent/CN104657091B/en
Publication of CN104657091A publication Critical patent/CN104657091A/en
Application granted granted Critical
Publication of CN104657091B publication Critical patent/CN104657091B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The invention discloses template datas in a kind of taxation control system to format Method of printing, the nominal value element especially shown with Data Styles to realize invoice nominal value element is printed in invoice formatting at par, the formatting Method of printing is that the nominal value element each shown with Data Styles binds a kind of data type and a formatting mask respectively, by the data type and formatting mask casting vote surface element of the binding in invoice display form at par.Data format Method of printing provided by the invention detaches print data with printing invoice template, reduce printing invoice stencil design and the complexity of modification, so that developer is without understanding the specific implementation that data are shown, only can printing easily need to be formatted to the nominal value element shown with Data Styles according to specified data type transfer data, reduce the error rate of data in print procedure.

Description

Template data formats Method of printing in a kind of taxation control system
Technical field
The present invention relates to a kind of data format Method of printings, in particular to template data in a kind of taxation control system Format Method of printing.
Background technology
Currently, in taxation control system, data need first to be formatted data when printing display on invoice make its at For character string, then print to again in invoice nominal value.In traditional data-printing solution, all data formatizations are equal It is shown again after being handled data by developer, since developer understands deficiency to invoice exemplary format, so as to cause Data hard coded is in a program so that error rate increases, and modification complexity is big.Therefore, mask data formatting component, realize by The display format of element determination data in invoice masterplate reduces the degree of coupling of data and mimeograph documents, reduces data format The complexity and error rate of process are the developing direction of data-printing.
Invention content
Template data formats Method of printing in a kind of taxation control system of present invention offer, to realize that invoice nominal value element is outstanding It is that the nominal value element shown with Data Styles is printed in invoice formatting at par.
In order to achieve the above objectives, the present invention provides template datas in a kind of taxation control system to format Method of printing, including Following steps:
A unique coding and a kind of Show Styles are bound respectively for all nominal value elements in printing invoice template, and By node text corresponding with each nominal value element in the coding of binding and display style information write-in printing template file;
All nominal value elements shown with Data Styles in printing invoice template are extracted, each to be shown with Data Styles Nominal value element bind a kind of data type and a formatting mask respectively, and by the data type of binding and format mask Node text corresponding with each nominal value element in printing template file is written in information, is shown with Data Styles according to each The binding of nominal value element coding organizing data files, wherein data file includes that the nominal value that each show with Data Styles is first The value of element itself and its coding of binding;
Printing template file is sent to print module, impression block template analytical function in the block reads printing template first All corresponding codings of nominal value element and Show Styles not shown with Data Styles for including in file, it is in the block by impression block All nominal value elements not shown with Data Styles are plotted in the corresponding position of invoice nominal value by printf;
Impression block template analytical function in the block reads the nominal value member each shown with Data Styles in printing template file The node text of element and coding, data type and the formatting mask for extracting its binding;
According to the coding ergodic data file of each nominal value element binding shown with Data Styles, obtain each with data The nominal value element value of itself that pattern is shown;
The data type of the nominal value element binding shown with Data Styles according to each is shown each with Data Styles The value of nominal value element itself forces the data type for being converted into binding;
The formatting mask of the nominal value element binding shown with Data Styles according to each, by it is each force after conversion with The corresponding value of nominal value element that Data Styles are shown is converted into specified string format;
Impression block format output function in the block parses the corresponding character string lattice of nominal value element each shown with Data Styles Formula, and parsing information is transferred to impression block printf in the block;
Printf according to the nominal value element each shown with Data Styles it is corresponding parsing information invoice nominal value pair It answers position to draw the nominal value element, has drawn the printing for completing invoice after all nominal value elements shown with Data Styles.
Optionally, in default situations, the data type of each nominal value element shown with Data Styles is character Serial type.
Optionally, the data type of nominal value element includes at least:Integer, single-precision floating point type, double-precision floating point type, date Time type, character string type.
Optionally, when the data type of pawn ticket surface element is not integer, single-precision floating point type, double-precision floating point type, date Between any one in type, character string type when, nominal value element is handled by text type.
Optionally, it formats mask to be string format and include a pair of { }, wherein interior to need to format in { } Hold.
Optionally, in formatting mask, C indicates that currency style, D indicate that 10 systems, N expressions comma divide thousand points Position, # indicate digital placeholder, and 0 indicates that 0 placeholder, Y indicate that year placeholder, M indicate that moon placeholder, D indicate day placeholder.
Optionally, it formatting mask and indicates non-character symbol using identifier and bit wide, wherein identifier is started with ' [', For two upper case characters, bit wide is two digits.
Optionally, when formatting mask not comprising non-character symbol, parsing information includes the drafting position of nominal value element With drafting format;When formatting mask comprising non-character symbol, parsing information includes the drafting position of nominal value element, draws lattice Formula, the occupy-place information of non-character symbol and drafting function.
Optionally, draw format include the length of drawing area, width, draw coordinate, draw the line style used and font, The occupy-place information of alignment thereof both horizontally and vertically, non-character symbol includes the starting drafting position of non-character symbol and accounts for According to bit wide.
Optionally, when some read is empty with the corresponding formatting mask of nominal value element that Data Styles are shown, It is not for further processing to the nominal value element.
Template data formats Method of printing by print data and printing invoice template in taxation control system provided by the invention Separation, reduce printing invoice stencil design and the complexity of modification so that developer without understand data show it is specific Realization method, it is only necessary to according to specified data type transfer data can easily to the nominal value element that is shown with Data Styles into Formatting lines print, and reduce the error rate of data in print procedure.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 formats the flow chart of Method of printing for template data in the taxation control system of one embodiment of the invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of not making the creative labor Embodiment shall fall within the protection scope of the present invention.
Fig. 1 formats the flow chart of Method of printing for template data in the taxation control system of one embodiment of the invention, such as schemes Shown, which includes the following steps:
S110:A unique coding and a kind of display sample are bound respectively for all nominal value elements in printing invoice template Formula, and node corresponding with each nominal value element in printing template file is written into the coding of binding and display style information Text;
Wherein, nominal value element according to its Show Styles can be divided into the nominal value element shown with Data Styles and not with data sample The nominal value element two major classes that formula is shown.Since the nominal value element shown with Data Styles is associated with specific data, therefore every It is both needed to be passed to specific numerical value when secondary printing;The nominal value element not shown with Data Styles is then with picture, straight line, word and choosing The patterns such as center are shown, not associated with specific data in print procedure, therefore in printing directly according to the aobvious of its setting Sample formula can be printed.In addition, being that there are one node texts for each nominal value Elemental partition in printing template file, to remember Record related with node information, the node text entry all properties of node.
S120:All nominal value elements shown with Data Styles in printing invoice template are extracted, for each with data sample The nominal value element that formula is shown binds a kind of data type and a formatting mask respectively, and by the data type and format of binding Change node text corresponding with each nominal value element in mask information write-in printing template file, according to each with data sample The coding organizing data files for the nominal value element binding that formula is shown, wherein data file includes each to be shown with Data Styles The value of nominal value element itself and its coding of binding;
Wherein, in default situations, the data type of the nominal value element each shown with Data Styles is character string type (String types), also the data type of the nominal value element shown with Data Styles can be bound integer(Int types), single precision it is floating Point-type(Float types), double-precision floating point type(Double types), date-time type(Datetime types)Or character string type(string Type), when the data type of the nominal value element shown with Data Styles is not that any of the above is a kind of, then by it by text type Reason.
In addition, the formatting mask of the nominal value element binding shown using Data Styles formats mask as string format Started with any character, any character ending, and include a pair of { }, to need the content formatted in { }, can also wrapped outside { } Containing other fixed characters, spcial character and non-character symbol(The symbol being not present in computer character code database).Wherein, exist It formats in mask, indicates that currency style, D indicate that 10 systems, N expressions comma divide thousand points of positions using C, # indicates that number accounts for Position symbol, 0 indicates that 0 placeholder, Y indicate that year placeholder, M indicate that moon placeholder, D indicate day placeholder.It formats non-in mask Character symbols is indicated using identifier and bit wide, wherein identifier is started with ' [', is two upper case characters, bit wide is double figures Word.
Such as:" { ########0.00 } ", " { ########0.00 } dollar ", " { ########0.00 } $ " can be used as Format mask, wherein " # " indicates that placeholder, " 0 " indicate that necessary placeholder, " " indicate decimal point.When formatting in mask Including when non-character symbol such as hexagonal snowflake symbol, it can be indicated using such as " [AA02] ", formatting mask at this time can be: "{########0.00}[AA02]".Wherein " AA " indicates that hexagonal snowflake symbol, " 02 " indicate that the bit wide of hexagonal snowflake symbol is The space that two bytes namely hexagonal snowflake symbol occupy is identical as the space that a Chinese character occupies.
S130:Printing template file is sent to print module, impression block template analytical function in the block is read first to be beaten All corresponding codings of nominal value element and Show Styles not shown with Data Styles for including in die plate file, by impression block All nominal value elements not shown with Data Styles are plotted in the corresponding position of invoice nominal value by printf in the block;
Wherein, without reading data file when the nominal value element that printing is not shown with Data Styles, according to its corresponding section The nominal value attribute of an element of point text entry can complete the printing of corresponding element in the corresponding position of invoice nominal value.
S140:Impression block template analytical function in the block reads the ticket each shown with Data Styles in printing template file The node text of surface element and coding, data type and the formatting mask for extracting its binding;
It wherein, can be from data text by the coding bound in the node text of each nominal value element shown with Data Styles The value of corresponding nominal value element is obtained in part;The number bound in node text by each nominal value element shown with Data Styles It can convert the corresponding value pressure of each nominal value element to specified data type according to type;It is shown with Data Styles by each Nominal value element node text in the formatting mask bound further each nominal value element after conversion will can be forced to correspond to Value be converted into formatting and print required data.
S150:According to the coding ergodic data file of each nominal value element binding shown with Data Styles, obtain each The nominal value element value of itself shown with Data Styles;
S160:It, will be each with Data Styles according to the data type of each nominal value element binding shown with Data Styles The value of the nominal value element of display itself forces the data type for being converted into binding;
S170:According to the formatting mask of each nominal value element binding shown with Data Styles, will each force to convert The corresponding value of nominal value element shown with Data Styles afterwards is converted into specified string format;
Wherein, when some read is empty with the corresponding formatting mask of nominal value element that Data Styles are shown, no It is for further processing to the nominal value element.
For example, when data a1=123 in data file, the data type of binding is double types, when formatting mask Respectively " { ########0.00 } ", " { ########0.00 } dollar ", " { ########0.00 } $ ", " { ######## When 0.00 } [AA02] ", string format after conversion be respectively " 123.00 ", " 123.00 dollars ", " 123.00 $ ", “123.00[AA02]”。
S180:Impression block format output function in the block parses the corresponding character of nominal value element each shown with Data Styles String format, and parsing information is transferred to impression block printf in the block;
Wherein, when format mask do not include non-character symbol when, parsing information include nominal value element drafting position and Draw format;When formatting mask comprising non-character symbol, parsing information includes the drafting position of nominal value element, draws lattice Formula, the occupy-place information of non-character symbol and drafting function.Wherein, the length, width, drafting that format includes drawing area are drawn Coordinate draws the information such as the line style used and font, alignment thereof both horizontally and vertically, the occupy-place information of non-character symbol The bit wide that starting including non-character symbol is drawn position and occupied.
For example, when it is " { ########0.00 } [AA02] " to format mask, when format output function parses " [AA02] " " AA " and " 02 " two parts are split into, hexagonal snowflake symbol corresponding with " AA " is obtained by being searched in print module Drafting function draw ();Then " 02 " is converted to numerical value 2, the meaning of this numerical value 2 is the hexagonal snowflake to be drawn symbol Number occupy two bytes, that is, the size of a Chinese character;
S190:Printf is according to the corresponding parsing information of the nominal value element each shown with Data Styles in invoice nominal value Corresponding position draw the nominal value element, drawn and completed beating for invoice after all nominal value elements shown with Data Styles Print.
Wherein, when formatting mask comprising non-character symbol, printf is first drawn to be transformed by formatting mask The part for not including non-character symbol, and according to parsing information in non-character symbol occupy-place information in the corresponding of print area Position reserve certain white space in case printing non-character symbol, when not include non-character symbol part complete after, Printf is that the drafting function draw () in parsing information is called to draw non-character symbol in above-mentioned reserved white space, When it includes several different non-character symbols to format mask, not due to each corresponding drafting function of non-character symbol Together, the drafting of nominal value element can be completed by needing repeatedly to call different drafting functions just at this time.
Template data formats Method of printing by print data and printing invoice template in taxation control system provided by the invention Separation, reduce printing invoice stencil design and the complexity of modification so that developer without understand data show it is specific Realization method, it is only necessary to according to specified data type transfer data can easily to the nominal value element that is shown with Data Styles into Formatting lines print, and reduce the error rate of data in print procedure.
One of ordinary skill in the art will appreciate that:Attached drawing is the schematic diagram of one embodiment, module in attached drawing or Flow is not necessarily implemented necessary to the present invention.
One of ordinary skill in the art will appreciate that:The module in device in embodiment can describe to divide according to embodiment It is distributed in the device of embodiment, respective change can also be carried out and be located in one or more devices different from the present embodiment.On The module for stating embodiment can be merged into a module, can also be further split into multiple submodule.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, it will be understood by those of ordinary skill in the art that:It still may be used To modify to the technical solution recorded in previous embodiment or equivalent replacement of some of the technical features;And These modifications or replacements, the spirit and model of technical solution of the embodiment of the present invention that it does not separate the essence of the corresponding technical solution It encloses.

Claims (7)

1. template data formats Method of printing in a kind of taxation control system, which is characterized in that include the following steps:
A unique coding and a kind of Show Styles are bound respectively for all nominal value elements in printing invoice template, and will be tied up Node text corresponding with each nominal value element in fixed coding and display style information write-in printing template file;
All nominal value elements shown with Data Styles in the printing invoice template are extracted, are each described with Data Styles The nominal value element of display binds a kind of data type and a formatting mask respectively, and by the data type of binding and formatting Node text corresponding with each nominal value element in the printing template file is written in mask information, according to each with data The coding organizing data files for the nominal value element binding that pattern is shown, wherein the data file includes each with Data Styles The value of the nominal value element of display itself and its coding of binding;
The printing template file is sent to print module, described in the impression block template analytical function in the block is read first All corresponding codings of nominal value element and Show Styles not shown with Data Styles for including in printing template file, by described All nominal value elements not shown with Data Styles are plotted in the corresponding position of invoice nominal value by impression block printf in the block;
The impression block template analytical function in the block reads the ticket each shown with Data Styles in the printing template file The node text of surface element and coding, data type and the formatting mask for extracting its binding;
According to the coding ergodic data file of each nominal value element binding shown with Data Styles, obtain each with Data Styles The nominal value element of the display value of itself;
According to the data type of each nominal value element binding shown with Data Styles, by each nominal value shown with Data Styles The value of element itself forces the data type for being converted into binding;
The formatting mask of the nominal value element binding shown with Data Styles according to each, by it is each force after conversion with data The corresponding value of nominal value element that pattern is shown is converted into specified string format;
The impression block format output function in the block parses the corresponding character string lattice of nominal value element each shown with Data Styles Formula, and parsing information is transferred to impression block printf in the block;
Printf is according to the corresponding parsing information of the nominal value element each shown with Data Styles in the correspondence position of invoice nominal value It sets and draws the nominal value element, has drawn the i.e. printing of completion invoice after all nominal value elements shown with Data Styles,
Wherein, the formatting mask is string format and includes a pair of { }, wherein to need the content formatted in { },
The formatting mask indicates non-character symbol using identifier and bit wide, wherein identifier is started with ' [', is two Upper case character, bit wide are two digits,
When formatting mask not comprising non-character symbol, the parsing information includes drafting position and the drafting lattice of nominal value element Formula;When format mask include non-character symbol when, it is described parsing information include nominal value element drafting position, draw format, The occupy-place information and drafting function of non-character symbol.
2. template data formats Method of printing in taxation control system according to claim 1, which is characterized in that in acquiescence feelings Under condition, the data type of each nominal value element shown with Data Styles is character string type.
3. template data formats Method of printing in taxation control system according to claim 1, which is characterized in that the data Type includes at least:Integer, single-precision floating point type, double-precision floating point type, date-time type, character string type.
4. template data formats Method of printing in taxation control system according to claim 3, which is characterized in that pawn ticket face element The data type of element is not any one in integer, single-precision floating point type, double-precision floating point type, date-time type, character string type When kind, nominal value element is handled by text type.
5. template data formats Method of printing in taxation control system according to claim 1, which is characterized in that the format Change in mask, C indicates that currency style, D indicate that 10 systems, N expressions comma divide thousand points of positions, and # indicates digital placeholder, 0 table Show that 0 placeholder, Y indicate that year placeholder, M indicate that moon placeholder, D indicate day placeholder.
6. template data formats Method of printing in taxation control system according to claim 1, which is characterized in that the drafting Format includes the length of drawing area, width, draws coordinate, draws the line style used and font, pair both horizontally and vertically The occupy-place information of neat mode, the non-character symbol includes the bit wide for originating drafting position and occupy of non-character symbol.
7. template data formats Method of printing in taxation control system according to claim 1, which is characterized in that when reading Some nominal value element corresponding formatting mask shown with Data Styles when being empty, further place is not made to the nominal value element Reason.
CN201310589729.2A 2013-11-20 2013-11-20 Template data formats Method of printing in a kind of taxation control system Active CN104657091B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310589729.2A CN104657091B (en) 2013-11-20 2013-11-20 Template data formats Method of printing in a kind of taxation control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310589729.2A CN104657091B (en) 2013-11-20 2013-11-20 Template data formats Method of printing in a kind of taxation control system

Publications (2)

Publication Number Publication Date
CN104657091A CN104657091A (en) 2015-05-27
CN104657091B true CN104657091B (en) 2018-11-13

Family

ID=53248288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310589729.2A Active CN104657091B (en) 2013-11-20 2013-11-20 Template data formats Method of printing in a kind of taxation control system

Country Status (1)

Country Link
CN (1) CN104657091B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843575A (en) * 2016-03-23 2016-08-10 百度在线网络技术(北京)有限公司 Information display method, device and system
CN110210455B (en) * 2019-06-18 2022-03-01 石家庄捷弘科技有限公司 Printing content formatting extraction method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101174350A (en) * 2007-11-15 2008-05-07 北大方正集团有限公司 Bill processing equipment and method
CN102156741A (en) * 2011-04-16 2011-08-17 武钢集团昆明钢铁股份有限公司 Custom dynamic report system and implementation method thereof
CN102830947A (en) * 2012-08-13 2012-12-19 南京莱斯信息技术股份有限公司 Report printing control implemented based on report printing template format
CN102866985A (en) * 2012-09-28 2013-01-09 用友软件股份有限公司 Data formatting device and method for on-line analytical processing system
CN103116500A (en) * 2013-03-11 2013-05-22 北京首钢自动化信息技术有限公司 Method and device for structural body definition and structure output

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7733509B2 (en) * 2001-09-26 2010-06-08 Infoprint Solutions Company, Llc Method and apparatus for printing XML directly using a formatting template

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101174350A (en) * 2007-11-15 2008-05-07 北大方正集团有限公司 Bill processing equipment and method
CN102156741A (en) * 2011-04-16 2011-08-17 武钢集团昆明钢铁股份有限公司 Custom dynamic report system and implementation method thereof
CN102830947A (en) * 2012-08-13 2012-12-19 南京莱斯信息技术股份有限公司 Report printing control implemented based on report printing template format
CN102866985A (en) * 2012-09-28 2013-01-09 用友软件股份有限公司 Data formatting device and method for on-line analytical processing system
CN103116500A (en) * 2013-03-11 2013-05-22 北京首钢自动化信息技术有限公司 Method and device for structural body definition and structure output

Also Published As

Publication number Publication date
CN104657091A (en) 2015-05-27

Similar Documents

Publication Publication Date Title
CN100565601C (en) A kind of bill processing apparatus and method
Reid Scribe: A document specification language and its compiler
CN108052491A (en) A kind of automatic processing method and device of certificate document
CN109857670B (en) Test report automatic generation method based on universal template
WO2020149501A1 (en) System and method for braille conversion for electronic document
EP1730653B1 (en) Systems and methods for identifying complex text in a presentation data stream
CN109977088A (en) A kind of method that preset format file is converted to OFD format
CN105607880A (en) Printing method and device for examined and approved documents
CN104657091B (en) Template data formats Method of printing in a kind of taxation control system
US6869238B2 (en) Printing control program, printing control system, and printing control method
KR102126342B1 (en) Electronic document braille translation system and a method therefor
US20100147960A1 (en) Methods, devices, and systems for printing bar codes
CN102467490B (en) Font data processing method and device
CN107015959A (en) A kind of method that version is closed to pdf document
CN102685347A (en) Image processing apparatus and image processing method
CN112380826B (en) Formatting electronic form generating method based on text file
EP0119295B1 (en) Justifying with printer level data stream which accommodates footers and headers
CN111797596A (en) Method and device for compressing and decompressing extensible markup language (XML) document
CN110288601A (en) Braille book printing quality automatic inspection system, method and computer-readable medium
CN101346715B (en) Method and apparatus of processing the markup documents
Pandey Proposal to Encode North Indic Number Forms in ISO/IEC 10646
Pandey Proposal to Encode Indic Siyaq Numbers in Unicode
Pandey Proposal to Encode the Sharada Script in ISO/IEC 10646
CN115185486B (en) Method, apparatus and storage medium for generating ASIC fabric declarations
Orr Text Preparation and Transmission for Word Processing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant