Page 1 of 1

Disabling report preview options

Posted: Sun Oct 20, 2013 7:25 am
by HunterEC
Guys:

Is here a way to disable the export to PDF, Word, Excel and email options in a report preview. Thank you.

Re: Disabling report preview options

Posted: Sun Oct 20, 2013 11:56 am
by driessen
To my opinion, the only way to disable these options, is by changing the rpreview class yourself.

But why do want to disable them? These are very intereseting tools.

Re: Disabling report preview options

Posted: Sun Oct 20, 2013 12:48 pm
by nageswaragunupudi
Export to Word/PDF/Excel and email options allow an employee to take out information outside the office.
That could be a reason.

Re: Disabling report preview options

Posted: Mon Oct 21, 2013 12:58 am
by HunterEC
Driessen:

Rao hit the mark. Confidential info & HIPAA protected data are the reasons. Program should not encourage end users to disseminate confidential data. Thank you.

Re: Disabling report preview options

Posted: Mon Oct 21, 2013 1:38 am
by TecniSoftware
Yo creo que el preview deberia tener variables como lExportToPDF, lExportToExcel, lExportToWord, lSendMail, etc. y tambien poder definir la manera en que actúe en cada caso, definiendo como actuar en cada caso: bSaveAsExcel, bSaveAsPDF, bSaveAsWord, bSendMail, etc.
Asi no habria necesidad de tocar el codigo fuente.

Saludos


I think the preview class should have variables as lExportToPDF, lExportToExcel, lExportToWord, lSendMail, etc.. and also to define how to act in each case, with bSaveAsExcel, bSaveAsPDF, bSaveAsWord, bSendMail, etc..
So there would be no need to touch the source code.

Regards

Re: Disabling report preview options

Posted: Mon Oct 21, 2013 3:04 am
by Roger Seiler
Hunter -

I'm wrestling with HIPAA security issues also. Please email me to... roger at leadersoft dot com ... if you'd be interested in discussing approaches to HIPAA compliance.

Thanks,

- Roger

Re: Disabling report preview options

Posted: Mon Oct 21, 2013 4:12 am
by nageswaragunupudi
Right now we have these classdata bSaveAsExcel, bSaveAsPDF, bSaveAsWord, bMail (13.09).
Assigning dummy codeblocks ( eg { || nil | ) inhibit export of data. This is an immediate workaround without changing the source code.

But still the buttons are visible. I agree it is not elegant to display buttons which do not act.

I propose one class variable lCanExport ( default .t. ). When this is set to .f., all buttons for export to word/excel/pdf/mail will not be shown.

Invite comments.

I think we already know how to add additional user buttons with additional actions where needed.

Re: Disabling report preview options

Posted: Mon Oct 21, 2013 7:56 am
by elvira
Mr. Nages,

Maybe the solution could be to have a function where to define all parameters for rpreview():

WIndow style,
Menu style,
Button bar,
Options
etc

Thanks ;)

Re: Disabling report preview options

Posted: Mon Oct 21, 2013 2:25 pm
by cnavarro
nageswaragunupudi wrote:Right now we have these classdata bSaveAsExcel, bSaveAsPDF, bSaveAsWord, bMail (13.09).
Assigning dummy codeblocks ( eg { || nil | ) inhibit export of data. This is an immediate workaround without changing the source code.
++1
nageswaragunupudi wrote: But still the buttons are visible. I agree it is not elegant to display buttons which do not act.
I propose one class variable lCanExport ( default .t. ). When this is set to .f., all buttons for export to word/excel/pdf/mail will not be shown.
Maybe better just OBTN: Disable ()

And add DATA lBtnPdf, lBtnWord, etc, would be easier to configure
If we lCanExport: =. F., all lBtnPdf, lBtnWord, lBtnExcel, etc. are assigned. F.


Quizas mejor simplemente oBtn:Disable()

Y añadir DATA lBtnPdf, lBtnWord, etc, seria mas facil configurar
Si ponemos lCanExport := .F., todos los lBtnPdf, lBtnWord, lBtnExcel, etc se les asigna .F.

Re: Disabling report preview options

Posted: Wed Oct 23, 2013 3:58 am
by nageswaragunupudi
I am sorry for forgetting the features we created longtime back.

Adding this line of code at the beginning of the project or before any preview

Code: Select all

   RPrevUserBtns( { || .f. }, 2010,  )
will not show any of the buttons to export to word/pdf/excel.

I need to explain this function:
Syntax:

RPrevUserBtns( bUserButtons, nBarStyle, aBarBtnSize ) --> bPreviousUserButtons

1. bUserButtons:
If a codeblock is specified, this codeblock is evaluated with two parameters oPreview, oBar during creation of the ButtonBar of the Preview window.
In the user function, the user can add his own buttons and actions which appear after the "Print" button.

If this codeblock returns a logical value and if that logical value is FALSE, rpreview does not add its own buttons "Save", "PDF", "Email", "Word", "Excel" and continues with "End" button. Otherwise all these buttons are added.

2. nBarStyle: Numeric and valid values are 97, 2007, 2010. If specified, this style is used for creating the ButtonBar.

3. aBtnSize: Array of { nWidth, nHeight } of the buttonsize. If specified, rprevifew uses this size for buttonbar buttons.

For examples of how to use this functions, please see these postings:
http://forums.fivetechsupport.com/viewt ... end#p91155

http://forums.fivetechsupport.com/viewt ... tns#p92324

Disabling export buttons
http://forums.fivetechsupport.com/viewt ... ns#p115257