[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: Tue, 13 Dec 2005 10:50:37 -0600
- Delivery-date: Tue, 13 Dec 2005 11:53:31 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: AcX//WVbO/u2Ed6sQmuLxKXRycAH7AAAVp2QAADFryAAAMA5kA==
- Thread-topic: [sqr-users] New-report data and report name do not match
You are correct - my mistake. I sometimes nest selects so that my
outermost select is the 'grab distinct years - create report - do
this_year_report(#thisyear)' and then 'select this year - print all
info'.
That is what I was trying to suggest to avoid the on-break logic...I
just typed my message before my brain saw what you were doing. Yes, the
nesting selects is slower than the on-break logic, but when the report
is small enough, I don't worry about it.
-----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: Tuesday, December 13, 2005 10:26 AM
To: This list is for discussion about the SQR database reporting
language from Hyperion Solutions.
Subject: RE: [sqr-users] New-report data and report name do not match
Without the On-Break logic, it creates a newreport for each record not
the whole group.
-----Original Message-----
From: sqr-users-bounces+ewhitake=middlebury.edu@sqrug.org on behalf of
Bob Stone
Sent: Tue 12/13/2005 11:06 AM
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
Because you're using BEFORE instead of AFTER...you haven't selected any
data yet, but you're doing a NEWREPORT. ...then you create your 2nd
report with the data that should have been in the first report.
You didn't really need to use on-break logic to do this, all it does for
you is make the code confusing. If you simplified your code, you
wouldn't get lost in where what code fires.
Begin select
My columns
Let $vars = &my columns
Do NEW REPORT
Print $vars 'wherever'
FROM
My table
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: Tuesday, December 13, 2005 9:54 AM
To: This list is for discussion about the SQR database reporting
language from Hyperion Solutions.
Subject: 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
_______________________________________________
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