Selecting constants for reporting
Guys, I need help in understanding "selecting constants". If I make a key figure constant. Is that what users will see while the query is running?
Thanks,
RG.
Constant Selection allows you to mark a selection in the Query Designer as constant. This means that navigation and filtering have no effect on the selection for the runtime. In this way, you can easily select reference sizes that you cannot change for the rest of the runtime.
Integration
You can use this function with selections in structural components, cells and restricted key figures.
Check the link: http://help.sap.com/saphelp_nw04/helpdata/en/e7/5f983c1a356858e10000000a114084/frameset.htm
Assign points if it helps.
Regards,
Ashok
Similar Messages
-
Using (Select All) for report parameter
Hi there,
I am Looking for assistance in making the the (Select All) option work for a particular report. The parameter is for product families (which there are about 47 unique results for). The report is also influenced by two other parameters, one being a date type
i.e 'MTD' 'YTD' 'MAT'. When a long date type such as MAT is selected, selecting all families causes the report to get stuck in an endless loop.
I've tried creating my own <Select All'> item in the parameter dataset, then I have the opposite issue, the <Select All> selection works perfectly but when I try and tick two or more product families I recieve the following error:
"An expressions of non-boolean type specified in a context where a condition is expected, near ',' "
Parameter Dataset:
SELECT '<Select All>' AS family_description, '<Select All>' AS family_code
UNION ALL
SELECT DISTINCT family_description, family_code
FROM dim_item AS item
ORDER BY family_description
Snippet From Main Report Dataset:
Where
sales.oe_branch_code IN (@Branch)
And
sales.order_status <> 'X' and sales.line_status <> 'X'
AND (item.family_code IN (@Family) OR @Family = '<Select All>')
Any help is appreciated
Thanks Kindly
SQL NoviceHi KCBA,
I have check the query you have provided the issue cause by the query "
AND (item.family_code
IN (@Family)
OR @Family =
'<Select All>')" you are using which is incorrect.
If the parameter @Family have set as "Allow multiple values" then you don't need to add new label "Select All" for the multiple value parameter already have this section, if the parameter @Family is not the multiple values
parameter and you want to select all the values or just select one, you can modify the query as below which will works fine:
"AND (item.family_code =
(@Family) OR
@Family = '<Select All>'
If you are using the stored procedure and have issue about add multiple value parameter in the where clause, you are take reference to below similar case about how to create an function to make it work:
Passing multi-value parameter in stored procedure ssrs
If I have some misunderstanding, please try to provide more details information about the relationship of all the parameters (Cascading or not ), current result you have got and expect result you want(Snapshot).
Any problem, please feel free to ask.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support -
Adding additional field for selection criertoria for report painter
I am trying to add a new selection criterion for a report which is created from report painter. I have run Transaction Code GRR2 and selected the library 1VK which is cost centers: absorption costing and doubled clicked on the report.
Clicked on edit on the header à General data selection à I am looking for a option for company code but I cant find it in the list. Is there anywhere I need to flag the field company code as characteristic value or am I missing something??
Thanks
Ehi,
You might want to try add parameters in general data selection.... in addition you can add variable against this field so that it appears on selection-screen. You can look at standard SAP report for example.
hope this helps.
Cheers,
Gimmo -
Set default value to selection screen for report
Hi All,
I've a report selection screen which has 3 fields from the report category: PNPPERNR, PNPSTAT1, PNPBTRTL. My logical database is PNPCE.
How can I set the default value to the field PNPSTAT1? Means when I first display the selection screen, the value for this field will automatically display '3' in it.
Hope someone can help me on this.
Thanks.Hi All,
Thanks for reply. But I think I should declare my question clearer.
Actually it's not a parameter.
My problem is when using the logical database, if you define a TABLES: PERNR, then you can see the SAP standard report selection screen. So my selection screen has 3 standard fields which are PNPPERNR, PNPSTAT1, and PNPBTRTL.
I need to set the default value '3' to field PNPSTAT1.
Thanks. -
Hi All
I have a table called Agent. Each Agent processes requests.
So accordingly Request is another table.
Now the Agent can process the request successfully, fail or it could be
in progress.
So accordingly I have a status column in the Request table which can have the following values
New - when the request is allocated to the agent
Open- When the agent opens the request
Action- when the agent acted upon the request
Sold - when the agent was successful in processing the request
Fail - when the agent could not process the request
In the Request table there is column called requestDate which is the
date when the Request was first inserted (i.e when its New)
Now whenever the agent acts upon the request from the front end
the status change is logged in a RequestLog table.
So when the agent changes the status to Open, an entry is logged into
RequestLog table.
So when the agent open the request an entry in the RequestLog table
would go with the status as open , the reference of the requestId &
the date on which the status is changed
Similar entries will be logged for each request when the agent acts on
the respective requests like if its Sold then the status will be sold,
the date of sale & the corresponding request Id will be logged into the
RequestLog table.
In the Request table the status will be changed to "Open" or "Sold" but the
requestDate will not change & it will remain the date when it was inserted
Now I want to generate a Report which shows the list of all agents within a state
with all total number of requests they have handled, how many are in Opened status,
how many are in Sold status & how many are in Fail status. I also have to show the
average time(in days) it took for each agent to Open the request, make the sale or qualify it
as Fail. This average time I want it for an agent & not request specific.
& In the end I have to show the grand total of all the requests handled by all the agents,
grand total of opened status requests,grand total of Sold status requests,grand total of Fail status requests as well as the total average time it took to Open ,total average time it took to sale & total average time it takes to Fail
I have dabbled with simple SQL but not a complex report type like above. So I would need help from all you experts.
Here is what I plan to do
my from clause would include the Agent, Request, RequestLog table
where Request.requestdate between <fromDate> and <toDate>
group by agent.agentname,
Select would have count(agent.requestid),
Now how do i show the list of Open requests, sold requests & fail requests in different columns since all these values are in the same column.
Also I am aware of the average fnction but I need help on how to use the same in such a scenario.
Do post your thoughts on the same.
RegardsHi All
I have made some queries to fetch the Report data. I would want you to post your comments on the same.
This is my first query which returns the total count of request per dealer, how much are in open, sent & dead state & total per status.
select AGENT.COMPANY_NAME,count(REQUEST.REQUEST_ID) TOTAL ,
sum(decode(REQUEST.status,'Open',1,0)) OPEN,
sum(decode(REQUEST.status,'Sent',1,0)) SENT,
sum(decode(REQUEST.status,'Dead',1,0)) DEAD
from AGENT, REQUEST
where
AGENT.STATE='ACT'
and REQUEST.REQUEST_TYPE='B'
and REQUEST.CONFIRMATION='Y'
and AGENT.DEALER_ID = REQUEST.DEALER_NUMBER
group by grouping sets(AGENT.COMPANY_NAME, ())
Then I have to retrieve the average number of days it takes to change the request to Open, average number of days it takes to change the request to Sent & average number of days it takes to change the request to Dead
per Agent. The base date is stored in REQUEST table (request_date column) & the subsequent change of status is stored in activity_date column
of ACTIVITY table
Here is what I do get the average number of days it takes to change the status for the Agent
select AGENT.COMPANY_NAME,
avg( decode (REQUEST.status,'Open',ACTIVITY.ACTIVITY_DATE - REQUEST.REQUEST_DATE,0)) AVG_OPEN,
avg( decode (REQUEST.status,'Sent',ACTIVITY.ACTIVITY_DATE - REQUEST.REQUEST_DATE,0)) AVG_SENT,
avg( decode (REQUEST.status,'Dead',ACTIVITY.ACTIVITY_DATE - REQUEST.REQUEST_DATE,0)) AVG_DEAD
from REQUEST, ACTIVITY, AGENT
where
AGENT.STATE='ACT'
and REQUEST.REQUEST_TYPE='B'
and REQUEST.CONFIRMATION='Y '
and REQUEST.dealer_number = AGENT.DEALER_ID
and REQUEST.STATUS = ACTIVITY.STATUS
group by grouping sets(AGENT.COMPANY_NAME, ())
I hope this is the right way for calculating average number of days
Since most part of the queries is the same
I tried to merge both the queries into one because I need to render the report in that fashion. But the moment I merge the query its giving absurd results.
Do post your thoughts on the same
Regards -
Multiple selection screens for report
I need to display 2 separate selection screens prior to executing the report.
1. A selection screen to enter the material & plant
2. Based on the material and plan another selection screen to display the inspection characteristics associated with the material and be able to select (as checkbox) the inspection characteristic that needs to be used as filtering criteria.
The first selection screen I can do. But how do I invoke the second selection screen that displays the insp. char. Also how do I design such a selection screen and populate the contents
I would like something like
[CheckBox] Inspection Plan Inspection Characteristic [Editable upper limit] [Ediatable Lower Limit]
But other ideas to implement this are welcome as well.Megan,
Say thanks to SDN.No need to give points to this.
TABLES:EBAN.
SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE title.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER:rad1 RADIOBUTTON GROUP rad USER-COMMAND frad1 DEFAULT 'X',
rad2 RADIOBUTTON GROUP rad .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETER: mtr AS CHECKBOX MODIF ID g3 USER-COMMAND chk1,
p_matnr TYPE eban-matnr MODIF ID g1,
sloc AS CHECKBOX MODIF ID g3 USER-COMMAND chk2,
str_loc TYPE eban-lgort MODIF ID g4.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
SELECT-OPTIONS: matnr1 FOR eban-matnr MODIF ID g2.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN PUSHBUTTON /20(10) name USER-COMMAND UCOM.
SELECTION-SCREEN END OF SCREEN 100.
*name = 'FETCH'.
title = 'Test Report'.
CALL SELECTION-SCREEN '100'.
TYPE-POOLS slis.
AT SELECTION-SCREEN OUTPUT.
IF rad1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G1' OR screen-group1 = 'G4'.
screen-active = '1'.
screen-input = 0.
ELSEIF screen-group1 = 'G2'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF rad2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G1' OR screen-group1 = 'G4' OR screen-group1 = 'G3' OR screen-group1 = 'G5'.
screen-active = '0'.
ELSEIF screen-group1 = 'G2'.
screen-active = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF mtr = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G1'.
screen-input = 1 .
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF sloc = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G4'.
screen-input = 1 .
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
clear sy-ucomm.
iflag = 1.
K.Kiran. -
Multi-Select LOV for Report Parameters
I have a LOV defined in Oracle Portal as a Multi-Select LOV. When I assign this to an optional report parameter when defining a reports definiton file and run the parameter screen, it comes up as a combo box. Is a combo box the only type of LOV I can use for an Oracle Reports Parameter.
Thanks
JodyWith whatever i could make out is you are trying to change a discovere report to xml; publisher report isnt it?
To answe to your question, directly it is not possible to have In clause but you could use some smart logic like lexical parameters etc to achieve similar things.I guess you cannot do in in EBS Reports too. -
How can I call a Page Process from the Select statement for Report Page
I'm able to call a javascript using the below:
img src="#IMAGE_PREFIX#add2.gif" border="0" alt="Icon 4" onClick="javascript:add_connect1('||CPORT.ID||')"
But Now,
I'd like to accomplish (2) New things:
1. instead of using,....... onClick="javascript:add_connect1,
I'd like to call a Page Process, onClick=
2. I'd like to be able to call two different processes onClick.
a. onClick="javascript:passBack('||ID||')"
b. onClick= <Please see my question #1 above>
Can someone please help me with the syntax for this,
If indeed it can even be done?
Thanks- GaryGreg.
It seems that my situation is the one you describe in you second paragraph, where you mention:
you could then add the ID column value as a parameter to the javascript functionBut,
I do not know how to reference the variable in my javascript nor how to use it in my on-demand process.
If you can hellp me past this last little bump, then I think I will be able to use these skills in Sooo many different areas of my design.
Here's what I've got so far:
A. In the select statement I identify the javascript as:
onClick="javascript:connect_port('<font color=blue>''||ID||''</font>')";
B. In my javascript I have this:
<script language="JavaScript" type="text/javascript">
function connect_port(ID)
var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=CONNECT_PORT',0);
gReturn = get.get();
get = null;
</script>
C. In my on demand function I have this:
BEGIN
INSERT INTO CCONNECTIONS_B
BLDG_ID,CLST_ID,PORT_ID,STRAND_ID
) VALUES
:P2004_BLDG_ID,:P2004_CLST_ID,:P2004_PORT_ID,:P2004_STRAND_ID1
END;
You can see that I dont know how to use the value for 'ID' in either the javascript or the On-Process function.
If you can help me out with this one, Then I can imitate it for the rest.
-Gary
Edited by: garyNboston on Apr 3, 2009 6:44 AM
Edited by: garyNboston on Apr 3, 2009 6:44 AM
Edited by: garyNboston on Apr 3, 2009 6:45 AM
Edited by: garyNboston on Apr 3, 2009 6:47 AM -
How to select printer for reports 11g?
I just upgraded my forms and reports from 6i to 11g, before printing the reports to printer,
I was using
WIN_API_DIALOG.select_printer(:DESNAME,:PORT,FALSE);to get printer name from network and set :DESNAME.
This didn't work in 11g, what's the alternative function to perform this ?frank1018 wrote:
I just upgraded my forms and reports from 6i to 11g, before printing the reports to printer,
I was using
WIN_API_DIALOG.select_printer(:DESNAME,:PORT,FALSE);to get printer name from network and set :DESNAME.
This didn't work in 11g, what's the alternative function to perform this ?Hello Frank,
Check this Oracle reports 10g output directly to printer
Hope this works..
Hamid -
Is it possible to send a request for report pagination?
Hi,
I have a page with 3 regions.
Only one of these regions is displayed depending on a special request.
This works fine as long as we don't push the select list for report pagination.
Do we have any possiblities to send a request when we select another rowrange from the pagination select list?
At the moment we don't get a request after selecting a new pagination.
The result is that after the pagination there is no region displayed.
Thanks in advance
UlrikeUlrike - For reasons like this, it's best not to use REQUEST to control page rendering behavior. Passing an item value so that it stays in session state gives you more flexibility, e.g., P1_SHOW_REPORT:YES.
Scott -
I downloaded the OEHR Sample Objects application and followed the steps in Oracle® Application Express Advanced Tutorials
Release 3.2.
The parameters and report seem to be working correctly except when I enter "all" for department or manager I get no matching hits.
What's the most efficient way to retrieve "all" if the users selects all for dept and mgr - thus we'd want to return all records in the table.
Region snipprt
Enter Search
Search Employee
Dept
- ALL -
Administration
Marketing
Purchasing
Human Resources
Shipping
IT
Public Relations
Sales
Executive
Finance
Accounting
Treasury
Corporate Tax
Control And Credit
Shareholder Services
Benefits
Manufacturing
Construction
Contracting
Operations
IT Support
NOC
IT Helpdesk
Government Sales
Retail Sales
Recruiting
Payroll
Mgr
- ALL -
Steven King
Neena Kochhar
Lex De Haan
Alexander Hunold
Nancy Greenberg
Den Raphaely
Matthew Weiss
Adam Fripp
Payam Kaufling
Shanta Vollman
Kevin Mourgos
John Russell
Karen Partners
Alberto Errazuriz
Gerald Cambrault
Eleni Zlotkey
Michael Hartstein
Shelley Higgins
The following is the sql that was provided as part of the turitoral.
SELECT
"OEHR_EMPLOYEES"."EMPLOYEE_ID" "EMPLOYEE_ID",
"OEHR_EMPLOYEES"."FIRST_NAME" "FIRST_NAME",
"OEHR_EMPLOYEES"."LAST_NAME" "LAST_NAME",
"OEHR_EMPLOYEES"."EMAIL" "EMAIL",
"OEHR_EMPLOYEES"."PHONE_NUMBER" "PHONE_NUMBER",
"OEHR_EMPLOYEES"."HIRE_DATE" "HIRE_DATE",
"OEHR_EMPLOYEES"."JOB_ID" "JOB_ID",
"OEHR_EMPLOYEES"."SALARY" "SALARY",
"OEHR_EMPLOYEES"."COMMISSION_PCT" "COMMISSION_PCT",
"OEHR_EMPLOYEES"."MANAGER_ID" "MANAGER_ID",
"OEHR_EMPLOYEES"."DEPARTMENT_ID" "DEPARTMENT_ID"
FROM
"#OWNER#"."OEHR_EMPLOYEES" "OEHR_EMPLOYEES"
WHERE
(lower(first_name) like '%' || lower(:P1_NAME) || '%' OR
lower(last_name) like '%' || lower(:P1_NAME) || '%')
AND department_id = decode(:P1_DEPT,'%null%',department_id,:P1_DEPT)
AND manager_id = decode(:P1_MGR,'%null%',manager_id,:P1_MGR)Hi,
Use this..
SELECT
"OEHR_EMPLOYEES"."EMPLOYEE_ID" "EMPLOYEE_ID",
"OEHR_EMPLOYEES"."FIRST_NAME" "FIRST_NAME",
"OEHR_EMPLOYEES"."LAST_NAME" "LAST_NAME",
"OEHR_EMPLOYEES"."EMAIL" "EMAIL",
"OEHR_EMPLOYEES"."PHONE_NUMBER" "PHONE_NUMBER",
"OEHR_EMPLOYEES"."HIRE_DATE" "HIRE_DATE",
"OEHR_EMPLOYEES"."JOB_ID" "JOB_ID",
"OEHR_EMPLOYEES"."SALARY" "SALARY",
"OEHR_EMPLOYEES"."COMMISSION_PCT" "COMMISSION_PCT",
"OEHR_EMPLOYEES"."MANAGER_ID" "MANAGER_ID",
"OEHR_EMPLOYEES"."DEPARTMENT_ID" "DEPARTMENT_ID"
FROM
"#OWNER#"."OEHR_EMPLOYEES" "OEHR_EMPLOYEES"
WHERE
(:P1_NAME IS NULL OR
(:P1_NAME IS NOT NULL AND
(lower(first_name) like '%' || lower(:P1_NAME) || '%') OR
(lower(last_name) like '%' || lower(:P1_NAME) || '%')
) AND
(:P1_DEPT IS NULL OR department_id = :P1_DEPT) AND
(:P1_MGR IS NULL OR manager_id = :P1_MGR) -
PS report: multible selection for report selection criteria
Is there a possibility to define multible selections in the report selection variables of a PS hierarchy report?
I tried to define them via
CJE6 -> EDIT -> General data selction
and entered valiables in the FROM column and the TO column. But when I execute the report it will not show multible selction, but only single selection. Also, I did not find a SAP standard report which has multible selection in the report selection criteria screen.
I found the multible selections only in the DB profile selection screen and the dynamic selection, but that is not the solution I am searching for.
Can anybody kindly help me with this?E.g. S_ALR_87013532
here you can see multible selection in the DB profile selection group, but not in the report selection group. I would like to use multible selection in the report selection group, as mentioned above.
I am aware of the possibility of creating a new DB profile, but this is only my option B. -
Change Selection criteria for existing report in Report painter
Hi Experts,
We are on 4.7, using report painter for getting reports for Cost center & Profit Center. For one of the report we have selection criteria as Cost center and cost center group, but now user want us to add new selection field as Cost element and cost element Group to same report. We have tried all the options from GR32 ->Edit-> General Selection, but we don't find cost element in Key figure listed there.
Please let us know how can we add the new field to selection criteria. We also would like to know is this is possible with existing report to add new fields or not? Is that we need to create new report for this?
Thanks in advance..
ShilpaShilpa-
In my opinion the best way to troubleshoot issues like this is to go to SAP delivered standard reports and see how they are setup. For example, in your case you want to add cost element and cost element group to your report. There is one standard report from SAP - Transaction :S_ALR_87013611 which has both cost center, cost center group and cost element, cost element group in the selection criteria. You can look how this report is set up, and maintain your report in a similar fashion. Atleast this way, it will give you an idea.
Go to transaction code GRR3 and under library look for report "1SIP-001". By double clicking on the row, you will see how it is maintained.
Hope this helps.
Shail -
Is it possible to change values in pagination select list for a report?
The values showing up in my pagination select list for a report are 10,15,20,30,50,100,200,500,1000,5000.
Is it possible to not have this list show the 1000 and 5000 values? I've tried setting various row values in the layout and pagination section of the report, but nothing changes in the select list. Is there a way to change this, or is it set up in a template somewhere that I can change?
APEX version 3.0
ThanksFigured this one out. Using the P1_ROWS item, added a static LOV with the correct values to override the one APEX was providing. The P1_ROWS item goes in the Number of Rows (Item) field in the layout and pagination section of the report.
-
Selection Screen for crystal report ?
Hi to all,
Is it possible to create selection screen using Crystal report designer alone ?
I came to know that we can give selection parameteres using SELECT EXPERT option in desginer.
Can we create selection screen for user input like we have in abab (selection screen) ?.
Is it possible to check authorization using Crystal report designer ?
If anyone knows anything .... remotely connected with the question I asked please reply.
Waiting for reply.
Regards,
Surya.Surya,
To do what you are wanting, you will want to do the following:
1) Create parameters. Open the Field Explorer > right click Parameter Fields > fill in the necessary fields o create the desired parameter.
2) Add the parameter to the Select Expert.
2a) If you are using a SQL Command to generate your data set you will need to add the parameter name to the Parameter List of the Command and add it the selection criteria of the SQL statement.
Something like this:
WHERE f.FieldName = {?ParameterName}
HTH,
Jason
Maybe you are looking for
-
Ps CS5 "Print Page Setup" dialog will not open
Hello: I was printing via my Photoshop CS5. I accidentally created a paper size of 0cm x 0cm and attempted to print (up to this point Photoshop and Print worked). I now (permanently) get an error message: "There was an error opening your printer. . .
-
HT1725 my movie download stops abruptly 20min before the end
my movie download stops abruptly 20min before the end although the internet connection hasnt been interrupted. I get the error message: there was a problem downloading "le gamin au velo". An unknown error occurred (-50). Please check network connecti
-
Error Installing 0MATERIAL from Business Content
Hi, I am trying to install the infoObject 0MATERIAL from the business content. After the installation without any error, when I am trying to access the object I get the error: Settings for material number conversion not found Could you please help me
-
Not exactly sure of the origin but just got new Mac Pro computer and after uploading CS5 encounter problem with printing. Either images were very dark or at times the printer would just dump ink. I have a new monitor as well. NEC which has be
-
I just installed the Education Edition for Adobe Creative Suite 6 Design & Web Premium using the DVD. All the applications (Dreamweaver, Fireworks, Illustrator, InDesign etc) can be found in my applications except Photoshop. There is a Photoshop fold