Home > database >  PB paging display data
PB paging display data

Time:09-22

Leadership to realize data paging display, displayed per page 30 rows of data, the first page 1-30 lines, points the next page shows that 30 to 60 lines of data, could you tell me how to achieve superior? As far as possible the detailed oh, just started soon, many take care oh, this program to determine whether or not I work will become a full member, so we try to help, thank you very much!

CodePudding user response:

I think, two ideas, you can try to see not

1. Every time I return to 30 rows, this to use SQL statements to implement, essentially a top, a combination of oracle rownum implementation, a combination of the SQL statement writing, you can search pages, and many examples of web language paging, open look, don't look at the web statements, seek the inside of the SQL statement, a lot of, one of the http://hi.baidu.com/156544632/blog/item/10c982b4966c91778ad4b25e.html

2. Direct retrieve () out all of the data, and then the filter (), use this method to data window inside the SQL statement to add a column, such as oracle database can add rownum as seq (essentially a I don't know), the row is another serial number, after you first retrieve can use setfilter (" seq & lt;=30 ") and then the filter and the second can use setfilter (seq & gt; "" 30 and seq & lt;=60 "), then the filter (), it is ok to construct an expression for the future oneself

Hope useful to you, don't understand the use of pb function F1, other can surf the Internet query directly

CodePudding user response:

If you use PB11, make a B/S, it's too easy to implement, to support data window itself, as long as one set at compile time shows the number of rows per page for 30 can

If you want to should be attached to the leadership, suggest you all data retrieved (add a null columns alias row_num) as a select statement, and then set the row_num with a loop lines,
Reoccupy setfilter setting conditions to show the display of data, such as display page 5, can setfilter (" row_num & gt; 150 and row_num & lt; Can be
=180 ")
If you really do good things, you need to retrieve data as required, oracle can fulfill your requirements with rownum

If want to return before 5 records:
Select * from tablename where rownum<6; (or rownum & lt;=5 or rownum!
=6)
If want to return to 5-9 record:

Select * from tablename
The where...
And rownum<10
Minus
Select * from tablename
The where...
And rownum<5
The order by name

Choose the results with the name after the show as a result, (first choose again)

Note: can only use the above symbol (& lt; , & lt;=,!=),

Select * from tablename where rownum!=10; Returns the first nine records,
Can't use: & gt; , & gt;==, Between... And, because the rownum is a pseudo column is always starting from 1, Oracle don't think this kind of condition, less than records.

In addition, this method is faster:

Select * from (
Select rownum r, from a yourtable
Where rownum & lt;=20
The order by name)
Where r & gt; 10
So take out 11-20 of records! (first to choose again sorted again)

The number of rows in the query results in the oracle database using the pseudo column ROWNUM said (starting at 1), but the ROWNUM is after query sort assignment before, so the query the employee birthday by 100-120 records should be wrote:
Java code
Select * from (

The select my_table. *, rownum as my_rownum from (

Select the name, birthday from the employee order by birthday

) my_table where rownum & lt; 120

) where my_rownum & gt;=100

Select * from (

The select my_table. *, rownum as my_rownum from (

Select the name, birthday from the employee order by birthday

) my_table where rownum & lt; 120

) where my_rownum & gt;=100
In addition to record the number of pages algorithm should be:

Page=(rowCounts + pageSize - 1)/pageSize.

You can refer to
http://hi.baidu.com/aztack/blog/item/d842686079012a40ebf8f8f9.html

http://rdc.taobao.com/blog/dba/html/67_oracle_fenye.html

CodePudding user response:

A. make the Datawindow each page shows a fixed line
- the first step: add a computed column, the computed column must be in the Detail section, the input Expression: between (getrow ()/30) & lt; - 30 can also use the global function to replace here, so we can allow the user to any set print how many rows per page,

- step 2: define grouping, select menu Rows - & gt; The Create Group...

Group, according to the calculated column fields, and certainly will check box - & gt; New Page On Group Break selected,

- the third step: will the computed columns set as invisible,

CodePudding user response:

refer to the original poster swj915 posts:
led to realize data paging display, 30 rows of data displayed per page, first page 1-30 lines, points the next page shows that 30 to 60 lines of data, could you tell me how to achieve superior? As far as possible the detailed oh, just started soon, many take care oh, this program to determine whether or not I work will become a full member, so we try to help, thank you very much!

Question supplement: I use pb9.0, ASA database, thanks for your help!

CodePudding user response:

Do a data window can directly show 20 lines, each page can be paged

CodePudding user response:

Learning

CodePudding user response:

Everyone say so many, you can't please flexible asa database, if really didn't have the control field, good control in pb

CodePudding user response:

As high as 3 buildings, ask advice

CodePudding user response:

Answer is not to door 3 buildings, a scroll bar will discover

CodePudding user response:

Ha ha, a scroll bar will discover

CodePudding user response:


You see clear requirements of the building Lord
First page 1-30 lines, points the next page displaying 30 to 60 lines

The corresponding use
Dw_1. ScrollPriorPage ()
Dw_1. ScrollNextPage ()
Implement page

Don't use the scroll bar

CodePudding user response:

11 references newease response:
you see clear requirements of the building Lord
First page 1-30 lines, points the next page displaying 30 to 60 lines

The corresponding use
Dw_1. ScrollPriorPage ()
Dw_1. ScrollNextPage ()
Implement page

Don't use the scroll bar


I also want to do paging display, but didn't do it, this sentence is added where dw_1. ScrollPriorPage ()
I look at the others do is add button control in the data list, the data window on the window, and then enter the relevant code in the form, but I didn't do it,,

CodePudding user response:

In addition to the custom button data window button has its inherent event and the code does not need to write code


Two lines of code below is two buttons in the window of the code

Dw_1. ScrollPriorPage ()//back
Dw_1. ScrollNextPage ()//next page

CodePudding user response:

reference 13 floor newease reply:
in addition to the custom button button has its inherent within the data window events don't need to write code and code


Two lines of code below is two buttons in the window of the code

Dw_1. ScrollPriorPage ()//back
Dw_1. ScrollNextPage ()//next page


This function is directly used for paging?? The number of records per page how to set??
consult

CodePudding user response:

On the third floor rightnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related