* Table format already defined, now Fill in the page for oTableRow=7 to 63 if eof() or lcMasterKey#ferc_numb+section+sort_prod+line_prod DisablePageBreak=.t. exit endif FERCListings.MSG.Caption=alltrim(lcMasterKey)+[ ]; +trim(origin)+[ ]+trim(destinatio) if Origin#CheckOrigin OR AfterFirstPage AND oTableRow=7 oTable.Cell(oTableRow,1).Select .Selection.SelectRow .Selection.Cells.Shading.Texture=45 .Selection.Cells.Shading.BackgroundPatternColorIndex=8 outOrigin=trim(left(trim(Origin)+iif(seek(orig_code,[orignew],[origno]),; [ (]+alltrim(orignew.county_st)+[) ],[ERR ]),36)) * iif(AfterFirstPage AND oTableRow=8 AND * CheckOrigin=Origin,[ (cont)],[] CheckOrigin=Origin oTable.Cell(oTableRow, 1).Select .Selection.ParagraphFormat.SpaceBefore = iif(oTableRow=7,0,1) .Selection.TypeText(iif(val(item_numb)>0,str(val(item_numb),4),[])) oTable.Cell(oTableRow,2).Select .Selection.ParagraphFormat.SpaceBefore = iif(oTableRow=7,0,1) .Selection.TypeText(outOrigin+[ ]) if val(Orig_Note)>0 .Selection.Font.Name="Monotype Sorts" .Selection.Font.Size=10 .Selection.TypeText(chr(191+val(Orig_note))) Endif if AfterFirstPage AND oTableRow=7 AND CheckOrigin=Origin .Selection.TypeText([ (cont) ]) Endif OriginROW=oTableRow AfterFirstPage=.t. Endif oTable.Cell(oTableRow,3).Select .Selection.TypeText(trim(Destinatio)+iif(seek(dest_code,[destnew],[destno]),; [ (]+alltrim(destnew.county_st)+[) ],[ERR ])) if val(Dest_Note)>0 .Selection.Font.Name="Monotype Sorts" .Selection.ParagraphFormat.SpaceBefore = iif(oTableRow=7,0,1) .Selection.Font.Size=10 .Selection.TypeText(chr(191+val(dest_note))) Endif oTable.Cell(oTableRow,4).Select .Selection.ParagraphFormat.SpaceBefore = iif(oTableRow=7,0,1) .Selection.TypeText(transform((cur_rate_s+cur_rat3_s),'9999.9')) *.... other conditionl format code * this code shades every other row if OriginROW#oTableRow AND MOD(oTableRow-OriginROW,2)=0 && Even number distance oTable.Cell(oTableRow,3).Select .Selection.MoveRight(1,6,1) .Selection.Cells.Shading.Texture=30 .Selection.Cells.Shading.BackgroundPatternColorIndex=8 Endif &&Origin_ROW#oTableRow AND MOD(oTableRow-OriginROW,2)=0 FERCListings.PB.Value=FERCListings.PB.Value+1 skip endfor .Selection.EndKey(6)