[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] Problem with PDF output
- Subject: [sqr-users] Problem with PDF output
- From: "Darshil Mehta" <Darshil.Mehta@lntinfotech.com>
- Date: Tue, 14 Sep 2004 13:15:12 +0530
- Delivery-date: Tue, 14 Sep 2004 02:45:43 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
Hi,
I am creating a report which has PDF out put .
Report has product which has one or more parts and it's detail's
it has to print every part against product and it's details and part
total for each part
when the product changes it prints product total also.
Problem is
While printing initially pages it's printing properly
when it comes to last record it's prints the last part total for the
product in the next page
code is attached.
Thanks for the help
begin-select on-error=record_sql_error
($sql-error,'MAJOR',$sql_report,'main_query')
flush.product &product=char () on-break print=never level
=1 after=print_part_headings skiplines=4
flush.dieprt &dieprt=char () on-break print=never
after=die_part_headings
flush1.dpcnt &dpcnt=number
flush.mcn &mcn=char
flush.packages &pkg =char
flush.cycletimeweeks &ctw=number
flush.ytdships &ytdship=number
flush.site &site=char
flush.fginv &fginv=number
flush.finaltest &finaltest=number
flush.asyqty &asyqty=number
flush.fabprobeplan &fabprobeplan=number
flush.actualvsplan &actualvsplan=number
flush.gate4probe &gate4probe=number
flush.gate3postmetal &gate3postmetal=number
flush.gate2premetal &gate2premetal=number
flush.gate1premetal &gate1premetal=number
flush.prttotalwip &prttotalwip=number
flush.fgctpso &fgctpso=number
flush.fgallpos &fgallpos=number
flush.prtfgbankpos &prtfgbankpos=number
flush.totalwip &totwip=number
flush.totpos &totpos=number
flush.totpos1 &totpos1=number
flush.fgbnkpos &fgbnkpos=number
flush.diebnkpos &diebnkpos=number
flush.pddte &pddte=char
flush.seqnum &seqnum=number
move &dpcnt to #dpcnt
move &site to $site
move &fginv to $fginv
move &finaltest to $finaltest
move &asyqty to $asyqty
move &fabprobeplan to $fabprobeplan
move &actualvsplan to $actualvsplan
move &gate4probe to $gate4probe
move &gate3postmetal to $gate3postmetal
move &gate2premetal to $gate2premetal
move &gate1premetal to $gate1premetal
move &totwip to #totwip
move #totwip to $totwip
move &totpos to #totpos
move #totpos to $totpos
move &totpos1 to #totpos1
move &totpos1 to #totpos1
move #totpos1 to $totpos1
move &fgbnkpos to #fgbnkpos
move #fgbnkpos to $fgbnkpos
move &diebnkpos to #&diebnkpos
move #&diebnkpos to $diebnkpos
move &pddte to $pddte
move &seqnum to #seqnum
do pdf_print_check
do write_file_detail
add 1 to #llopp
do prt_total
from
[$from_clause]
where 1=1
[$join1]
[$join2]
order by flush.dieprt,flush.product,flush.site
end-select
end-procedure ! main_query
******************************************************************************************
begin-procedure print_part_headings !LOCAL
if #diecnt = #diecnt1
add 7 to #count
end-if
show 'Inside partid' $dieprt $product $prttotalwip
print $col19_label (-3,#col19_column,0)!box !wrap 4 2 keep-top
if $prttotalwip <> ' '
print $prttotalwip (0,#col17_column,0) edit 999,999
background = ('YELLOW')
end-if
if $prttotalwip <> ' '
print $prttotalwip (0,#col18_column,0) edit 999,999
background = ('YELLOW')
end-if
print $col20_label (+1,#col20_column,0)!box !wrap 4 2 keep-top
if $prtfgbankpos <> ' '
print $fgctpso (0,#col17_column,0) edit 999,999
end-if
if $fgallpos <> ' '
print $fgallpos (0,#col18_column,0) edit 999,999
end-if
print $col21_label (+1,#col21_column,0)! box !wrap 4 2 keep-top
if $prtfgbankpos<> ' '
print $prtfgbankpos (0,#col17_column,0) edit 999,999
background = ('YELLOW')
end-if
if $prtfgbankpos<> ' '
print $prtfgbankpos (0,#col18_column,0) edit 999,999
background = ('YELLOW')
end-if
print $col22_label (+1,#col22_column,0) wrap 7 2 keep-top
if #tot > 0
print $tot (0,#col17_column,0) edit 999,999
else
print $tot (0,#col17_column,0)edit 999,999pf
foreground =('RED')
end-if
if $alltot <> ' '
print $alltot (0,#col18_column,0) edit 999,999pf
foreground =('RED')
else
print $alltot (0,#col18_column,0) edit 999,999
end-if
end-procedure ! part_headings
!***************************************************************************************************
! procedure: die_part_headings
!
! description: This procedure print the die headings and it's total.
!
!
! input: none
!
! output: none
!***************************************************************************************************
begin-procedure die_part_headings
do die_total
let #sub1 = 0 - #count1
add 1 to #diecnt1
if #diecnt = #diecnt1
print ' ' (+1,,70) fill
print ' ' (+1,,70) fill
end-if
print $col23_label (+#sub1,#col23_column,0)
alter-printer font=3 point-size=8
print $col31_label (-1,#col23_column,0)
alter-printer font=3 point-size=8
if $totwip <> ' '
print $totwip (+1,#col17_column,0) edit 999,999
background = ('YELLOW')
end-if
if $totwip <> ' '
print $totwip (0,#col18_column,0) edit 999,999
background = ('YELLOW')
end-if
print $col24_label (+1,#col24_column,0)
if $totpos <> ' '
print $totpos (0,#col17_column,0) edit 999ps
end-if
if $totpos <> ' '
print $totpos (0,#col17_column,0) edit 999ps
end-if
if $totpos1 <> ' '
print $totpos1 (0,#col18_column,0) edit 999ps
end-if
if $totpos1 <> ' '
print $totpos1 (0,#col18_column,0) edit 999ps
end-if
print $col25_label (+1,#col25_column,0)
if $fgbnkpos <> ' '
print $fgbnkpos (0,#col17_column,0) edit 999ps
background = ('YELLOW')
end-if
if $fgbnkpos <> ' '
print $fgbnkpos (0,#col18_column,0) edit 999ps
background = ('YELLOW')
end-if
print $col26_label (+1,#col26_column,0)
if $diebnkpos <> ' '
print $diebnkpos (0,#col17_column,0) edit 999ps
background = ('YELLOW')
end-if
if $diebnkpos <> ' '
print $diebnkpos (0,#col18_column,0) edit 999ps
background = ('YELLOW')
end-if
print $col27_label (+1,#col27_column,0) wrap 7 2 keep-top
if $tot1 <> ' '
print $tot1 (0,#col17_column,0) edit 999ps
foreground =('BLACK')
end-if
if $tot1 <> ' '
print $tot1 (0,#col17_column,0) edit 999ps
foreground =('RED')
end-if
if $tot2 <> ' '
print $tot2 (0,#col18_column,0) edit 999,999ps
foreground =('BLACK')
end-if
if $tot2 <> ' '
print $tot2 (0,#col18_column,0) edit 999,999ps
foreground = ('red')
end-if
do write_file_diehead
do write_file_diehead1
do write_file_diehead2
do write_file_diehead3
do write_file_diehead4
do write_file_diehead5
if #diecnt1 < #diecnt
do newpage
end-if
end-procedure ! part_headings
Best regards,
Darshil Mehta
______________________________________________________________________
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users