[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Page break issue
- Subject: RE: [sqr-users] Page break issue
- From: "Bencke, Gina" <GinaBencke@forestcity.net>
- Date: Mon, 7 Jun 2004 09:43:41 -0400
- Delivery-date: Mon, 07 Jun 2004 08:51:02 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: AcRMlCilVRTHUZq3RGq+gVbkXyhR1QAANKUA
- Thread-topic: [sqr-users] Page break issue
Before procedures execute once at the beginning of the execution of the select
statement after retrieving the first row of data. Since you call new-page in
your before procedure your first page is blank. You could add a flag variable
to determine if the before procedure is executing for the first.
...
if #notfirstRow ! This variable will have a 0 (false) value until you
give it some other value
new-page
move 1 to #notFirstRow ! 1 is true
end-if
-----Original Message-----
From: sqr-users-bounces+ginabencke=forestcity.net@sqrug.org
[mailto:sqr-users-bounces+ginabencke=forestcity.net@sqrug.org] On Behalf Of
Darshil Mehta
Sent: Monday, June 07, 2004 9:35 AM
To: sqr-users@sqrug.org
Subject: [sqr-users] Page break issue
Hi,
I have following requirement;
If user enters ALL as corp code, system will display
heading as Corp : ALL
And If user enters multiple corp code using comma,
then system has to display corp description on each
page. New corp description will be displayed on new
page.
I have used New-Page function of SQR. This is giving
me proper result. But I always get 1st page blank.
Here's my code. Can anyone help?
------------------------------------------------
use-procedure before-page=print_local_headings
do main_logic
begin-procedure main_logic
do write_file_headings
do main_query
end-procedure !main_logic
begin-select on-error=record_sql_error
($sql-error,'MAJOR',$sql_report,'main_query')
crmserv.descr &desc=char () on-break level=1
print=never before=comp_proc
crmserv.priority &priority
crmserv.open &open=NUMBER
crmserv.inprogress &inprogress=NUMBER
crmserv.pending &pending=NUMBER
crmserv.closed &closed=NUMBER
crmserv.cancelled &cancelled=NUMBER
crmserv.otherstat &otherstat=NUMBER
move &desc to $desc
move &priority to $priority
move &open to $open
move &inprogress to $inprogress
move &pending to $pending
move &closed to $closed
move &cancelled to $cancelled
move &otherstat to $otherstat
add 1 to #llopp
add &open to #opentot
add &inprogress to #inprogresstot
add &pending to #pendingtot
add &closed to #closedtot
add &cancelled to #cancelledtot
add &otherstat to #otherstattot
do write_file_detail
do print_report_detail
from
[$from_clause]
where 1=1
end-select
do write_file_summary
end-procedure ! main_query
begin-procedure print_local_headings
let $col0_label = 'Customer Name: ' || &desc
let #col0_column = 2
alter-printer font=3 point-size=8
if $report_section = 'REPORT'
let #report_box_width = (#report_width + 3)
graphic (0,1,#report_box_width) box
#local_heading_height 10 16
evaluate $report_section
when = 'REPORT'
print $col0_label (1,#col0_column,0) bold
print $col1_label (+1,#col1_column,0)
print $col2_label (0,#col2_column,0)
print $col3_label (0,#col3_column,0)
print $col4_label (0,#col4_column,0)
print $col5_label (0,#col5_column,0)
print $col6_label (0,#col6_column,0)
print $col7_label (0,#col7_column,0)
break
when-other
break
end-evaluate
let #report_start_position = #local_heading_height
+ 1
position (#report_start_position,1)
let #report_box_width = (#report_width + 3)
let #main_report_height = 40 -
#local_heading_height
graphic (0,1,#report_box_width) box
#main_report_height 10 1
alter-printer font=3 point-size=8
end-if
end-procedure ! local_headings
begin-procedure comp_proc
write 1 from 'Company : ' &desc
new-page
end-procedure !cust_count
-------------------------------------------
Thanks in advance....
Darshil
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users