Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

XML Publisher skills

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

More

Personal classification: Form development

There are two ways to write a layout language, one is the XSL statement, and the other is the XMLP simple statement. I personally recommend using the former, because it is an international standard. In addition, these two grammars can be mixed, such as conditional formatting rows and cells above.

You can only write XMLP simple statements directly in RTF; in the form domain, you can do both.

Window fields are not allowed in standard headers and footers, but can be used in extended headers and footers.

If multiple headers and footers are required in the template, use the following markup to indicate the body of the report

……

Nested template

Because window fields are not allowed in headers and footers, you can consider using nested templates when you want to insert XML data in the report header and footer.

A nested template defines a subtemplate in the template and then invokes it where needed, such as in the header and footer.

1. Define subtemplate

Any tag and content can be used between subtemplate tags, which is no different from the body of the template

……

two。 Call subtemplate

Either of the following statements is fine:

Div for Computational Division in XML

For example:

XML Publisher supports the column function in Word, which enables the report output to be printed in a multi-column manner.

The following is the multi-column print effect of the address book

Paging (paging by group)

Paging is natural, but if you want to force paging somewhere like a new group of pages, you can use the Word page break (CTRL+ENTER shortcut key), but it will result in a blank page.

You can use the following ways:

1. Add @ section to the group declaration, such as

2. Before (in different E) add. After this translation, it is actually:

< xsl:if test="position() < xsl:value-of select="$start"/>

Sort

Ascending / descending order: ascending / descending

Data type: text / number / date

Note the case of the above string, the syntax here is case-sensitive.

There can be multiple sort fields; written in the same E between for-each and end for-each or in different E.

Number and date formatting

Digital formatting

XML Publisher supports two ways of formatting numbers:

The numeric format mask of Word itself

Format-number function of Oracle

Date formatting

XML Publisher supports three date formatting methods

Date format mask of Word itself

Format-date function of Oracle

Abstract date format mask syntax for Oracle

Abstract date format mask list

Mask

US output instance

SHORT

2-31-99

MEDIUM

Dec 31, 1999

LONG

Friday, December 31, 1999

SHORT_TIME

12-31-99 6:15 PM

MEDIUM_TIME

Dec 31, 1999 6:15 PM

LONG_TIME

Friday, December 31, 1999 6:15 PM

SHORT_TIME_TZ

12-31-99 6:15 PM GMT

MEDIUM_TIME_TZ

Dec 31, 1999 6:15 PM GMT

LONG_TIME_TZ

Friday, December 31, 1999 6:15 PM GMT

Matrix report (can also be searched in guide: split-column-data)

XML data:

< RESULTS>

< INDUSTRY>

Motor Vehicle Dealers

< YEAR>

2005

< QUARTER>

Q1

< SALES>

one thousand

< /RESULTS>

< RESULTS>

< INDUSTRY>

Motor Vehicle Dealers

< YEAR>

2005

< QUARTER>

Q2

< SALES>

2000

< /RESULTS>

< RESULTS>

< INDUSTRY>

Motor Vehicle Dealers

< YEAR>

2004

< QUARTER>

Q1

< SALES>

3000

< /RESULTS>

< RESULTS>

< INDUSTRY>

Motor Vehicle Dealers

< YEAR>

2004

< QUARTER>

Q2

< SALES>

3000

< /RESULTS>

< RESULTS>

< INDUSTRY>

Motor Vehicle Dealers

< YEAR>

2003

...

< /RRESULTS>

< RESULTS>

< INDUSTRY>

Home Furnishings

...

< /RESULTS>

< RESULTS>

< INDUSTRY>

Electronics

...

< /RESULTS>

< RESULTS>

< INDUSTRY>

Food and Beverage

...

< /RESULTS>

< /ROWSET>

The desired result:

INDUSTRY200520042003Motor Vehicle Dealers300060001200Home Furnishings320077703300Electronics900090004300Food and Beverage12009001600

Template structure:

INDUSTRY header columnfor year endfor INDUSTRYfor sum (sales) end

Among them: header column

For:

< ?for-each-group@column:RESULTS;YEAR ?>

YEAR

End

For:

INDUSTRY

For:

< ?for-each-group@cell:currentgroup();YEAR ?>

Sum (Sales)

End

SQL and XML

SQL Statement

Usage

Description

2. 3.

Add

2-3

Minus

2. 3.

Multiply

2/3

Except

2. 3.

Index

2 | | 3

Connect

Lpad ('aaa',10,'.')

Left fill

Rpad ('aaa',10,'.')

Right fill

Decode ('xx','bb','cc','xx','dd')

Decode judgment function

Instr ('abcab','a',2)

Instr to find the substring location

Substr ('abcdefg'), 2pr 3)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report