Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Can I insert code to warn when...
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Can I insert code to warn when...
 Login/Join
 
Master
posted
We created a data mart (sql table) and accompanying master file. It is quite large (8M+ rows)

The user uses selection dropdowns to extract a portion of the data mart into an Excel spreadsheet output.

At times the user will simply select an unreasonable amount of rows for output..sometimes more than Excel can hold.

Is it possible, based on the number of rows returned by the fex, the throw out a message as to how many rows are returned or better yet if above some threshold we determine, to stop the report from being generated at all?

Something like:

Grab Selection
Execute report
if number of row returned > 200,000 Pop up a message.."Too much Data" otherwise open the report.

I figure after creating the report, I could create a second report consisten of a simple message and then imbed an IF/ELSE that determines which code to run...based on the number of rows returned...but how do I make a variable or something to capture: RowsReturned?

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.
Windows, All Outputs
 
Posts: 530 | Registered: June 28, 2013Reply With QuoteReport This Post
Guru
posted Hide Post
Have you tried a message based on &RECORDS when maxing out?


Sandy Kadish
Dev: 8.2.04- PostgreSQL
Test: 8.2.04 - PostgreSQL
Prod: 8.2.04 - PostgreSQL
 
Posts: 239 | Location: Orlando, FL / Baltimore, MD | Registered: May 06, 2003Reply With QuoteReport This Post
Virtuoso
posted Hide Post
You must pay attention to the variable taken to test the result. I think you should use &LINES instead of &RECORDS

&RECORSD will give you the number of record processed by the internal matrix depending on WHERE clause

&LINES will give you the number of record in the output result

See below sample
TABLE FILE CAR
SUM SEATS
BY COUNTRY
WHERE COUNTRY EQ 'ENGLAND' OR 'FRANCE';
ON TABLE HOLD
END
-RUN
-TYPE record: &RECORDS, lines: &LINES


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2105 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
Yes to Martin's 'Notice' as to pay attention to &RECORDS and &LINES.
You'll have to 'pre-process' your TABLE FILE to a HOLD FILE to check that value and follow that with a -IF &LINES.EVAL GT 123456 THEN GOTO :TooManyRecords ELSE GOTO :Continue;.

The -:TooManyRecords label / section will need a display message followed by -GOTO :TheEnd.

Or, something along those lines. I did that using a Reporting Object except that I had a WHERE statement that limited the output to 50000 records and set a &Message that was added to a Red Line in the HEADING.

It all depends on how far you want to go with this. The options are limited only by your imagination Smiler
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Master
posted Hide Post
ok, I'll give it a whirl...


WebFOCUS 8.
Windows, All Outputs
 
Posts: 530 | Registered: June 28, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Can I insert code to warn when...

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.