Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there any way to do this with 2 FRXs ?

Status
Not open for further replies.

vfp7guy

Programmer
Jul 2, 2002
45
CA
I have implemented a set of daily / weekly / monthly Calendar reports to our Calendar system that we are incorporating into our main system. These 3 reports are the same style as the daily / weekly / monthly Calendar reports from MS-Outlook Calendar (including the upper-right displays of current + next month mini month layouts).

The main display area in the FRX for the days is comprised of 5 rows of 6 columns, with the rightmost column being split horizontally for the Sat/Sun. As in the MS-Outlook report month, the week starts on a Monday. I have a cursor with a memofield for each daily appointment, and the fields are mapped relative to the starting day-of-week.

This works perfectly, except for any 30-day months starting on a Sunday, or 31-day months starting on a Saturday or Sunday. These months requiredme to create a similar FRX with 6 rows instead of 5.

I don't want to use my 6-row form for all months, as the day-boxes only hold 6 lines of data instead of 8.

My printing routine does a "REPORT FORM <row5name.frx> FOR < 5-row condition as above>..."
followed by a "REPORT FORM <row6name.frx> FOR < 6-row condition as above>..."

This also works great ... except that I now lose my cursor index order.

e.g., for the current year, if my selected month range is February to August, the Feb, Mar, May and June will print sequentially, followed by the 2nd printing job for April and July (both months require 6 rows).

Is there any way around this?
 
I forgot to mention ... I know I can get around this by having a combined FRX with all items from both existing FRXs, and use PRINT WHENs to determine printability of each item, but I was trying to avoid that...
 
How about scanning the table and handling each month separately:

Code:
SCAN
  IF <5-row>
     REPORT FORM 5-row ... NEXT 1
  ELSE
     REPORT FROM 6-row ... NEXT 1
  ENDIF
ENDSCAN

Alternatively, how about restructuring your data so that each week is in one record of a cursor and the report figures out how many rows to put?

Tamar
 
Thanks Tamar for the reply, but ...

Your 1st suggestion re scan would result in too many executions of a REPORT FORM... during a print run. A typical printjob may be a secretary printing calendars for several Users and expects the full printjob to be sorted / grouped by User + Month as in the cursor. (Printjobs are ...TO PRINTER PROMPT PREVIEW... as most of our users need the ability for previewing and/or print routing.)

Let me think about the suggestion about weekly records as opposed to monthly records. I would still need to alter the height of the dayboxes for 5-row vs. 6-row. Would also need to rethink my current logic for determining the relation of my cursor fields (Day01 to Day42) of the relative DAY-number compared to absolute day-position, as I use a matching array of day-numbers to display the mini-months in the header (as shown in MS-Outlook reports.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top