Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing Problem with reports
Message
 
 
À
08/08/2001 12:54:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00541208
Message ID:
00541448
Vues:
40
By blanking out Expr feied you are loosing some report page settings like Orientation, Paper Size, e.t.c. You actually only need to remove the following driver related three lines from Expr filed:
DRIVER=
DEVICE=
OUTPUT=

>The problem may have to do with printer driver\printer information. I got a tip a while back that foxpro reports store printer information (at the time their created) inside the *.frx file. It has helped me since to do the following:
>
>1) Don't include forms in the project (so they are not read only).
>2) As part of the code to print the report..."Clean" out the EXPR, TAG, and TAG2 fields within the *.frx just prior to printing report.
>
>I've enclosed the code I use to do this...immediately below is the code to call a function to clear fields, then print report. Lower down, is the functin itself.
>
>Hope this helps - Victor
>*******************************
>*- Code to clear *.frx and run report:
>
>llSuccess = fnReportClean("MyReportFileName")
>
>IF !llSuccess
> = MESSAGEBOX("If report is unreadable, please contact administrator.")
>ENDIF
>
>REPORT FORM MyReportFileName TO PRINTER PROMPT NOCONSOLE PREVIEW
>
>*- End of code for printing report
>***********************************
>
>
>FUNCTION fnReportClean
>PARAMETER lcReportName
>
>PRIVATE lcCurAlias, lcCurError
>
>*- This function replaces first row of .FRX table (fields
>*- EXPR, TAG, TAG2) with blanks to remove specific printer info.
>
>IF EMPTY(lcReportName)
> RETURN .F.
>ENDIF
>
>IF EMPTY(JUSTEXT(lcReportName)) ;
> OR UPPER(JUSTEXT(lcReportName)) <> "FRX"
>
> lcReportName = ALLT(lcReportName) + ".FRX"
>ENDIF
>
>lcCurAlias = ALIAS()
>lcCurError = ON('error')
>
>ON ERROR RETURN UhhOhh(lcCurError, lcCurAlias)
>
>SELE 0
>USE &lcReportName ALIAS RptName
>
>GO 1
>REPLACE expr WITH "", tag WITH "", tag2 WITH ""
>
>ON ERROR &lcCurError
>
>DO fnReportCleanCleanUp
>
>RETURN .T.
>
>
>
>PROCEDURE UhhOhh
>PARAMETER lcCurError, lcCurAlias
>
>ON ERROR &lcCurError
>
>DO fnReportCleanCleanUp
>
>RETURN .F.
>
>
>
>PROCEDURE fnReportCleanCleanUp
>
>ON ERROR &lcCurError
>
>IF USED('RptName')
> USE IN RptName
>ENDIF
>
>IF !EMPTY(lcCurAlias)
> SELE &lcCurAlias
>ENDIF
>
>RETURN
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform