Disabling report preview options

Disabling report preview options

Postby HunterEC » Sun Oct 20, 2013 7:25 am

Guys:

Is here a way to disable the export to PDF, Word, Excel and email options in a report preview. Thank you.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Disabling report preview options

Postby driessen » Sun Oct 20, 2013 11:56 am

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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Disabling report preview options

Postby nageswaragunupudi » Sun Oct 20, 2013 12:48 pm

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

Re: Disabling report preview options

Postby HunterEC » Mon Oct 21, 2013 12:58 am

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.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Disabling report preview options

Postby TecniSoftware » Mon Oct 21, 2013 1:38 am

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

Re: Disabling report preview options

Postby Roger Seiler » Mon Oct 21, 2013 3:04 am

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
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA

Re: Disabling report preview options

Postby nageswaragunupudi » Mon Oct 21, 2013 4:12 am

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

Re: Disabling report preview options

Postby elvira » Mon Oct 21, 2013 7:56 am

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 ;)
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: Disabling report preview options

Postby cnavarro » Mon Oct 21, 2013 2:25 pm

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.
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6522
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Disabling report preview options

Postby nageswaragunupudi » Wed Oct 23, 2013 3:58 am

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  Expand view
  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:
viewtopic.php?f=3&t=17510&p=91155&hilit=ReportExtend#p91155

viewtopic.php?f=3&t=17677&p=92324&hilit=RPrevUserBtns#p92324

Disabling export buttons
viewtopic.php?f=3&t=21671&p=115257&hilit=RPrevUserBtns#p115257
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10481
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 26 guests