Disabling report preview options

Post Reply
HunterEC
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Disabling report preview options

Post by HunterEC »

Guys:

Is here a way to disable the export to PDF, Word, Excel and email options in a report preview. Thank you.
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Disabling report preview options

Post 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.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Disabling report preview options

Post 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.
Regards

G. N. Rao.
Hyderabad, India
HunterEC
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Disabling report preview options

Post 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.
User avatar
TecniSoftware
Posts: 213
Joined: Fri Oct 28, 2005 6:29 pm
Location: Quilmes, Buenos Aires, Argentina

Re: Disabling report preview options

Post 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
Alejandro Cebolido
Buenos Aires, Argentina
User avatar
Roger Seiler
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA
Contact:

Re: Disabling report preview options

Post 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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Disabling report preview options

Post 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.
Regards

G. N. Rao.
Hyderabad, India
elvira
Posts: 462
Joined: Fri Jun 29, 2012 12:49 pm

Re: Disabling report preview options

Post 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 ;)
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Disabling report preview options

Post 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.
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Disabling report preview options

Post 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
Regards

G. N. Rao.
Hyderabad, India
Post Reply