danilobtos Posted August 4, 2022 Share Posted August 4, 2022 Hello everybody...How to make repetition counter? I will pass a parameter or variable with the number of times the report should be printed. And in the report layout, you must inform the total number of times and the current number of printing. Example: p_CURRENT = 0. p_TOTAL = 5. The p_ATUAL "/" p_TOTAL should appear in the report. on the first 01/05 , on the second 02/05 and so on until the fifth and last 05/05. Link to comment Share on other sites More sharing options...
jgust Posted August 5, 2022 Share Posted August 5, 2022 There is no built-in functionality for this.I would always attempt to see if the database can produce the correct records. In Oracle, I would update the query and use "CONNECT BY LEVEL" to force data duplication. This will allow the report to be dumb and print the results.In the example below I used 7 as the :force_cnt.SELECT SUBSTR(TO_CHAR('0' || ROW_NUMBER() OVER (ORDER BY 'jane doe')), -2, 2) || '/' || SUBSTR('0' || TO_CHAR(:force_cnt), -2, 2) AS rn , 'jane doe' AS student_name , TO_DATE('03-AUG-1999', 'DD-MON-YYYY') AS birthdateFROM dualCONNECT BY LEVEL <= :force_cnt;[/code]RNSTUDENT_NAMEBIRTHDATE01/07jane doe03-AUG-199902/07jane doe03-AUG-199903/07jane doe03-AUG-199904/07jane doe03-AUG-199905/07jane doe03-AUG-199906/07jane doe03-AUG-199907/07jane doe03-AUG-1999 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now