FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Disabling report preview options
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Disabling report preview options
Posted: Sun Oct 20, 2013 07:25 AM

Guys:

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

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Disabling report preview options
Posted: 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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Disabling report preview options
Posted: 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
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: Disabling report preview options
Posted: 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.

Posts: 244
Joined: Fri Oct 28, 2005 06:29 PM
Re: Disabling report preview options
Posted: Mon Oct 21, 2013 01: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
Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
Re: Disabling report preview options
Posted: Mon Oct 21, 2013 03: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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Disabling report preview options
Posted: Mon Oct 21, 2013 04: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
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: Disabling report preview options
Posted: Mon Oct 21, 2013 07: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 ;)

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Disabling report preview options
Posted: Mon Oct 21, 2013 02: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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Disabling report preview options
Posted: Wed Oct 23, 2013 03: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 (fw): Select all Collapse
   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

Continue the discussion