[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: AW: [sqr-users] printing groupheader and details in onehorizontal band



Graphic mode simply refers to the graphical builder setting the print grid size 
very fine.
E.g. lots of very thin lines instead of wide lines, one per print line.
#current-line is a reserved variable which are ALWAYS global.
If you have local procedures (but the code below doesn't) then you would refer 
to it as #_current-line.
Did you look at next-listing?  That would be much simpler than the logic below.
When you issue a next-listing command, the print position advances one line and 
sets the current-line back to 1.

So you can print each group always starting on line 1. It effectively breaks 
the page up into a series of mini pages.
You would print both the header and detail starting on line 1, then put the 
next-listing in an after procedure.

Steve. 

-----Original Message-----
From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org
[mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] On Behalf 
Of Giepz, Marius
Sent: Wednesday, 15 November 2006 1:17 AM
To: 'This list is for discussion about the SQR database reporting languagefrom 
Hyperion Solutions.'
Subject: AW: AW: [sqr-users] printing groupheader and details in one horizontal 
band

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



_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users