Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Koen Piller
  Where is Koen Piller?
 Santpoort-Zuid
 Netherlands
 Koen Piller
 To: Garth Groft
  Where is Garth Groft?
 York
 Pennsylvania - United States
 Garth Groft
 Tags
Subject: RE: FoxyPreview Report Page Numbering
Thread ID: 345336 Message ID: 345608 # Views: 28 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Reports and Printers
Date: Thursday, May 24, 2012 10:50:56 PM         
   


> > Hi,
> >
> > I have studied your procedure and made my comments in line marked with KP:
> >
> >
> > *!* set up cursor for unit_quotation report
> > If Not Used("Options")
> >       Use Sys(5)+ Curdir() + "custdata\hav001\options.dbf" In 0 Shared
> > Endif
> > Select Options
> > Set Order To Tag Dpidseq
> > Locate For domain = units.domain And pid = units.pid And seq = units.seq
> > Select Space(10) As domain, Space(20) As pid, Space(3) As seq,* From "options_table_format";
> >       INTO Cursor optionsprice Readwrite
> > 
> > * run this function to mark the options used by this unit in the optionsprice cursor
> > Thisform.Options_list_from_opt_fields_price()
> > 
> > Select domain,pid,seq,Selected,optcode,Option,price From optionsprice Into Cursor optionspricelist ;
> >       READWRITE Where Selected
> > Select optionspricelist
> > Replace All In optionspricelist domain With units.domain, pid With units.pid, seq With units.seq
> > Go Top
> > 
> > *!* set up cursor for unit_quotation report
> > *!* unit_quotation reports on a single unit (current record only) and its associated options as defined ;
> > in optionspricelist cursor.
> > thisreport = "Reports\unit_quotation.frx"
> > If Thisform.foxypreviewer  &&& KP: what kind of logicalproperty is this?
> > ** KP: when do you instantiate FoxyPreviewer.app?????
> >       Set REPORTBEHAVIOR 90  &&& KP: if you have instantiated FoxyPreviewer than this line is superfluous
> >       Report Form Locfile(thisreport) Preview ;
> >             NOPAGEEJECT Noreset
> > *!* select table for terms-conditions report
> >       Select units  &&& In this procedure you have selected Options, optionsprice, optionspricelist and now also units, which is your cursor/table for the report?
> >       Report Form "reports\terms-conditions.frx" Preview Next 1
> > Else
> >       Set REPORTBEHAVIOR 80
> >       Report Form Locfile(thisreport) Preview
> >       Public lastpageno
> >       lastpageno = _Pagetotal + 1
> >       Select units
> >       Report Form "reports\termsandconditions.frx" Preview Next 1
> > Endif
> > 
> > ** KP: the procedure calls only one report: either terms-conditions or termsandconditions depending on the variable foxypreviewer
> > 
> > 

> >
> > Regards,
> >
> >
> > Koen
>
> thank you for looking at my code.
>
> 1. when do you instantiate FoxyPreviewer.app????? this is done just once, in the app's opening form.
>
> 2. the procedure calls only one report: either terms-conditions or termsandconditions depending on the variable foxypreviewer
>
> the first report is generated by:
> thisreport = "Reports\unit_quotation.frx"
> Report Form Locfile(thisreport) Preview NOPAGEEJECT Noreset
> the first page is numbered _pageno = 2. in my test case there is just a single quotation page.
>
> the second report is generated by:
> Report Form "reports\terms-conditions.frx" Preview Next 1
> the next page (termsandconditions) is numbered _pageno = 1
>
> Garth Groft
Hi,
OK clear FoxyPreviewer is a logical form property which controls to use either the combination unit_quotaiton.frx and terms-conditions or the single report termsandconditions.
Funny you have named this property 'Foxypreviewer' I dont see any relation to Foxypreviewer, but that is up to you.
Now your problem is, that you claim FoxyPreviewer application is mixing up your page numbers.
I hardly believe and would like you to test following:
lcThisReport = "Reports\unit_quotation.frx"
If Thisform.foxypreviewer  = .F.
       Set REPORTBEHAVIOR 80
       Report Form Locfile(m.lcThisReport) Preview ;
             NOPAGEEJECT Noreset
        lcThisReport =   "Reports\terms-conditions.frx" 
       Select units 
       Report Form Locfile(m.lcThisReport) Preview 
Endif


this code instead of your code starting with the line
ThisReport = "Reports\unit_quotation.frx"


If you still have the pagenumbering problem it proofs it is an error/unwanted effect in your reports and not caused by FP.

Regards,

Koen

ENTIRE THREAD

FoxyPreview Report Page Numbering Posted by Garth Groft @ 5/22/2012 5:55:22 PM
RE: FoxyPreview Report Page Numbering Posted by Cesar @ 5/22/2012 6:57:57 PM
RE: FoxyPreview Report Page Numbering Posted by Garth Groft @ 5/22/2012 7:28:03 PM
RE: FoxyPreview Report Page Numbering Posted by Cesar @ 5/22/2012 9:59:19 PM
RE: FoxyPreview Report Page Numbering Posted by Garth Groft @ 5/23/2012 2:59:13 PM
RE: FoxyPreview Report Page Numbering Posted by Cesar @ 5/23/2012 3:02:41 PM
RE: FoxyPreview Report Page Numbering Posted by Garth Groft @ 5/23/2012 4:06:14 PM
RE: FoxyPreview Report Page Numbering Posted by Koen Piller @ 5/23/2012 7:15:39 PM
RE: FoxyPreview Report Page Numbering Posted by Garth Groft @ 5/24/2012 4:34:38 PM
RE: FoxyPreview Report Page Numbering Posted by Koen Piller @ 5/24/2012 10:50:56 PM