[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
- Subject: RE: [sqr-users] New-report data and report name do not match
- From: "Bob Stone" <bstone@fastenal.com>
- Date: Mon, 12 Dec 2005 16:34:41 -0600
- Delivery-date: Mon, 12 Dec 2005 17:37:09 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: AcX/aszSa68FJraRReivVIjOKWHIRgAAOKkQ
- Thread-topic: [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
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users