[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: AW: AW: [sqr-users] printing groupheader and details in onehorizontal band
The variable #current-line is a reserved variable that is global. A
variable is only local when the procedure is declared with variables in the
name, such as:
begin-procedure Master_Query_BeforeProc ( #line_number )
#line_number and any variables within the procedure would be local unless
they have an underscore, such as $_variable_name would refer to
$variable_name outside of the local scope.
Back to your problem, the substitution variables &head2 and &head3 are only
being printed when the value of &val1 changes. You're also not incrementing
#starting_point for the next line so you are printing on the same line you
ended on ( the same line as &val2 ).
You could split this into two queries. For example:
begin-procedure master_query
begin-select
table.head2 &head2 ( +10, 33 )
table.head3 &head3 ( +10, 89 )
let #starting_point = #current-line - 20
do child_query
from table
end-select
end-procedure !master_query
begin-procedure child_query
begin-select
table.val1 &val1 ( #starting_point, 200 )
table.val2 &val2 ( +10, 200 )
add 20 to #starting_point
from table
where head2 = &head2
end-select
end-procedure !child_query
>From: "Giepz, Marius" <MG@topsystem.de>
>Reply-To: "This list is for discussion about the SQR database
>reportinglanguage from Hyperion Solutions." <sqr-users@sqrug.org>
>To: "'This list is for discussion about the SQR database reporting
>languagefrom Hyperion Solutions.'" <sqr-users@sqrug.org>
>Subject: AW: AW: [sqr-users] printing groupheader and details in one
>horizontal band
>Date: Tue, 14 Nov 2006 15:17:19 +0100
>
>would the #current_line thing also work in graphic mode?
>i have to position the lines and boxes pixel accurate so i use this mode.
>
>the way i tried it so far seem to be wrong. i am not really familiar with
>the
>namespaces of variables in sqr yet. i mean using global and local
>variables.
>when i use on-break for the grouping, then the groupheaders are printed in
>a
>subroutine
>i tried it like this:
>
>
>Begin-Procedure Master_Query
> Begin-Select
>
> table.head2 &head2
> table.head3 &head3
>
> !my grouping criterion (it shall not be printed)
> table.head1 &val1 () On-Break Set=1 Level=2 Print=Never
>Before=Master_Query_BeforeProc
> !print the details
> table.val1 &val1 (#starting_point,200)
> table.val2 &val2 (+10, 200)
>
> if #ending_point > #current-line
> move #ending_point to #starting_point
> else
> move #current-line to #starting_point
> end-if
>
> From ...........
>
> End-Select
>
>End-Procedure
>
>!print the groupheader
>Begin-Procedure Master_Query_BeforeProc
>
> move #current-line to #starting_point
>
> Print &head2 (#starting_point,33)
> Print &head3 (+10,89)
>
> move #current-line to #ending_point
>
>End-Procedure
>
>
>
>
>There must be some big fault in my understanding of the sequence. do those
>point variables have to be global?
>
>
>
>
>
>
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Dwight Schrute [mailto:schrute.dwight@hotmail.com]
> > Gesendet: Freitag, 10. November 2006 17:20
> > An: sqr-users@sqrug.org
> > Betreff: RE: AW: [sqr-users] printing groupheader and details in one
> > horizontal band
> >
> >
> > Allegedly, Hyperion is attempting to upgrade the Reporting
> > Studio to be more
> > powerful. Until that happens (likely never), you can use
> > Ultra-Edit with
> > the wordfile from Ray Ontko's site
> > (http://www.ontko.com/sqr/sqr_wordfile.txt). It will help immensely.
> >
> > Suggestion #1 - For printing your header, you can store the
> > value in the
> > reserved variable "#current-line" and use that as a
> > coordinate. Such as:
> >
> > move #current-line to #starting_point ! line number to
> > start printing
> > print 'header1_field1' ( #starting_point, 1 )
> > print 'header1_field2' ( +1, 1 )
> > print 'header1_field3' ( +1, 1 )
> > move #current-line to #ending_point ! line number at end of printing
> >
> > print 'detail1' ( #starting_point, 10 ) ! return to
> > starting line number
> > print 'detail2' ( +1, 10 )
> > print 'detail3' ( +1, 10 )
> > print 'detail4' ( +1, 10)
> >
> > ! determine which line number is larger to start printing after that
> > if #ending_point > #current-line
> > move #ending_point to #starting_point
> > else
> > move #current-line to #starting_point
> > end-if
> >
> > add 2 to #starting_point ! add an additional line in between
> >
> > print 'header2_field1' ( #starting_point, 1 )
> > ...
> >
>
>_______________________________________________
>sqr-users mailing list
>sqr-users@sqrug.org
>http://www.sqrug.org/mailman/listinfo/sqr-users
_________________________________________________________________
Try the next generation of search with Windows Live Search today!
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-us&source=hmtagline
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users