..........query in the report issue..............
There is a table which contains all the records for a certain CID.
CID, area,city...
cid1 area1
cid2 area2
cid3 area3
cid4 area4
cid5 area44
cid6 area55
ANother table have the columns.
CID, NCID, totalequipment....
Now i would like to have a list of area.... for all the CID and NCID of a specific City.
For example.
I want to have
CID, area, NCID, area, ... for a specific City..
But remember that NCID is nothing new.. its is from the list of CIDs in the CID table. ..
e.g
CID , area , NCID, area
cid1 area44 cid5 area3
Remember that Area is in another table , and the cid, and ncid are in another table..
Please suggest.
Thanks alot
Regards
sql>
select t1.cid cid,t1.ncid ncid,t21.area cid_area,t2.area ncid_area,t2.city ncid_city
from t1,t2,t2 t21
where t1.ncid = t2.cid
and t1.cid = t21.cid
and t1.city = 'Ct1'
CID NCID CID_AREA NCID_AREA NCID_CITY
C001 C002 A1 A1 Ct1
C006 C003 A4 A2 Ct1
C005 C004 A2 AR2 Ct2
C001 C008 A1 Ar1 Ct2
C001 C009 A1 Ar3 Ct2
C006 C011 A4 Ar3 Ct2
C005 C012 A2 Ar2 Ct2
C005 C013 A2 A1 Ct1
C006 C014 A4 A2 Ct1
C005 C015 A2 Ar2 Ct2
Zhxiangxie,
I didnt refresh the page for a long time
Message was edited by:
jeneesh
Similar Messages
-
Displaying the SQL Query in the report
How can i display the query used to display a report..
My query to get the records is as below
select ename,empno from emp
where deptno = :p_dept
When i run the report i want to display the select statement as a message....
How can we do this?One way is to create a column formula which you specifically redefine your query in. However, if you change your query you will need to also change your column formula. So this way could be prone to a mismatch of data. Unfortunately, I don't know of any better way. Hopefully someone else can suggest a better method. Good luck.
-
RESTRICT THE QUERY IN THE REPORT
Hi.
I have created a Data-Block which doesn't based on a table. In this Block I
have a Text-Item which I need to restrict my Query.
For example I write in the Text-Item the "empno" 7788. If I click the OK-Button
then reports should start and it must show me a report of all Information of
this employee.
To do this I have created in Forms a Report. When Reports Builder start I can
write my Query. I wrote:
SELECT * FROM emp WHERE empno=:control.empno;
But it doesn't work so. What must I do.You need to pass the value in your Form item to the report as a parameter - read up in the reports documentation about creating and using Reports parameters
-
Hi All,
I have one query related to Report for Cost line item against project T.Code-CJI3. I have create Two PO's and maintained the entries in Short text field assume XYZ while posting the invoices with standard Document type-RE and another Document Type-RB through MIRO system is picking correct details relevant to PO's. However when I ran the report (T.Code-CJi3) system is showing me the description which I have maintained in PO's Text filed under Name column for Doc type-RE but its shows me blank for Doc type-RB. i have checked FSG and PK fsg and Document type everything is absolutely fine. I am not getting were I am missing.
Appreciate if you provide yours valuable input.
Regards,
GauravSearch the forum before posting such basic queries. You will find your answer.
-
Show the SQL query on the report itself
I'd like to show the entire SQL query in print at the end of a report, say in the Report Footer section so that the user could review it let me know what edits are needed to meet their needs. Thanks
Since the query itself doesn't really change (except for parameter values passed to selection criteria), you can just open the Show SQL Query and paste it into a text box.
Beyond that, there isn't a way to add via a "Special Field".
HTH,
Jason -
Pass query to the report through form
Hello everybody...
I m using forms and reports 6i.
I create query through form depends on user selection.
Means user select specified columns from specific table. And finally i create complete query.
Now i wanna pass that query to report builder and wants to generate automatic report depends on that query.
Can anybody have idea how to do this?
How to pass query from form and generate report.
If any1 knows then please help meYou should pass all columns but with separator character i.e.:
supl_cd||';'|| supl_name ||';' city ||';'|| add1 ||';'|| add2 ||';'|| pincode ||';'|| country my_column
You should also pass column names if you want and get them back using the same procedure.
Procedure for retrieving should use instr,loop and srw.do_sql, if you don't know what is SRW built in package, then take a look in report's help. That's a pity that there is nothing similar in forms. You can use dynamic select to pass values exactly to the report's variables:
for i in 1..10 loop
srw.do_sql('select '||i||' into :cp_'||i||' from dual');
end loop;
Jakub Flejmer -
Need to execute Dynamic query for the report
I was wondering if we can have the option of choosing at runtime from the report builder parameter so that if the end-user selects 'Yes' then the report will run one specific query and if he chooses 'No' then another particular query is invoked. What I mean to say that by choosing between Yes and No at runtime one should have the option of returning query results based on the same table but having different columns selected via the SELECT statement
means we have two querires on our report & upon the chosen parameter we should execute only one of them ... wht should i do to apply tht ???As the previous post noted lexicals are a terrific way to accomplish dynamic queries in Oracle reports.
Another way you could accomplish this would be to use a UNION, whereas the first select in the UNION represents one user option, then second query represents the second option.
For example:
SELECT customer_name name, customer_address address
FROM customer_table
WHERE :p_choice = 'Customer Info'
UNION
SELECT employee_name name, employee_address address
FROM employee_table
WHERE :p_choice = 'Employee Info'If when running the report, the user chooses 'Customer Info' the first query would return results, if the user chose 'Employee Info' then just information from the second query would return information.
So there are different ways to accomplish what you are looking for, you just need to find which is going to work best for you.
Hope this helps! -
Display records returned for a query in the Report Region Title
Hi,
Is there any variable set that can be referenced to indicate how many records have been returned for a specific query. I have several hide/show regions dealing with various reports, and I would like to add a little info into the region title to display how many records there were returned for the report in this region.
Thx in Advance,
cliffHi,
addendum
These are simple sql queries BTW. I've seen posts alluding to the SQL%ROWCOUNT when using cursors. Is there any variable we can reference when using a simple sql query?
thx
cliff -
Query which the Reports which not run more than 15 days
Hello,
I need I query to show all the Concurrent Programs which are attached in Application but not run more than 15 days. Also filter will segregate concurrent Reports and concurrent processes.
regards,Please clarify are you interested in conc programs/reports which has not been run in last 15 days or the ones which were run only in the first 15 days from creation date.
I am pasting the base query which gives you the details like concurrent program name, executable name, executable type, and execuation file name ( you may add condition like fcp.enabled_flag = 'Y' for all active programs etc)
SELECT fe.executable_name,
fe.execution_file_name,
fl.meaning,
fcp.concurrent_program_name,
fcpt.USER_CONCURRENT_PROGRAM_NAME
FROM apps.fnd_executables fe,
apps.fnd_lookups fl,
apps.fnd_concurrent_programs fcp,
apps.fnd_concurrent_programs_tl fcpt
WHERE fcp.executable_id = fe.executable_id
AND fe.execution_method_code = fl.lookup_code
AND fl.lookup_type = 'CP_EXECUTION_METHOD_CODE'
AND fcp.concurrent_program_id = fcpt.concurrent_program_idEdited by: 936671 on Sep 4, 2012 5:58 AM -
How to write a query for the following issue
Hello,
I would like to write a query to display the result in the following format
Item
Categort1
Categort2
Categort3
Categort4
Categort5
Categort6
Min
Max
Avg
Min
Max
Avg
Min
Max
Avg
Min
Max
Avg
Min
Max
Avg
Min
Max
Avg
01
02
03
04
For every item for the category i need to find Min,Max and Avg from the Value column
Table structure is as follows
ID
Item Id
Item
Category
value
1
01
A
Categort1
1
2
01
A
Categort1
2
3
01
A
Categort1
3
4
02
B
Categort2
7
5
02
B
Categort2
8
6
03
C
Categort3
6
7
04
D
Categort4
12
8
04
D
Categort4
14SELECT ItemID,
MIN(CASE WHEN Category = 'Categort1' THEN value END) AS Min_category1,
MAX(CASE WHEN Category = 'Categort1' THEN value END) AS Max_category1,
AVG(CASE WHEN Category = 'Categort1' THEN value END) AS Avg_category1,
MIN(CASE WHEN Category = 'Categort2' THEN value END) AS Min_category2,
MAX(CASE WHEN Category = 'Categort2' THEN value END) AS Max_category2,
AVG(CASE WHEN Category = 'Categort2' THEN value END) AS Avg_category2,
MIN(CASE WHEN Category = 'Categort6' THEN value END) AS Min_category6,
MAX(CASE WHEN Category = 'Categort6' THEN value END) AS Max_category6,
AVG(CASE WHEN Category = 'Categort6' THEN value END) AS Avg_category6
FROM Table
GROUP BY ItemID
The format can be achieved using tools like SSRS
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Hi,
Can you all help me?
Is there any area or a table or query in SAP, which can create a list with the purchase order number (Field name EBELN),supplier(Field name SUPERFIELD) and header text(Field name EDITOR).
Please tell the table name that fetches all values from the same table.
Regards,
SmithaHi,
Try to Combine EKKO, EKPO & T166P tables and take common fields like:
EKKO:
EKKO-BSTYP
EKKO-BSART
EKKO-EBELN
EKKO-LIFNR
EKPO:
EKPO-EBELN
T166K
BSTYP
ESART
TDID = F01
You can use this for your customization.
regards,
Maia
Edited by: Maia on Jul 23, 2008 5:22 PM -
How to solve the report generating performance issue in BI server
->I HAVE USED ONLY ONE PIVOT IN MY REPORT QUERY AND THE REPORT QUERY IS FULLY DEPEND ON ONE FACT TABLE
->IN THE REPORT I AM SHOWING DATA BY MORE THAN 150 COLUMNS.
->I HAVE USED REPORT FUNCTIONS FOR 3 FIELDS IN THE REPORT.ALL THREE REPORT FUNCTIONS JUST ADD TWO COLUMN FIELD AND MAKE IT IN TO ONE COLUMN FILED
->REPORT QUERY INDIVIDUALLY RUNNING BY 2.40 SECONDS.WHEN I USED THAT TO GENERATE A REPORT IT TAKES TO RUN MORE THAN 8 MINS.WHY THIS DELAY?WILL YOU EXPLAIN
Edited by: 873091 on Jul 18, 2011 3:50 AMHello Dude,
So from your post I understand that there is a report that basically takes 8 minutes to retrieve the data, but when you get the logical sql from the cache, and run it against the database, it only takes less than 20 seconds to retrieve the same data?
This should never happen. There might be a delay of more 20-40 seconds more than the time taken against the database to load the page elements etc. Is this happening for only this particular report or all reports ? Are you running the query against the same instance's database or a different one?
Try to re-boot all the BI services and run the report again, if the issue still exists, enable caching and try.
Assign points if helpful.
Thanks,
-Amith. -
I’m getting the below issue when I try to deploy a crystal report with Dynamic parameters in BI Launch Pad, when I deploy the same report with static parameters I can deploy and run it. I have Restarted the BI server, still the issue exitno use. kindly help me on this issue.
“This error occurred: Adding Crystal Report "CrystalReport1.rpt" failed. The server with kind rptappserver returned an error result. Failed to copy the report file to the report object. Refreshing the report object properties might have failed. Failed to read data from report file CrystalReport1. Reason: Failed to read parameter object”.BO does not run dynamic params through the report as would happen without BusinessObjects (BO) or Crystal Reports Server (CRS). When you publish a report with dynamic parameters to BO/CRS, the prompt is published to the repository so that it can be accessed through the Business View Manager (which can be installed as part of the client tools). In order for this to work a couple of things need to happen:
1. You need to be sure that you check the "Update Repository" box on the Save As screen the first time you publish the report.
2. Your BO/CRS user needs to have "view" access to the Crystal2013ReportApplicationServer in the Servers section in the CMC - in fact, the Everyone group should be given view access to the server in order for dynamic prompts to work correctly.
3. In the Business View Manager, the Administrator user needs to give your user, or, even better, a Crystal Developers group full control access to the "Dynamic Cascading Prompts" folder.
Best practice for dynamic prompts in a BO/CRS environment is to actually create the prompts in the Business View Manager. This will allow you to create a single data connection that can be reused and also create lists of values such that the same list or prompt can be reused by multiple reports. If you just create the prompts in Crystal, you will end up with multiple data connections to the same database, the prompts will use the whole query for the reports to get the dynamic values instead of just a focused query to the lookup table that contains the values, and there ends up being lots of duplication and chaos.
-Dell -
Find the report from the query
Hi, We noticed one of the bad queries creating blocks in SQL Server and that is coming from our report server. I captured the query, Now I m trying to find what report that query belongs to ? Is there any way to find this from Report server database ? may
be something like querying the catalog table? Please advise
Thank youHi,
I Think that method can respond to your request.
If you execute this query on the report server Database and change the where clause with one of your parameters.
SELECT Name
FROM
SELECT
Name,
Path,
CAST(CAST(content AS VARBINARY(MAX)) AS VARCHAR(MAX)) AS reportXML
FROM Catalog
WHERE
content IS NOT NULL AND
type = 2
) t
WHERE t.reportXML LIKE '%XXXXXXXXXXXXX_CHANGE_THIS_XXXXXXXXXXXXX%'
Please, can you tell me if that respond to your need?
Arnaud -
Binding an SQL "where" clause to a field in the report.
Hello everybody,
I have made a crystal report that works fine. Now, I need to add a specific query to the report and drag and drop the returned fields in the report.
The problem is that I need to add a query that contains a "Where" clause that is binded to a field already existing in the report, for example :
SELECT T0.Field1,
T0.Field2,
T0.Field3
FROM Table1 T0
WHERE T0.Field4=(a field from a report)
Is it possible to do it ? if yes, how can I do it.
Thank you in advance for your further responds,
Best Regards,
- Youssef -Moved to Report Design forum
You can't do it in that specific way. It would have to be done server side or use a subreport and then link the subreport on the field from the main report.
Don
Maybe you are looking for
-
Hi i want to by te lastest MacBook air 13" with 4 gb of RAM..... I want know if the MacBook air have any problem to work the games present in the mac apple store And if the game have any lag or any problem with the MacBook air
-
P1102W SOFTWARE MUST BE RELOADED EVERYTIME I TURN THE WINXP COMPUTER OFF. PIECE OF JUNK
I WAS LOOKING FOR P1006 LASERJET PRINTER WHICH I LOVE AND COULD NOT FIND ANOTHER ONE. I BOUGHT THE CLOSEST THING TO IT, A HP 1102W LASERJET ON MAY 24TH 2010 FROM STAPLES. I ALWAYS FOLLOW THE PROPER INSTALLATION SEQUENCE.NOTHING BUT PROBLEMS. I HAVE T
-
Create package with prompt from other application
Hi Experts! I need to create a package in the planning application. In the screen selection I need some dimensions of my planning cube and one dimension of the Ownership application. I don't have any problem with the current application dimension, bu
-
Java -version is it a java command or OS command.
java -version is it a java command or OS command. I am in a bet. I said its a java command and it will be same no matter what the OS is. What do u genius say
-
Jasper reports and bpel?
Is it possible (somehow) to generate pdf document using jasper reports (or any other framework for that matter) from bpel process? Can anybody guide me to any tutorial or something that adresses this kind of "problem"? I'm quite a newbie in Oracle BP