At 05:43 PM 9/24/2008, Javier Valencia wrote:

I have a confidential report that it is called from many locations
within an application. Rather than add code to check if the user
has the permission to generate the report before the report is
started, I would like to place the code in the report itself
(Before generate). Is there a way to stop the report with code
from the "before generate" EEP? I have tried CLOSEWINDOW but it
does nothing and the report continues to execute...any ideas?


At 06:21 PM 9/24/2008, Claudine Robbins wrote:

Looks like you need a PROPERTY REPORTNAME 'ABORT'


Claudine,

You must have some inside scoop on this particular enhancement
implemented in R:BASE eXtreme (version 9.0), to be officially
unveiled at the 10th Anniversary R:BASE Developers' Conference.

http://www.rbase.com/conference/  (October 17 - 20, 2008)

This conditional PROPERTY to generate and/or abort the actual
report may be used as "Before Generate" action for reports.

Syntax: PROPERTY REPORT reportname 'ABORT'

Example 01:

-- Start here ..
-- "Before Generate" Action for Reports
-- Supported Version: R:BASE eXtreme 9.0.1.11017 or higher
-- Validate User Access
   CLEAR VAR vPassword,vCaption,vEndkey
   SET VAR vPassword TEXT = NULL
   SET VAR vCaption TEXT = 'Print Payroll Master Report'
   SET VAR vEndKey TEXT = NULL
LABEL GetPassword
   CLS
   DIALOG 'Enter Password to Print Payroll Master Report' +
   vPassword=28 vEndKey PASSWORD +
   CAPTION .vCaption +
   ICON APP +
   OPTION TITLE_FONT_COLOR BLACK +
   |BUTTON_OK_CAPTION &Accept +
   |BUTTON_CANCEL_CAPTION &Cancel +
   |THEMENAME WaterColor
IF vEndKey = '[Esc]' THEN
   GOTO GetPassword
ENDIF
IF vPassword IS NULL OR vPassword <> 'xxxxxxxxxx' THEN
   PAUSE 2 USING ' Invalid or Missing Password!' +
   CAPTION .vCaption ICON STOP +
   BUTTON 'Click here to enter password again ...' +
   OPTION MESSAGE_FONT_NAME Verdana +
   |MESSAGE_FONT_COLOR RED +
   |MESSAGE_FONT_SIZE 10 +
   |MESSAGE_FONT_BOLD OFF +
   |BUTTON_COLOR WHITE +
   |BUTTON_FONT_COLOR GREEN +
   |THEMENAME WaterColor
   PROPERTY REPORT ConfidentialPayrollMaster 'ABORT'
ENDIF
LABEL Done
CLEAR VAR RBTI_%,iv%,vPassword,vCaption,vEndkey
RETURN
-- End here ..

Very Best R:egards,

Razzak.


Reply via email to