To create an interactive report in the apex by selecting from multiple tables
Hi, I am creating an interactive report by selecting from multiple tables.
SELECT w.FIRST_NAME as name, w.SURNAME as name, i.ROAD Road, i.DATE_OF_INC as DATE_OF_INC, S.STATEMENT as a STATEMENT OF Declaration
JOIN THE
WITNESS w
ON w.witness_id = s.FK1_WITNESS_ID
JOIN THE
Incident I have
WE
i.incident_no = w.FK1_INCIDENT_NO
JOIN THE
user_station ps
ON ps.station_id = i.nearest_station_id
JOIN THE
the user in.
WE
in. STATION_ID = ps.station_id
WHERE po.officer_id = 1
by I continue to encounter this error "the report query requires a unique key to identify each row. The supplied key cannot be used for this query. Please change the report attributes to define a unique key column. "ORA-01445: cannot select ROWID from where sample, a join without key preserved table view '
So I googled around and found that in the attibutres tables report, I need to change the "LINK" COLUMN so first, I changed "Link to custom target", but the report is so I changed it to "Exclude link Clolumn" again, the report didn't report and I STILL got a blank page with only the tabs.
I wonder you can not create a report by selecting from multiple tables?
If you can please I need your help.
Thank you
You can, but in this case, it might be easier to build your report tables that are joined Oracle views and then build your report out of the newly built sight...
Or wrap a selection around your selection with joins, and then make the where clause on the external selection...
Thank you
Tony Miller
Software LuvMuffin
Ruckersville, WILL
Tags: Database
Similar Questions
-
interactive report in the apex of link in pdf format
I'm building an interactive report based on a view of my oracle table. I want to use the single line view icon to view pdf reports that already exists on my web server. For example, if my line id is xxx, name the pdf file would be xxx.pdf.
How can I steer to the pdf based on the interactive report right?
Also how can I restrict the security of the pdf file for those who sail through the apex?
Thank youI won't get into the politics of the opportunity to leave the files in the o/s level, or store them in a table. The pros & cons range from the use of Oracle, generation of size redolog tablespace, backup & duration of restoration on the one hand, to the lack of RI and potential security problems of the file server on the other.
If your file is stored in a table or an o/s, you can get it in a blob and then use WPG_DOCLOAD.download_file to view it.
http://Apex.Oracle.com/pls/OTN/f?p=31517:64
Re: Open a file from the file server: security problemBy displaying the image via a call to pl/sql, you can easily check that the user is logged on and the right to consult the file before posting to protect themselves against the bookmarking, URL hacking or whatever.
-ONE
-
Is this too much to expect in Apex 5.01?
I have an application which records people entering an area.
The idea is to scan badges and save time and the date of that entry.
This is accomplished with a simple form based on the table of the newspaper.
In a subregion of the form, I would have an interactive report that shows to all those who have entered sort by date and time entry descendant who visited today is obvious.
I join the attendant to be able to use the interactive report to be able to select a particular line that could be recovered and placed in the main form to change (a bit like the model of interactive report with a link to a form where updates can be made.)
I can create the report form and the subregion and that seems to work very well for journal entries, but I don't have a clue as to how I would go on the use of the report for access to update data in the form section.
I would be eternally grateful if someone could point me in the right direction!
Is this something that is hard to do in Apex?
Thank you!
Mason
Masong says:
Is this too much to expect in Apex 5.01?
I have an application which records people entering an area.
The idea is to scan badges and save time and the date of that entry.
This is accomplished with a simple form based on the table of the newspaper.
In a subregion of the form, I would have an interactive report that shows to all those who have entered sort by date and time entry descendant who visited today is obvious.
I join the attendant to be able to use the interactive report to be able to select a particular line that could be recovered and placed in the main form to change (a bit like the model of interactive report with a link to a form where updates can be made.)
I can create the report form and the subregion and that seems to work very well for journal entries, but I don't have a clue as to how I would go on the use of the report for access to update data in the form section.
I would be eternally grateful if someone could point me in the right direction!
Is this something that is hard to do in Apex?
Not at all. Try to use the wizard to create a Page to create a form on a Table with report based on the table of the newspaper (choose Normal for page mode and Interactive for the implementation of the report). When finished, separate report and pages of form will have been generated. Go to the report page and copy the region interactive report on the page of the form. The report page can then be deleted if it is not required.
-
Mix of traditional and interactive reports fails the process of RESETTING of PAGINATION.
I have a tab page where I got 3 different reports REPORT_A (classic), REPORT_B (interactive) and REPORT_C (CLASSIC) in alphabetical order. I have a page to reset pagination process that will always draw (without condition) when you visit the page with the tab.
Reset pagination process that exists in the front scene of the header is set to fire but not to reset the interactive report. It affects the subsequent classic report REPORT_C as well. The REPORT_A would be reset paging very well since it exists before the interactive report. Is this a bug in apex?I created an application of demonstration of test with specific steps to reproduce the problem. The steps are on the demo site itself.
http://Apex.Oracle.com/pls/Apex/f?p=56638
SUP: testuser
P: passwordApex Version: 4.2.4.00.08
In my real application I wish a dropdownlist control on the page based on which I would like to filter the data. The dropdownlist control will have a corresponding branch of after-submit who will absolutely perfect pagination to reset & RIR. But when we visit Web site by tab the above problem would break the page.
I tried the solutions like gReport.search ('SEARCH') but that will only set the interactive report, not the classic REPORT_C. It's just a hack anyway.
Any ideas. ?
Hello
Create before that the process header on page 12 that calls APEX_UTIL. IR_RESET
Kind regards
Jari -
Bug? Interactive report includes the column excluded research
Apex 3.1
I've created an interactive report with a query that includes a 'expensive' column (a function call). To improve performance, I want to exclude this search/filter column.
I unchecked everything under "allow users to"... (filter) on the column attributes page. The column is no longer in the drop-down list under the microscope in the interactive report, but the column ("element_groups" in my example below) is always included in the SQL that is generated when the user makes a search via the "All columns" option (default):
In my view, the column should be excluded from "All columns" research when the column was set to prevent the user from filtering on it.select "CMPCODE", "CODE", "NAME", "SNAME", "ACCOUNTTYPE", "ELEMENT_GROUPS", count(*) over () as apxws_row_cnt from ( select * from ( select ae.cmpcode, ae.code, ae.name, ae.sname, ae.accounttype, string_util_pkg.join_str (cursor(select distinct grpcode from accounting_element_group where cmpcode = ae.cmpcode and code = ae.code order by 1), ',') as element_groups from accounting_element ae where ae.elmlevel = :p852_elmlevel ) r where ((instr(upper("CMPCODE"),upper(:APXWS_SEARCH_STRING_1)) > 0 or instr(upper("CODE"),upper(:APXWS_SEARCH_STRING_1)) > 0 or instr(upper("NAME"),upper(:APXWS_SEARCH_STRING_1)) > 0 or instr(upper("SNAME"),upper(:APXWS_SEARCH_STRING_1)) > 0 or instr(upper("ACCOUNTTYPE"),upper(:APXWS_SEARCH_STRING_1)) > 0 or instr(upper("ELEMENT_GROUPS"),upper(:APXWS_SEARCH_STRING_1)) > 0 )) ) r where rownum <= to_number(:APXWS_MAX_ROW_CNT) order by "CMPCODE","NAME","CODE"
The same problem is reported here:
Is this a bug? Fixed some 3.2 Apex? Apex 4? No work around?
-Morten
http://ORA-00001.blogspot.comHello
Yes, it is a known problem.
It seems that it is fixed on the Apex 4.0.2.00.06
http://www.Oracle.com/technetwork/developer-tools/Apex/application-express/402-patch-189110.html#CHDIHDIBKind regards
Jari -
UTF8 National characters in the reports of the APEX
Hello
We have a table of type NVARCHAR2 column (200), which contains characters russion (utf8).
It is stored and displayed correctly in our development tools.
However, in the reports of the APEX (Classic and IR), the values are truncated. It's the same thing when you make a SELECTION in the SQL workshop.
Once the setting (SELECT * FROM NLS_DATABASE_PARAMETERS):
PARAMETER VALUE NLS_NCHAR_CHARACTERSET AL16UTF16 NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CURRENCY $ NLS_ISO_CURRENCY AMERICA NLS_NUMERIC_CHARACTERS ., NLS_CHARACTERSET WE8ISO8859P1 NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD-MON-RR NLS_DATE_LANGUAGE AMERICAN
APEX Application is created by default, no globalization setting is changed.
Any ideas?
Best regards
Martin
-
How do the query select outer join to a report of the APEX
Hi all
I'm Ann.
I have a select statement that is used to calculate statistics for a month (October 2012 in this example)
Select ph.phase_number
sum ((case
WHEN ph.date_finished IS NULL or ph.date_finished > last_day (TO_DATE (' ' Oct 2012 ', ' MY YYYY' "))
THEN last_day (TO_DATE (' ' Oct 2012 ', ' MY YYYY' "))
Of OTHER ph.date_finished
END)
(-ph.date_started + 1) / count (def.def_id) as avg_days
Ph phase_membership
inner join court_engagement this on ph.mpm_eng_id = ce.engagement_id
join in-house defendant def on ce.defendant_id = def.def_id
where def.active = 1
and ph.date_started < = last_day (TO_DATE (' ' Oct 2012 ', ' MY YYYY' "))
and ph.active = 1
and UPPER (ce.court_name) LIKE '% '.
Rollup Group (phase_number)
;
The result is as below
Phase_Number AVG_DAYS
Phase One 8.6666666666666667
Phase two 14.6
Phase three 12
11.4615365
I have another list of selection mainly the list of months between two date value.
Select to_char (which_month, 'LUN YYYY') as display_month
de)
Select add_months (to_date (' ' August 2012 ', ' MY YYYY' "), rownum-1) which_month
of object
where
rownum < = months_between (to_date (' ' Oct 2012 ', ' MY YYYY' "), add_months (to_date (' ' August 2012", "MY YYYY"), - 1))
order of which_month)
The query result is as below
DISPLAY_MONTH
AUGUST 2012
SEP 2012
OCT 2012
Is it possible I can join these two select statement above to generate a comparable result:
Days of month Phase number Avg
August 2012 Phase One 8.666
Sep 2012 Phase One 7.66
Oct 2012 Phase One 5,66
August 2012 Phase two 8.666
Sep 2012 Phase two 7.66
Oct 2012 Phase two 5,66
August 2012 Phase three 8.666
Sep 2012 Phase three 7.66
Oct 2012 Phase three 5,66
Or
Days of month Phase number Avg
August 2012 Phase One 8.666
August 2012 Phase two 7.66
August 2012 Phase three 5,66
Sep 2012 Phase One 8.666
Sep 2012 Phase two 7.66
Sep 2012 Phase three 5,66
Oct 2012 Phase One 8.666
Oct 2012 Phase two 7.66
Oct 2012 Phase three 5,66
And it can be controlled by Phase number or month.
My other colleague suggested I should use a left outer join, but after having tried many ways, I'm still stuck.
I tried select is
Select a.display_month, b.* in)
Select to_char (which_month, 'LUN YYYY') as display_month
de)
Select add_months (to_date (' ' August 2012 ', ' MY YYYY' "), rownum-1) which_month
of object
where
rownum < = months_between (to_date (' ' Oct 2012 ', ' MY YYYY' "), add_months (to_date (' ' August 2012", "MY YYYY"), - 1))
order which_month)) a left outer join
(Select to_char (ph.date_finished, 'MY YYYY') as join_month, ph.phase_number)
sum ((case
WHEN ph.date_finished IS NULL or ph.date_finished > last_day (TO_DATE (a.display_month, 'MY YYYY'))
THEN last_day (TO_DATE (a.display_month, 'MY YYYY'))
Of OTHER ph.date_finished
END)
(-ph.date_started + 1) / count (def.def_id) as avg_days
Ph phase_membership
inner join court_engagement this on ph.mpm_eng_id = ce.engagement_id
join in-house defendant def on ce.defendant_id = def.def_id
where def.active = 1
and ph.date_started < = last_day (TO_DATE (a.display_month, 'MY YYYY'))
and ph.active = 1
and UPPER (ce.court_name) LIKE '% '.
To_char (ph.date_finished, 'MY YYYY'), group (phase_number) rollup) b
On a.display_month = b.join_month
but then I get an error
SQL error: ORA-00904: "A." "" DISPLAY_MONTH ": invalid identifier
I need to view a report on the APEX with option for people to download at least format CSV.
Already 1 inteactive report in the page, so I don't think adds another interactive report without using the iframe trick.
If any of you have any ideas, please help.
Thank you very much.
AnnHello Ann,.
Frank has done a very good job. I am also impressed.
Is in regard to your correction to his question, the problem is on this replacement you did
last_day(TO_DATE(am.which_month,'MON YYYY'))
AM.which_month is already a date type, and you don't need to convert it to this day.
Here is the correct way:last_day(am.which_month)
There are also sometimes with the data you've posted have no line for this month. So I also added a function NVL to display 0 under avg_days for these cases.
Here is my corrected query:
DEFINE startmonth = "Aug 2012"; DEFINE endmonth = "Oct 2012"; WITH all_months AS ( SELECT ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM-1) AS which_month , ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM ) AS next_month from all_objects where rownum <= months_between(to_date('&endmonth','MON YYYY'), add_months(to_date('&startmonth','MON YYYY'), -1)) ) SELECT TO_CHAR (am.which_month, 'Mon YYYY') AS month , ph.phase_number , NVL(sum ( (CASE WHEN ph.date_finished IS NULL OR ph.date_finished > last_day(am.which_month) THEN last_day(am.which_month) ELSE ph.date_finished END ) - ph.date_started + 1 ) / count(def.def_id), 0) as avg_days FROM all_months am LEFT OUTER JOIN a_phase_membership ph PARTITION BY (ph.phase_number) ON am.which_month <= ph.date_started AND am.next_month > ph.date_started AND ph.date_started <= last_day(am.which_month) -- May not be needed AND ph.active = 1 LEFT OUTER JOIN a_engagement ce ON ph.mpm_eng_id = ce.engagement_id AND ce.court_name IS NOT NULL -- or something involving LIKE LEFT OUTER join a_defendant def ON ce.defendant_id = def.def_id AND def.active = 1 GROUP BY ROLLUP(phase_number, am.which_month) ORDER BY am.which_month , ph.phase_number ; The output is: MONTH PHASE_NUMBER AVG_DAYS -------- -------------------- ---------- Aug 2012 PHASE ONE 0 Aug 2012 PHASE THREE 0 Aug 2012 PHASE TWO 0 Sep 2012 PHASE ONE 12 Sep 2012 PHASE THREE 1 Sep 2012 PHASE TWO 9 Oct 2012 PHASE ONE 8 Oct 2012 PHASE THREE 0 Oct 2012 PHASE TWO 14 PHASE ONE 11 PHASE THREE 1 PHASE TWO 11.5 9.71428571
I don't know if that's really what you want. In the case check it and let me know.
Kind regards.
Al -
How to move the form of interactive report on the left side to the right?
the Apex 4:
I write application in Hebrew, so I need to put in the page template dir = "RTL".
all report and button and point moving to the right, but
the stay of interactive report on the left side of the page (instead of right).
Does anyone have an idea how to change the location?
Thank you
Return on investmentHello
For the research on the copy of the side section right hand following the report in your HTML page header is on.
Graham
-
Is it possible to create a style sheet in the APEX?
Hi experts,
I'm in I'm in Oracle Enterprise Manager 11 g 11.2.0.1.0.
Is it possible to create a style sheet in the APEX of any version?
I want to create a style sheet and use APEX report column link to it.
Thank you.
CowWell, mine is about 4 000 lines of code to cover all of the tables in my database, so I have a separate procedure in the package for each table.
I'm going by calling a procedure doc_start that comes to generate the HTML page header, as follows:
PROCEDURE doc_start
');
IS
BEGIN
HTP.
PRINT)
'');
HTP. PRINT (')');
HTP. PRINT (')
HTP.
PRINT (')New system of mineral resources (NewMRDS) data ');
HTP.
Print(' ');
HTP. Print(' ');
HTP. PRINT (')');
HTP. PRINT (')');
END doc_start;Then I get calls to all other procedures for tables, then I just end with a doc_end procedure to add the required data for end to an HTML page:
PROCEDURE doc_end
IS
BEGIN
HTP. PRINT (')');
HTP. PRINT (')');
END doc_end;All basically, it's pretty simple, although a lot of time. The initial package of writing took me a whole day to write, and then I had to go back several times over the years to add some adjustments or other re-formatting.
Hope that this help put you on the right track.
-
How to display data in an interactive report on the form field?
Hello
I've created an interactive report with its form (goal to create and edit).
Then, I created a new project with its early date and email id that is assigned to the project.
When I clicked on the edit button, it opens the edit form and displays the same date, I entered but email id is not displayed.
Instead, it shows the default value of the e-mail ID LOV, which is "- select Email ID -"
How can I view the identification of email that I entered?
Thank you
GuyHello Guy,.
To discuss your design: why not store the PM_PERSON ID in the PROJECT table? Now, you store addresses several times (in PM_PERSON and in many PROJECT files), what happens if the email address change... (purely hypothetical, of course)...
And create a foreign key between the PROJECTS and PM_PERSON also...Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this response in marking it as useful or Correct ;-) -
The number of characters in the CLOB column is supported by the report of the APEX
Hello
Actually, I have a report of the Apex based on CLOB column, which includes data whose length exceeds 10,000 characters.
up to 10,000 characters, it works fine, but once it get records with characters more than 10 + lift
ORA-06502: PL/SQL: digital or value error: character string buffer too small
Thank you and best regards,
Ashish
2902196 wrote:
Please update your forum profile with a recognizable username instead of "2902196": Video tutorial how to change username available
Always include the information referred to in these guidelines when you post a question: How to get the answers from the forum
Actually, I have a report of the Apex based on CLOB column, which includes data whose length exceeds 10,000 characters.
up to 10,000 characters, it works fine, but once it get records with characters more than 10 + lift
ORA-06502: PL/SQL: digital or value error: character string buffer too small
The maximum size of a column report CLOB value is 32 KB. However, the maximum size for the content of the line of the full report is also 32 KB (including the HTML markup), so you can be hitting this limit because of the size of your 10 K CLOB data + the rest of the line.
According to the database character set and the characters which that contains data, the character encoding may use more than one byte to represent a character.
-
I created an interactive navigation along the animated and imported and that the muse.
Animations works very well, but does not have the interactivity.
((par exemple si je clique sur le "bouton à la maison", que le site ne s'ouvre pas dans mon navigateur comme il se doit),)
Anyone have an idea how I can fix this problem?Hello
As you use the edge with muse file you do not put the full URL.
Please try the code below.
Window.Open("..) /.. /arbeiten.html","_top");
Concerning
ViveK
-
Hi all
I have an element on the page "Target_date". I want to create a new element that displays the number of days left or late (based on target_date - sysdate).
but I don't know how to create a new item in the apex and apply this calculation. Could someone help me please?Hello
lets say we have two elements: P1_NUMBER_ONE and another article: P1_SUM
the result of P1_SUM is a difference in value P1_NUMBER_ONE and sum...
now, please go to: P1_SUM and open source...
now on the source, there is a calculation of calculation of post which is where the calculation will be made for the calculation of your date:
You can use a function here to do your calculation of post for the result P1_RESULT as item:
function (: P1_SUM);
and he gives a result... to change logic to date now...hope it helps and is what you are looking for...
Concerning
Alex Noel, Makumuli,
Tanzania -
How to create a session variable in the Apex?
Hello dear colleagues,
Is there a person know how to create a session variable in the Apex?
How to get them?
Thank you
Best regardsHello
No problem, PS don't forget to mark messages as 'useful' or 'correct', if you did infact find them useful or correct ;)
John.
--------------------------------------------
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd -
Y at - it all in option built in the apex to select the download icon...
Hello
While we try download the report file region where the format will be in the form of table.
In this sceneria, we have two columns ID, name...
We want an icon instead of a link...
Y at - it all in option built in the apex to select the download icon...
David...Hi David,
I'm glad to hear that!
As long as you have some other questions about downloads of files, can report you a message as useful or Correct, then mark this thread as a response.
Thank you
Andy
Maybe you are looking for
-
Application of the program for Dell A940 printer compatibility
I can't get my printer Dell A940 installed. I tried to download on the net and also the installation via the CD supplied with the printer. What I am doing wrong?
-
What is "USRpbdA.exe" and what is it for?
On another machine of my friends, I get a message that failed. I get this message when I shut down the computer in question.
-
Breakpoints do not work in JDE 4.7
Breakpoints do not seem to work in JDE 4.7. Tried to do a clean rebuild of the project. No change. Ran clean.bat, then made another clean generation. Still no change. Breakpoints do not work. Any ideas anyone?
-
Other issues of activation after 2 years?
Hello, I really hope that a representative Windows sees this because at this point I'm so sick of your services, I'm about two seconds away from snapping. First of all, let me start by saying I have experienced this problem before. 2 years ago my leg
-
A short demonstration of my problem, it's typshould reaed as it came out like that. It was typed and should read but caame out like this (note the double one.) I have a Dyslexic computer?