[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] On-breaks Problem - I think
- Subject: RE: [sqr-users] On-breaks Problem - I think
- From: "Paul Hoyte" <paul.hoyte@sharidionne.com>
- Date: Wed, 23 Jun 2004 11:32:47 -0400
- Delivery-date: Wed, 23 Jun 2004 10:36:07 -0500
- In-reply-to: <89D189087ED7A048BDD7F89BEA9D18FF071827C9@mail3.ndu.edu>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: AcRZNfh4JYRsKiMtR8y0Ju5uDPvIhwAAPklg
The way to handle this is to use the dynamic query feature of sqr. Your
query has to be structured in such a way, that based on the user input the
query will be built using the correct on-break columns and variables.
Create a procedure that handles the user input and populates the dynamic
variables with the correct values. In the begin-select statement you will
then have to correct sql statement based on the values that you populate
into the variables. Hope this helps.
Paul Hoyte
Sharidionne Inc.
(248) 752-6970
paul.hoyte@sharidionne.com
-----Original Message-----
From: sqr-users-bounces+paul.hoyte=sharidionne.com@sqrug.org
[mailto:sqr-users-bounces+paul.hoyte=sharidionne.com@sqrug.org] On Behalf Of
Miller, Danika
Sent: Wednesday, June 23, 2004 11:19 AM
To: 'This list is for discussion about the SQR database reporting
languagefrom Hyperion Solutions.'
Subject: RE: [sqr-users] On-breaks Problem - I think
The problem is with the on-break not setting the variables.
There are two possible group by options: Country or Start Date Since there
are 5 possible selections to run the report, A, B, C, D, and E and there are
two different select statements: one for A&B and one for C,D,& E, my
problem is do I need a separate select statement with the on-breaks changing
for each of the 5 possible selections - A,B,C,D,E.
Example: I want to select report type A and I want to group by Country.
I would use the first select statement and I need to do an on-break on the
country field.
Now, I want to select report type B and I want to group by Start date. The
same select statement is used except the on-break will now be on the start
date field.
And there are many possibilities here. A - group by country, A - group by
start date, B - group by country, B - group by start date, C - group by
country, C - group by start date and so on.
My question is how in the world should I do this? Is my only option to have
individual select statements for every possible combination? There has to
be an easier way.
-----Original Message-----
From: Alexander, Steve [mailto:Steven.Alexander@sanjoseca.gov]
Sent: Friday, June 18, 2004 4:43 PM
To: 'This list is for discussion about the SQR database reportinglangu age
from Hyperion Solutions.'
Subject: RE: [sqr-users] On-breaks Problem - I think
This is a reason dynamic variables were created. Any part of your SQL
statement can be replaced with a dynamic variable that you can set within
the program. The dynamic variable should appear within your SQL in the form
[$variable]. Example:
let $zip = '12345'
let $zipcode = 'and C.ZIPCODE = $zip'
begin-select
...
from CUSTOMER C
where C.STATE = 'MA'
[$zipcode]
end-select
Notice that the text of $zipcode becomes part of a SQL statement and the SQL
statement contains a condition that compares the value of a column
(C.ZIPCODE) to the value of a variable ($zip). SQR will send a SQL
statement to the database manager in the form:
select ... from CUSTOMER C where C.STATE = 'MA' and C.ZIPCODE = :1
SQR will also send '12345' as the value of bind variable :1.
-----Original Message-----
From: Miller, Danika [mailto:MillerD2@ndu.edu]
Sent: Friday, June 18, 2004 1:14 PM
To: 'sqr-users@sqrug.org'
Subject: [sqr-users] On-breaks Problem - I think
My run control page asks if the report should be run by either A, B, C, D,
or E. A&B share the same select statement (diff. where clause), and C, D, &
E share the same select statement (diff. where clause).
And there's a radio button asking how the report should be grouped: either
by country or start date.
There are many possible variances in running this report:
A - Group by country
A - Group by start date
B - Group by country
B - Group by start date
C, D, E - etc.
Would I have to have a different select statement for each and every
possible combination?
For example,
if A and country do select 1 with an on-break on country
if A and start date do select 2 with an on-break on start date
if B and country do select 3 with an on-break on country
if B and start date do select 4 with an on-break on start date
Any ideas??????????
_______________________________________________
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
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users