To All,
I gave a really wierd error in the "VFP Organiser" package I'm developing.
In order to print out the Events in the Organiser I allow preview mode i.e

 
Select * ;
>From (This.cEvent_Cursor) ;
Where Ttod(Start_Time) between pdDate_From And pdDate_To ;
And Not Empty(Event_Key) ;
Into Cursor curReport Readwrite nofilter;
Order By Start_Time 

* Putting the browse in makes the
* report print correctly
* Browse

Do case
Case plPreview
  * Preview the Form
  Select curReport
  report Form Weekly_Printout Preview noconsole
  *
Otherwise
  * Print Out the Form 
  *
  * Print Out the Form 
  Select curReport
  report Form Weekly_Printout To Printer prompt noconsole
  *
Endcase

Symptoms:
The print preview mode ALWAYS giver the correct report, but to report to the
printer NEVER picks up the correct alias (curReport) and proceeds to get
data from another cursor with the same field names even if I prefix the
fieldnames in the report with the table alias i.e "curReport.Date_Time" as
opposed to "Date_Time". By the way all the data in the report comes from the
curReport cursor.
 
If you enable the BROWSE commend then the report ALLWAYS prints exactly as
it is in the preview, so it is as though the report isn't picking up the
correct alias to skip down but only when going to the printer. I've tried
forcing the alias to "curReport" in the DE of the report (NOT PRIVATE
DATASESSION!!!) along with a goto top, just to make sure - to no avail. 

The WEIRD thing is that if I add a field with alias() as the contents into
the detail line in the report then the preview displays "curReport"
correctly but the printed version displays the alias of this parallel cursor
so I know "mistaken alias" is the problem. The report is picking up the
WRONG alias for the data in the report it but why? 

Note same report in preview mode and printed mode. I haven't got any "print
when" conditions set in the report and it ONLY contains a page header and
detail band. Oh yes, if I put the "alias()" field in the page header it
displays the correct alias "curReport"

Two strange things here apart from the report error:
1. If you print out the report from the preview pane the same problem
occurs.
2. If you add the "report form ...to printer" immediately after the "report
form...preview" then the report previews and prints correctly.

I've even recreated the report from new with exactly the same results.

This is driving me MAD - any suggestions?

Dave Crozier
 The secret to staying young is to live honestly, eat slowly, and to lie
about your age 

 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.10/419 - Release Date: 15/08/2006
 




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to