Functions running in the reports.
Hello. I have a report that runs a function within a function. For example, GET_EQUIPT_COUNT_FINAL_2010 is called in a report. In GET_EQUIPT_COUNT_FINAL_2010, another function (* GET_EQUIPT_COUNT_2010_X *) which returns a true no is executed. When GET_EQUIPT_COUNT_2010_X is run separately in SQL plus, the exit returns a specific real don't. say - 3. GET_EQUIPT_COUNT_FINAL_2010 is executed within a report and returns a value of say 5. If I place an equation in GET_EQUIPT_COUNT_FINAL_2010 as return value of GET_EQUIPT_COUNT_FINAL_2010 must be the original return value (5) over the return value of GET_EQUIPT_COUNT_2010_X (-3), which should give me a value of + 2. The resulting out put is + 5. It does not seem to recognize the value of GET_EQUIPT_COUNT_2010_X. Why is it so? I hope you get this. It's a little hard to explain. Thanks for the help. Here is my function below:CREATE OR REPLACE FUNCTION SPM_IS.*GET_EQUIPT_COUNT_FINAL_2010* (V_CUTOFF_FROM IN VARCHAR2, V_CUTOFF_TO IN VARCHAR2, P_GRID IN VARCHAR2, P_REGION IN VARCHAR2, P_ACC IN VARCHAR2, P_DISTRICT IN VARCHAR2, P_BRANCH IN VARCHAR2, P_CLASSIFICATION IN VARCHAR2, P_VOLTLEVEL IN VARCHAR2, P_EQUIPMENT IN VARCHAR2) RETURN NUMBER IS PRAGMA AUTONOMOUS_TRANSACTION;
NUMBER OF V_COUNT: = 0;
V_TOTAL_COUNT NUMBER: = 0;
V_CUTOFF VARCHAR2 (11);
NUMBER OF V_LOOP_DAY;
REAL V_FUNCTION;
BEGIN
V_CUTOFF: = V_CUTOFF_FROM;
V_LOOP_DAY: = TO_DATE (V_CUTOFF_TO, ' DD/MONTH/YYYY') - TO_DATE(V_CUTOFF_FROM, 'DD/MON/YYYY') + 1;
FOR V_LOOP IN 1.V_LOOP_DAY
LOOP
GET_EQUIPMENT_COUNT_A* (V_CUTOFF_FROM, V_CUTOFF_TO, P_GRID, P_REGION, P_ACC, P_DISTRICT, P_BRANCH, P_CLASSIFICATION, P_VOLTLEVEL);
SELECT COUNT (1)
IN V_COUNT
Of
(SELECT A.trans_code, A.transformer, A.DATE_COMMISSION, A.DATE_DECOMMISSION, A.CLASSIFICATION,
SUBSTR (S.SUBSTATION_CODE, 1, 1) GRID, SUBSTR (S.SUBSTATION_CODE, 2, 4) REGION.
SUBSTR (S.SUBSTATION_CODE, 6.4) DISTRICT, S.ACC_CODE, S.BRANCH_CODE
FROM (SELECT *)
OF SPM_COUNT_TEMP_TRANS_A
), SPM_SUBSTATIONS S
WHERE A.SUBSTATION_CODE = S.SUBSTATION_CODE
)
;
V_TOTAL_COUNT: = V_TOTAL_COUNT + V_COUNT;
V_CUTOFF: = TO_CHAR (TO_DATE (V_CUTOFF, ' DD/MONTH/YYYY') + 1, "MON/DD/YYYY");
DELETE FROM SPM_COUNT_TEMP_TRANS_A;
END LOOP;
COMMIT;
V_TOTAL_COUNT: = V_TOTAL_COUNT + GET_EQUIPT_COUNT_2010_X* (V_CUTOFF_FROM, V_CUTOFF_TO, P_GRID, P_REGION, P_ACC, P_DISTRICT, P_BRANCH, P_CLASSIFICATION, P_VOLTLEVEL, P_EQUIPMENT);
RETURN (NVL(V_TOTAL_COUNT,0));
END GET_EQUIPT_COUNT_FINAL_2010; *
Published by: 829713 on January 19, 2011 23:34
Thanks Inol. I saw the problem already. Thanks for the tip on the dbms_output.putline. The function worked fine, the problem is that the result of the V_COUNT is the total number of equipment for the duration. What I wanted was to subtract the 'everyday' number of the material. So what happened was even if 2 has been subtracted from V_COUNT, whose value is 465, the resulting value divided by 31 days is also 15 during the flare, is why it shows an incorrect value. What I wanted was 13. I hope you get my point. Thank you much for the help. Until the next time.
Tags: Oracle Development
Similar Questions
-
Execute function javascript from the report interactive link (link).
Y at - it anyway to run the javascript function in the interactive report.
My (link) column is set to display an icon.
What I tried, is to use the URL as target and problem with the correct syntax to call the javascript function here.
I tried javascript:alert("test"); in the URL - it does not work.
Any suggestions?
Thanks in advance
RobertHi Robert,.
You can use "(double guillemets) in JavaScript, but for some reason any apex is love them not in the URL field"
{code}
JavaScript:Alert('test');
{code} -
Add Total running to the report of the Group
Hello
I have the following sql for a report (date_booked is of type varchar)
SELECT TO_CHAR (TO_DATE(date_booked,'dd.mm.yyyy'), 'MM') month_booked, sum (costs)
Of ang_project_costs
TO_CHAR Group (TO_DATE (date_booked, 'dd.mm.yyyy'), 'MM')
order by to_number (TO_CHAR (TO_DATE (date_booked, 'dd.mm.yyyy'), 'MM'))
I want to display a running total for each month
Can you please indicate
Concerning
Gus
Hello
Did you mean something like below.
SELECT month_booked, total, SUM (total) OVER (ORDER BY ROWNUM ASC) Running_Total FROM (WITH ang_project_costs AS (SELECT SYSDATE AS date_booked, 10 AS costs FROM DUAL UNION ALL SELECT SYSDATE - 30 AS date_booked, 20 AS costs FROM DUAL UNION ALL SELECT SYSDATE - 60 AS date_booked, 40 AS costs FROM DUAL) SELECT TO_CHAR (TO_DATE (date_booked, 'dd.mm.yyyy'), 'MM') month_booked, SUM (costs) total FROM ang_project_costs GROUP BY TO_CHAR (TO_DATE (date_booked, 'dd.mm.yyyy'), 'MM') ORDER BY TO_NUMBER ( TO_CHAR (TO_DATE (date_booked, 'dd.mm.yyyy'), 'MM')))
Kind regards
Cool
-
Manually created the report runs is not on weblayout
Hello
I've created a report manually the 10g report, that the report runs on layout paper but when I try to run the report even using the button run on the Report Builder displays blank page any idea which must be defined with a manual report to run it on the web. I saved the report as JSP and rdf, but the two produced no out put.Hello
The layout web (in other words, the web source) is mainly used for the format .jsp for more flexibility via the web for web developers using Oracle reports.
Only reports created in Report Builder 9i or higher using the report wizard and choosing "Create Web Layout only" or "create of Web and paper Layout.
contains a code Source base of 'Web' which is the source for the web page layout. In 9i reports, reports created manually: without using the
Report Wizard - will also have a blank web page layout, unless you add your own code in the Source of "Web". Moreover, you will not have a web layout for all
reports migrated from reports 6i like web layouts have been introduced only in reports 9i. What the report is not in an earlier version or version is not
will be generated in the new version or version.You will need to add your own code to the 'Web Source"so that whatever it is, to display in the web page layout. In addition, changes made to the
Print layout will cross to the Web layout by confirmation with the development. You can use the rw: include the tag in the Web Source (see Help)
to get some of the print layout in your web page layout.Alternatively, you can still perform the following with reports Oracle 9i or higher and the RDF to view the layout of document on the web you have
in the past with Oracle Reports 6i: http//webserver.domain:7779/reports/rwservlet?report=test.rdf&destype=cache&desformat=pdf&userid=scott/tiger@dbI hope this helps.
Kind regards
AlexIf someone useful or appropriate please mark accordingly.
-
Hallo,
I have a problem to save the report file in a new way.
In my code, I used the Runstate.Report.Save(newpath, overwrite, 0) method to save the report.
And after the excution of the test, I can find the file of report in the right place, but if I open it, it's empty, I mean, there's nothing in this report.
Someone has an idea? Where is the problem? And what I could do?
Thank you!
Cabio
Hi Cabio,
Before answering your question, I would like to let you know that you can configure the path to the report file in the report file path tab report options. You can choose from several options, including by specifying an expression that is customized for the report path. This will allow you to customize where the report is saved without changing code.
If this isn't meeting your needs, the problem you're likely to have is that you access report until the report is actually produced. To access the report object after it has been populated, replace the ProcessCleanup callback, which runs after the report has been generated. (see the example of navigation PreUUTCallback for an example of substitution of a reminder.
Note: if you use TestStand 2012, this method will not work unless you configure Report Builder for not using a new thread. You can configure this option in the treatment of dialogue by selecting the checkbox options more results. If you do not want to use a new thread, you can access the report by changing the sequence of AddUUTReportAndSave in ReportGen_ATML.
-
I have a page that has 3 regions.
Region 1: Chart with animation
Region 2: Report1 with a link to Report2
Region 3: I2
Currently, if I click on the link to Report1, and then the page is sent and I2 is updated, as well as the graph.
Ideally I would click the link to Report1 and up-to-date data in Report2, without refreshing the page, IE, the table is not updated.
I tried to play with partial page refresh, but cannot make it work.
I have a workspace on oracle [http://apex.oracle.com/pls/apex/f?p=4550:1:]
Workspace: GUSCRIGHTON
Usernane: ANGUS. [email protected]
Password: terminator
Request 33310 GUS_TEST
Page 43
Thanks in advance
GusHello Gus, c.
Check your application in the workspace, if the feature works or not?
What I did is:
Writes a javascript function in the header of the region region of employees to refresh the region:
Writes a javascript function in the HTML Page header of your page:The above function is an AJAX call that calls an application process: the SET_ITEM_VALUE that does nothing.
But the line of code:ajaxRequest.add('P43_SHOP_ID',parseInt(p_shop_id));
Adds a parameter to the AJAX request that sets the value of the element for the P43_SHOP_ID element.
After the completion of the AJAX call to the line of code:EmployeesRefresh();
calls the function to refresh the report used.
Finally changed the link in the column to the column SHOP_ID report details of the shop:
Target : URL
URL :javascript:f_set_shop_id('#SHOP_ID#');
I checked the above features on Mozilla Firefox 11.0.
I hope that helps!
Kind regards
Kiran -
Get the name of the report file in oracle running Report Builder
Dear all,
Is it possible to get the name of the report file in oracle running Report Builder?
for example, "HR_REP012. REP.
I need to this very important...
Kind regards
Yousef
Published by: Yousef_m on June 2, 2012 05:18Hello
Have you tried the builtin SRW. Built-in GET_REPORT_NAME?
Example of
function boolean return AfterPForm is
my_variable varchar2 (80);
BEGIN
SRW. GET_REPORT_NAME ($my_var);
SRW. MESSAGE (0,' report Filename = ' | my_variable);
RETURN (TRUE);
END;Concerning
-
Run the report to PL/SQL with the branch to another page
I have an application which, at various times, I run a PL/SQL procedure to perform an action, and then we must run a report while also navigating away from the current page. The actions are performed on a button click.
I tried several methods, but for the life of me cannot get the system to do the two things (ie. run the report and the direction to another page). I tried to put in page 0 (to be executed after the treatment on the click of a button) a branch with a request line to print the report, followed by a branch to the other page (also to run after the treatment on the button click) - and only the branch page 0 runs in fact. Also tried a branch to the other page only, with the print in the request parameter request - but only runs the report, do not create a branch to the other page.
I also tried to put the call to run the report in the PL/SQL code, using utl_http.start_request (url), but that came with a "Bad Request" error. Also tried to use the owa_util.redirect_url call, but also no chance.
I'm pulling my hair out at this time, especially because I am under pressure to get the system in very short time.
Any suggestion would be appreciated.You can run queries report of their URL (f? p = & APP_ID.: 0: & SESSION.: PRINT_REPORT =
) So one approach would be to
The button click, call a JS function which
- 1 use the Ondemand/recall process in order to perform the processing workflow (file selection box)
- 2 open the report in a popup (from your IR page)
- 3 redirect leaves the IR page to another page?
------
Another approach:
- 1. IR report submits the page
- 2. in the PLSQL block, you do the treatment
- 3. the branch redirects to a URL that would point to the report URL.
OR
- 3. do you have a JS onload which runs only when demand is demand for BUTTON and opens a page that points to the report.
------Still another way is to use htp.p in PLSQL block which made the treatment of workflow
So your code PLSQLBEGIN --Do the workflow processing here --End workflow processing htp.p(''); END;
- 1 use the Ondemand/recall process in order to perform the processing workflow (file selection box)
-
Function that return the name of the current report
Hello
Anyone know if there is a function that returns the name of the current report?, similar to GET_APPLICATION_PROPERTY (CURRENT_FORM) in the forms.
Tnks,
LEFMHello
You can use the builtin: SRW. GET_REPORT_NAME
This function returns the file name of the running reporthttp://www.Oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/PLSQL/builtins/SRW/srw_get_report_name.htm
NOTE: it is not the name of the RDF file. Is the name defined in the reporting name property.
Concerning
-
Automated for the function name print OR-report
Hello
I use NEITHER-report, using the function NIReport_Print, I noticed that I still need to choose my file name.
I want to put a var lets say:
reportFileName Char [256];
in the app, I'll put reportFileName and I want the report to save automatically to a folder using the file name, it is possible using EITHER report?
I searched a function to do, as we have excellent report but I could not find...
Hello
I think you are trying to print to a PDF printer.
In this case, it's the PDF printer asking for the directory and file name to save the PDF file, no report - NOR.
NEITHER report could not save the report as a file by itself.
You must find a PDF printer, which has a kind of automation.
Personally, I use BullZip PDF Printer that allows you to change the settings via the command line parameters.
Hope this helps,
-
Can run us javascript function locally within the amx page?
Hello
I am totally new to the features of the MAF, let me just 1 thing right, im familiar with the implementation of javascript as on PHP. For example, (1) you can create a js file in a certain directory of your project as long as you can connect properly. And, on the php page, you link such as)
<script type="text/javascript" src="file.js"></script>)to be of use inside of your php page or (2)locally run the javascript function inside your php page such as
function myFunction(){
Alert("Hello World.");
}.So far what I've done on the tutorial javascript MAF, same case, you need to specify your javascript function inside a .js file and save your js file in your maf function (so that the javascript functions are available and can be called through the java method of AdfmfContainerUtilities.invokeContainerJavaScriptFunction () inside your file of java bean managed). After that, in my case to test the tutorial, I need to create a managed bean method to call the associated javascript function based on my actionlistener to the button that ive created inside my amx page, it didn't work (NOTHING HAPPENED when the button is clicked, as maybe it's because I was wrong by calling the managed bean method or class({viewScope.popupHelperBean.onPopupShowHideAction}). )
Please follow this tutorial to understand what im referring to topic-> https://blogs.oracle.com/mobile/entry/how_to_open_and_close
(If someone has already managed to made this javascript tutorial, please inform me so that I can see on my error).
Now I'm trying a different approach which is to run the javascript locally, it's just that I don't have enough resources that could satisfy my investigation to start with. I met this amx: verbatim terms during my research. Fact amx: verbatim help by running the JavaScript locally.
Thanks in advance.
Hello Amey,
Thanks, I had run successfully the popup alert box based on javascript this tutorial you had linked to me, it seems that I am on the right track on how to run javascript on the page of the amx. Its just that the tutorial I mentioned on my post doesn't seem to work as it should, I'll try to resolve the issues for a while. I just want to share with the community who are new to the MAF and are currently working on the custom javascript on page amx application:
1. include your js inside your working directory file
2. Add the javascript code that is personalized to your AMX
3. create a managedbean and a method that could call the javascript function
Carefully follow this tutorial as mentioned by Amey have the idea of how the javascript is running on amxpage--> https://blogs.oracle.com/mobile/entry/invoking_custom_javascript_from_an
By the way, thank you very much Amey.
Learner90
-
I have installed Oracle Forms 12 c:
There are a few questions (problems) in the configuration after the installation:
1. I need NLS_LANG value CROATIAN_CROATIA. EE8MSWIN1250. Text and the fields displayed are displayed correctly (all that is displayed from database), but their guests and the menu is displayed incorrectly (wrong characterset).
2. when the report is started from form, instead of run from port 9002 (report server), it runs from port 9001, so I need to manually change the url to view the report.
3. I don't know how to define a subset of PDF (in the previous version, just edit uifont.ali and put the subset inside).
4. how to start Report Builder?
For me, after you apply this hotfix, pdf subsetting works very well. (Linux x 64 environment).
Concerning
-
FRM-41214: cannot run the report during the call to the reports
Hi all,
I work with Forms 10g on Windows 7 (local working with OC4j), I have a form with a button calling a report, it's the code for the button:
declare
Repid REPORT_OBJECT;
v_rep VARCHAR2 (100);
rep_status VARCHAR2 (20);
BEGIN
Rep: = find_report_object ('EMPS_BY_DEPTS');
SET_REPORT_OBJECT_PROPERTY (REPID, REPORT_EXECUTION_MODE, batch);
SET_REPORT_OBJECT_PROPERTY (REPID, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY (REPID, REPORT_DESFORMAT, 'pdf');
SET_REPORT_OBJECT_PROPERTY (REPID, REPORT_DESTYPE, cache);
SET_REPORT_OBJECT_PROPERTY (REPID, REPORT_SERVER, 'repetat');
SET_REPORT_OBJECT_PROPERTY (REPID, REPORT_OTHER, 'paramform = no');
v_rep: = RUN_REPORT_OBJECT (repid);
rep_status: = REPORT_OBJECT_STATUS (v_rep);
While rep_status in ('MARKET', 'OPENING_REPORT', 'PENDING')
LOOP
rep_status: = report_object_status (v_rep);
END LOOP;
IF rep_status = "FINISHED" THEN
WEB. SHOW_DOCUMENT ('/ reports/rwservlet/getjobid ': substr (v_rep, InStr(v_rep,'_',-1) + 1) |'?) "|' server = repetat","_blank"); "
ON THE OTHER
message ("error when running report");
END IF;
END;
I create a report object in the browser of the object with the name ""EMPS_BY_DEPTS "with properties " filename = emps_by_depts.rdf.
I also have a server with the command server = repetat wserver report
When I press the button to call the report I get this famous 41214 FRM: cannot run the report.
I tried running the report with rwservlet: http://acer-pc:8889/reports/rwservlet?report=emps_by_depts.rdf & userid=hr/hr@orcl & desformat = pdf & destype = hide & expiry =...
and it works very well.
Any idea and thank you
I do in this case,
1 - i run report with parameterform = YES (Note: your report is not a form of parameter), so I can see explanation real error report.
2 - showjobs of report server options
We use the 11g r2, for 11g r2 reports this link http://
: 9002/reports/rwservlet/showjobs? = RptSvr_ , so I can't see error detail._asinst_1 server10g should be that this option absolutely. but I don't know.
These can help you.
Best regards.
-
Call javascript function when select all is checked the report
Hi Experts
Ive a tabular manual from query below
SELECT Apex_item.checkbox (1, ID, 'onclick = enableButton ()') select, a, b, c of table
By choosing 1 or more checkbox individually, enableButton() is called, and works very well as expected
However when select all is done, I do not know how to call the same function
Position of column select is: < input type = "checkbox" onclick = "$f_CheckFirstColumn (this)" / > (topic is a checkbox, check, selects all rows in the report) "
I tried: < input type = "checkbox" onclick = "$f_CheckFirstColumn (this)" onclick = "javascritp:enableButton(); "/ >. It does not help
Is it possible to call the function when select all is checked?
Thank you
Archana
I changed the title of the
This solved my problem.
Thank you
-
What is the best way to run the report of jasper in the ADF Applications?
Mr President.
What is the best way to run the report of jasper in the ADF Applications?
Concerning
Tender Hello,
Check out these links
Sameh Nassar: Using Jasper report in Application of ADF (detailed)
Maybe you are looking for
-
How to get bookmarks on Aurora to be the same for different users on the same computer?
When different users on my macbook login, I wan tehm all see the same configuration and saved bookmarks for Aurora. How can I do that. Trying to export from one setupproperly seemed to be the right thing to do. But when importing, there was too much
-
Is it possible to combine the profiles of two different computers?
I have tons of favorite links and toolbars on both computers. I want to start using one of them and want to combine all the bookmarks, etc.. Is there a way to do this?
-
Satellite M30 will not battery run
My Satellite M30 will work no longer battery. The battery is charged to 100%, but if you unplug the power outlet, the pc just shuts. I could try to remedy this?
-
Notice of update of Sprint has just delivered! Download update.
Anyone else get the update notice?
-
Cannot restore the system and can not get online with Windows Vista
Original title: bought a hp with vista system has never worked right This system came without a disc I way to restore the system never worked, restore now int exp problems was trying to correct but are unable to online this vista system has no access