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

RE: [sqr-users] New-report data and report name do not match




Bob,

I found what was causing that error and was able to run the query.  However, it 
still does not assign the correct class year to the name.  What's happening is 
that it is creating an initial file called asr.pdf.  That file contains the 
data for class year 1999.  Then it creates 1999asr.pdf which contains the data 
for class year 2000.  Why is it creating the initial file without a class year 
appended to it?



-----Original Message-----
From:   Bob Stone [mailto:bstone@fastenal.com]
Sent:   Mon 12/12/2005 5:34 PM
To:     This list is for discussion about the SQR database reporting 
languagefrom Hyperion Solutions.
Cc:     
Subject:        RE: [sqr-users] New-report data and report name do not match
It's because you're using the value of $class taken from the save to
name your file.  That saves the previous row's class into $class so you
can use it in your procedures.  



Begin-Select
 Alter-Printer Font=5 Point-Size=10  
Class_Year &Class_Year ()On-Break Print=NEVER
                 BEFORE=NEWREPORT
                 Level=1
Volunteer_Name 
Given 
Pledge_Not_Paid 
Status 

 Let $class = &class_year
 Print &Class_Year(12, 10, 4) 
 Print &Volunteer_Name (12,200,30)
 Print &Given (12,320,3)
 Print &Pledge_Not_Paid (12,380,3)
 Print &Status (12,475,11)
 Next-Listing  SkipLines=1 Need=14
From GIFTS    
Where Class_Year >= '1999'
Order By Class_Year, Volunteer_Name
End-Select

-----Original Message-----
From: sqr-users-bounces+bstone=fastenal.com@sqrug.org
[mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org] On Behalf Of
Whitaker-Freitas, Elizabeth
Sent: Monday, December 12, 2005 4:24 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] New-report data and report name do not match

Greetings.  I'm at a complete loss.  I'm trying to create a new pdf for
each Class Year based on the query below.  The code as is creates
individual pdfs, however, the pdf file 1999asr.pdf contains the data for
Class_Year = 2000 and 2000asr.pdf contains the data for Class_Year =
2001.  I see how the data is going to the wrong file, as there is also a
file created called "asr.pdf" that contains the data for 1999.  

What am I missing?

Thanks!

! asr.sqr

Begin-Program
 Position (1,1)
 Do Master_Query
End-Program

Begin-Procedure Master_Query

Begin-Select
 Alter-Printer Font=5 Point-Size=10  
Class_Year &Class_Year ()On-Break Print=NEVER
                                                            SAVE=$class 
 
BEFORE=NEWREPORT
                                                            Set=1
Level=1
Volunteer_Name &Volunteer_Name
Given &Given
Pledge_Not_Paid &Pledge_Not_Paid
Status &Status
 Print &Class_Year(12, 10, 4) 
 Print &Volunteer_Name (12,200,30)
 Print &Given (12,320,3)
 Print &Pledge_Not_Paid (12,380,3)
 Print &Status (12,475,11)
 Next-Listing  SkipLines=1 Need=14
From  
   GIFTS    
Where
   Class_Year >= '1999'
Order By Class_Year
    ,      Volunteer_Name
End-Select
 Next-Listing
End-Procedure

!Create new file for each class year
BEGIN-PROCEDURE NEWREPORT
   let $newreport = $class || 'asr.pdf'
   New-Report $newreport
END-PROCEDURE

Begin-Heading 48 
 Alter-Printer Font=5 Point-Size=10   
 Print $current-date (12,1) edit 'MM/DD/YYYY'
 Page-Number (12,520) 
 Print 'Class' (46,1,0) Underline  Bold 
 Print 'Volunteer Solicitor' (46,200,0) Underline  Bold 
 Print 'Given' (46,320,0) Underline  Bold 
 Print 'Pledge Not Paid' (46,380,0) Underline  Bold 
 Print 'Status' (46,475,0) Underline  Bold 
End-Heading

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





Here was a non admissible message part of 'application/ms-tnef' MIME
type. It has been automatically discarded before sending the message to
the list. 
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users