FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Disable the Export to Excel button in the preview report
Posts: 107
Joined: Tue Sep 15, 2009 07:52 AM

Disable the Export to Excel button in the preview report

Posted: Fri Sep 20, 2013 11:59 AM
Most (I think almost all) of my reports are done using the class Tprinter like this:

Code (fw): Select all Collapse
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 (fw): Select all Collapse
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)?
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

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

Posted: 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

Continue the discussion