Home  >  Article  >  Database  >  oracle pl/sql 本地打印html报表

oracle pl/sql 本地打印html报表

WBOY
WBOYOriginal
2016-06-07 14:54:441501browse

将打印到output的过长一行句子,自动截断成几行,用来打印本地报表: from http://hgworkhouse.org PL/SQL 报表打印 Oracle Procedure my_output(p_text in varchar2) is p_sum_length number := 0; p_length number := 200; p_index number := 1; p_time numb

将打印到output的过长一行句子,自动截断成几行,用来打印本地报表: from http://hgworkhouse.org PL/SQL 报表打印 Oracle
Procedure my_output(p_text in varchar2) is
    p_sum_length number := 0;
    p_length     number := 200;
    p_index      number := 1;
    p_time       number := 0;
  begin
    select length(p_text) into p_sum_length from dual;
    p_time := ceil(p_sum_length / p_length);

    for i in 1 .. p_time loop
      dbms_output.put_line(substr(p_text, p_index, p_length));
      p_index := p_index + p_length;
    end loop;
  end my_output;
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn