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?
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,
Windows, All Outputs
Have you tried a message based on &RECORDS when maxing out?
Dev: 8.2.04- PostgreSQL
Test: 8.2.04 - PostgreSQL
Prod: 8.2.04 - PostgreSQL
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 184.108.40.206M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
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
ok, I'll give it a whirl...
Windows, All Outputs
|Powered by Social Strata|