Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Print Second rpt if first rpt has 0 records

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Print Second rpt if first rpt has 0 records
 Login/Join
 
Gold member
posted
I'm trying to run a second report based on the first report that must have at least one record. I keep getting a blank page as output, I know the first report has records
Any ideas?? Thanks for any and all help


ENGINE SQLORA SET DEFAULT_CONNECTION prodmfg
SQL SQLORA PREPARE SQLOUT FOR
select th.reshot_id,
th.reshot_count as total_rs_cnt,
th.reshot_limit,
th.reshot_desc,
NVL(c.rd_emp_no, '0000') || '-' || NVL(rde.f_name, 'NOREADER') as reader_emp,
NVL(c.ch_emp_no, '0000') || '-' || NVL(che.f_name, 'NOEMPCHARGED') as charged_emp,
count(c.reshot_id) as emp_rs_cnt,
mr.file_no as film_file_no,
mr.workorderno
from xray.charge c,
xray.list_reshot rl,
xray.employee rde,
xray.employee che,
xray.master_record mr,
(select reshot_id,
reshot_count,
basic_threshold as reshot_limit,
reshot_Desc
from (select rs.reshot_id,
count(rs.reshot_id) as reshot_count,
lr.basic_threshold,
lr.reshot_desc
from xray.charge rs, xray.list_reshot lr
where lr.plant_number = '1'
and rs.reshot_id = lr.reshot_id
and rs.rd_emp_dept_code in ('648', '146')
and rs.charge_date >= sysdate - 10/24
group by rs.reshot_id, lr.basic_threshold, lr.reshot_desc
)
where reshot_count > basic_threshold
and basic_threshold <> 0) th
where c.reshot_id = th.reshot_id
and rl.plant_number = '1'
and c.rd_emp_no = rde.employeeno(+)
and c.ch_emp_no = che.employeeno(+)
and c.reshot_id = rl.reshot_id
and c.rd_emp_dept_code in ('648', '146')
and c.file_no = mr.file_no
and c.charge_date >= sysdate - 10/24
group by th.reshot_id,
NVL(c.rd_emp_no, '0000') || '-' || NVL(rde.f_name, 'NOREADER'),
NVL(c.ch_emp_no, '0000') || '-' || NVL(che.f_name, 'NOEMPCHARGED'),
mr.file_no,
mr.workorderno,
th.reshot_count,
th.reshot_limit,
th.reshot_desc;
END
TABLE FILE SQLOUT
PRINT
CNT.RESHOT_ID NOPRINT
END
-RUN
IF CNT.RESHOT_ID NE 0 GOTO SECRPT;
-EXIT
-SECRPT
SQL SQLORA PREPARE SQLOUT FOR
select th.reshot_id,
th.reshot_count as total_rs_cnt,
th.reshot_limit,
th.reshot_desc,
NVL(c.rd_emp_no, '0000') || '-' || NVL(rde.f_name, 'NOREADER') as reader_emp,
NVL(c.ch_emp_no, '0000') || '-' || NVL(che.f_name, 'NOEMPCHARGED') as charged_emp,
count(c.reshot_id) as emp_rs_cnt,
mr.file_no as film_file_no,
mr.workorderno
from xray.charge c,
xray.list_reshot rl,
xray.employee rde,
xray.employee che,
xray.master_record mr,

(select reshot_id,
reshot_count,
basic_threshold as reshot_limit,
reshot_Desc
from (select rs.reshot_id,
count(rs.reshot_id) as reshot_count,
lr.basic_threshold,
lr.reshot_desc
from xray.charge rs, xray.list_reshot lr
where lr.plant_number = '1'
and rs.reshot_id = lr.reshot_id
and rs.rd_emp_dept_code in ('648', '146')
and trunc(rs.charge_date) >= sysdate - 1
group by rs.reshot_id, lr.basic_threshold, lr.reshot_desc)
where reshot_count > basic_threshold
and basic_threshold <> 0) th
where c.reshot_id = th.reshot_id
and rl.plant_number = '1'
and c.rd_emp_no = rde.employeeno(+)
and c.ch_emp_no = che.employeeno(+)
and c.reshot_id = rl.reshot_id
and c.rd_emp_dept_code in ('648', '146')
and c.file_no = mr.file_no
and trunc(c.charge_date) >= sysdate - 1
group by th.reshot_id,
NVL(c.rd_emp_no, '0000') || '-' || NVL(rde.f_name, 'NOREADER'),
NVL(c.ch_emp_no, '0000') || '-' || NVL(che.f_name, 'NOEMPCHARGED'),
mr.file_no,
mr.workorderno,
th.reshot_count,
th.reshot_limit,
th.reshot_desc;
END
TABLE FILE SQLOUT
PRINT
RESHOT_ID
TOTAL_RS_CNT/D10
RESHOT_LIMIT/D10
RESHOT_DESC
READER_EMP
CHARGED_EMP
EMP_RS_CNT/D10
FILM_FILE_NO
WORKORDERNO
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
END

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.7.1
Windows 2000
Output: Excel and PDF
 
Posts: 82 | Registered: October 04, 2007Report This Post
Expert
posted Hide Post
The right way to check for no records in a report is to USe &LINES.

-RUN
-IF &LINES EQ 0 GOTO SECRPT;
-EXIT


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Thanks, I changed it as suggested and I get the same result..nothing


WebFOCUS 7.7.1
Windows 2000
Output: Excel and PDF
 
Posts: 82 | Registered: October 04, 2007Report This Post
Expert
posted Hide Post
HAve yupe set &ECHO=ALL, to see what value &LINES is ?

Can you post the code output ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Since your IF statement is a Dialogue Manager statement, it requires a dash in front:

-IF &LINES NE 0 GOTO SECRPT;


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Virtuoso
posted Hide Post
TABLE FILE SQLOUT
PRINT
CNT.RESHOT_ID NOPRINT
END
-RUN
IF CNT.RESHOT_ID NE 0 GOTO SECRPT;
-EXIT
-SECRPT
should be:
TABLE FILE SQLOUT
PRINT
CNT.RESHOT_ID NOPRINT
ON TABLE HOLD FORMAT ALPHA
END
-RUN
-IF &LINES NE 0 THEN GOTO SECRPT;
-EXIT
-SECRPT


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
Thanks..I now get a report, the report comes out in html format even though I specified excel and has page1, page2,page3 then data any ideas?


WebFOCUS 7.7.1
Windows 2000
Output: Excel and PDF
 
Posts: 82 | Registered: October 04, 2007Report This Post
Guru
posted Hide Post
I find it safer to use:

 
....

TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS INTERIM
END
TABLE FILE INTERIM
....
ON TABLE PCHOLD FORMAT EXL2K
END


I works better as a general rule to keep the TABLE FILE SQLOUT portion as generic as possible.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Print Second rpt if first rpt has 0 records

Copyright © 1996-2020 Information Builders