Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicate detail line when printing after preview
Message
 
To
05/10/2004 09:19:20
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00948770
Message ID:
00948771
Views:
17
Hi Tod,
I have no such a problem. Either send directly to printer either print after Preview. VFP 8 SP1, WinXP SP 2


>FoxPro 8.0, WinXP
>
>The code below will produce a report with two detail lines when printing directly to a printer or displaying in preview. However, if you print the report after previewing the report, the first detail line is duplicated for a total of three lines.
>
>It has something to do with having an index with DTOC() and then changing the SET CENTURY value. If either the INDEX ON statement or the SET CENTURY OFF statement is commented out, this anomaly does not happen.
>
>The report form itself may be as simple as having just two fields on the detail band, or be complex with data groups, totals, etc.; the report form does not produce this anomaly.
>
>Can anyone explain this?
>
>Thanks,
>
>Tod
>
>
>*
>* This code will generate a report with two detail lines on the preview screen;
>* however, three detail lines will appear (the first one duplicated) when you send
>* the report to the printer after previewing it.
>*
>* I think it has something to do with creating an index with DTOC() then changing
>* the set Century value.
>*
>
>CLOSE DATABASES ALL
>
>*
>* Start with century on.
>*
>SET CENTURY ON
>
>*
>* Create Table (or cursor adapter view) with at least two records.
>*
>CREATE TABLE c:\testprog\testprog (weekending T, amount I)
>
>INSERT INTO testprog (weekending, amount) VALUES ({01/01/2004}, 100)
>INSERT INTO testprog (weekending, amount) VALUES ({01/07/2004}, 200)
>
>*
>* Apply index with DTOC function.
>*
>INDEX ON DTOC(WeekEnding) TAG RptOrder
>
>*
>* Turn off century.
>*
>SET CENTURY OFF
>
>*
>* Run report: only need two fields on report "DTOC(weekending)" and "amount"
>*
>REPORT FORM c:\testprog\testprog.frx TO PRINTER PROMPT PREVIEW NOCONSOLE IN SCREEN
>
>SET CENTURY ON
>
>USE IN SELECT("TestProg")
>
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform