Disable the Export to Excel button in the preview report

Disable the Export to Excel button in the preview report

Postby ellano » Fri Sep 20, 2013 11:59 am

Most (I think almost all) of my reports are done using the class Tprinter like this:

Code: Select all  Expand view
PRINT oReport NAME "This is your report" PREVIEW
DEFINE FONT oFont NAME "COURIER" SIZE 0,-6 OF oReport  //Courier,6
DEFINE PEN oPen WIDTH 1 OF oReport
nColmns:=oReport:nHorzRes()/264  && 200 columns
nRows:=oReport:nVertRes()/66  && 66 rows
PAGE

Nothing strange up to here, just until I do:

Code: Select all  Expand view
oReport:ENDPAGE()
ENDPRINT
PrnPortrait()
oFont:END()
oPen:END()

The user gets a beautiful preview screen (no DLL here, thank you FiveWin team) with nice little buttons which the user begins to click one by one (the chicken effect I guess) until it gets to the “Export to Excel” button in which the user gets an ugly cryptic message saying “Export to Excel is available only for Reports with ::bInit defined”.
The concrete question is How can I get rid of this message or at least change it to something like “Option not available” (in the language of my choice)?
ellano
 
Posts: 107
Joined: Tue Sep 15, 2009 7:52 am

Re: Disable the Export to Excel button in the preview report

Postby nageswaragunupudi » Fri Sep 20, 2013 12:21 pm

Mr Antonio may consider modification of rpreview.prg based on what most users like. Your suggestion is one.

I agree that the present message is an information to the programmer but not to the user. Users may not even understand the message. ( I am sorry to admit that i wrote the message there )

I personally feel that when excel export is not possible, displaying exel button and then saying it is not possible/avaiable would only confuse the users. Better might be to display excel button only in case where the export is possible.

Depending on what our programmer friends feel in general, rpreview.prg can be modified.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
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 46 guests