Additional fields in report for form with report
Hello,
I got the problem, that I want to create a form with report where the form only changes the values of one table but the report is also using additional fields linked from another table. If I take a view with all fields for my form with report, the form is about all fields and not only about those from the first table. So is there a way to have another table linked to the form than to the report and get a link between them by a key?
I hope that someone has got a great idea and can help me solving this.
Thanks
Jochen
Jochen,
you can create a form with report on the view and afterwards you change the SQL-query into a query on the view. Take care that the original column names remain the same. You get your extra columns in the report and your link to the form remains,
good luck,
DickDral
Similar Messages
-
ORA-00933 - Error in PL/SQL for Form with report.
Hello,
I am getting this error :
failed to parse SQL query:
ORA-00933: SQL command not properly ended
and my PL/SQL function body returning SQL is as follows:
Declare
q varchar2(32767);
w varchar2(4000);
v_total varchar2(10);
Begin
v_total:='TOTAL' ;
q:=' SELECT ASR_DB_CLIENT.CLIENT_NAME, ';
q:=q||' ASR_DB_OIS.ACCT_NAME, ';
q:=q||' ASR_DB_OIS.ACCT_NBR, ';
q:=q||' ASR_DB_OIS.INCEPT_DT, ';
q:=q||' asr_db_prod.MKT_CODE, ';
q:=q||' asr_db_prod.asst_clss, ';
q:=q||' ASR_DB_OIS.PROD_CODE, ';
q:=q||' ASR_DB_OIS.GROUP_CODE, ';
q:=q||' ASR_DB_PLAN.TAX_STAT, ';
q:=q||' asr_db_clnt_type.clnt_type_name, ';
q:=q||' asr_db_plan_type.plan_type_name, ';
q:=q||' ASR_DB_OIS.ACCT_type, ';
q:=q||' ASR_DB_PLAN.CNTRY_CODE, ';
q:=q||' ASR_DB_OIS.DISCRET_FLAG, ';
q:=q||' ASR_DB_OIS.ASST_BAL ';
q:=q||' FROM ASR_DB_OIS, ASR_DB_PLAN, ASR_DB_CLIENT, ASR_DB_PROD, ';
q:=q||' asr_db_plan_type, ';
q:=q||' asr_db_Clnt_type ';
q:=q||' WHERE';
q:=q||' ASR_DB_OIS.PLAN_ID = ASR_DB_PLAN.PLAN_ID and ';
q:=q||' ASR_DB_OIS.as_of_dt = ASR_DB_PLAN.as_of_dt and ';
q:=q||' ASR_DB_PLAN.CLIENT_ID = ASR_DB_CLIENT.CLIENT_ID and ';
q:=q||' ASR_DB_OIS.as_of_dt = ASR_DB_CLIENT.as_of_dt and ';
q:=q||' asr_db_ois.prod_code = asr_db_prod.prod_code and ';
q:=q||' ASR_DB_PLAN.plan_type_code = ASR_DB_PLAN_type.plan_type_code and ';
q:=q||' ASR_DB_Client.clnt_type_code = ASR_DB_clnt_type.clnt_type_code and ';
q:=q||' ASR_DB_OIS.AS_OF_DT = :p99_asofdate ';
IF :P2_ROLLUPSLEEVE = 'RU'
THEN
q :=q||' and ASR_DB_OIS.PARENT_OIS_ID is null ';
Else
q :=q||' and ASR_DB_OIS.ACCT_TYPE like "%"'||v_total||'"%" ';
q :=q||' and ASR_DB_OIS.PARENT_OIS_ID is not null ';
END IF;
return q;
end;
Why this is failing ?
Is "%"'||v_total||'"%" '; incorrect ?
P2_ROLLUPSLEEVE is a radio button.
Please advise....
Thanks,
HMAnd
Also, I get the following error when I try few other things like
q :=q||' and ASR_DB_OIS.ACCT_TYPE = '||v_total||' ';
or
q :=q||' and ASR_DB_OIS.ACCT_TYPE = "||v_total||" ';
failed to parse SQL query:
ORA-00904: "TOTAL": invalid identifier
And
ORA-06550: line 43, column 41: PLS-00103: Encountered the symbol "TOTAL" when expecting one of the following: * & = - + ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ between || member SUBMULTISET_ The symbol "* was inserted before "TOTAL" to continue.
When I try
q :=q||' and ASR_DB_OIS.ACCT_TYPE = "'TOTAL'" ';
Any helpful tips will be much appreciated.
Thanks,
HM -
Form with report, update field in the form = field is not updated in table
Hi,
I have a form with report. On Primary Key in the report is a link to the form. I select one row in the form by choosing the link in the report. Then I update a field in the form and press "Save". I see the success message "Action processed" and I'll be back in the report. I see the field in the report with it's old content. It is not updated. I don't understand why. Can anybody help me?
Thanks DanielaDaniela,
Is the form field source set to the proper database column? It's either not properly defined or your Save button and the builtin update process have somehow become disconnected. Check to make sure that the Save button is set to perform an Update in the database operations setting.
Earl -
Date Validation problem in form with report
Hi,
I am stuck on this date validation issue in a form with report that I am working on-
I have an Active_date_start and an Active_date_end field. I want to validate the form in such a way that if the user enters the Active_date_end < active_date_start then it should error out appropriately asking to change the active_end_date . Also another problem is that the changes are made to the active_date_end they should reflect in the table. How do I accomplish this.
Appreciate all the help offered.
Thanks.Hi,
Thanks for the code.Now the APPLY CHANGES works fine except that it throws an error when I change the end date to a date which is less than the start date . So it does show me my error and does not go further but also shows me the error -
Invalid PL/SQL expression condition: ORA-06550: line 1, column 29: PLS-00306: wrong number
or types of arguments in call to 'NVL' ORA-06550: line 1, column 7: PL/SQL: Statement
ignored Invalid PL/SQL expression condition: ORA-06550: line 1, column 29: PLS-00306:
wrong number or types of arguments in call to 'NVL' ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
I looked up the error number and it says its a generic error type where the error can be found on the line number specified. But in this case how and where do I look for the error line?. This is the code I am using-
DECLARE
vACTIVE_DATE_START DATE;
vACTIVE_DATE_END DATE;
BEGIN
vACTIVE_DATE_START := TO_DATE(:P4_ACTIVE_DATE_START, 'DD/MM/YYYY');
vACTIVE_DATE_END := TO_DATE(:P4_ACTIVE_DATE_END, 'DD/MM/YYYY');
IF vACTIVE_DATE_END < vACTIVE_DATE_START THEN
RETURN 'End date is before start date';
ELSE
RETURN NULL;
END IF;
END;
My base table has the active_date_start as NOT NULL. Now I have the exact same code for APPLY CHANGES
in other form and it works fine not giving the above error. I am at a loss to know how I can get rid of the error.
Any suggestions!.
Thanks in advance,
A -
Report for material with sloc,qty available, and production order
hi friends, i need advice on getting this report for material with qty and specific sloc with the corresponding Prodn order numbers. in mb51 i could get all these details except the prodn order no. could you advice me please?
to make sure you know how to do this.
In the material document list, hit "Ctrl+F8" on your keyboard.
A window will pop up. Click on the button position and look for "order" in the list of available fields. That should do it.
Rgds. -
Form with report, where some items in the form have been given values.
Hi, greetings:
I have a question that maybe silly but annoying to me. I need to provide a form with report, where some items in the form have been given values automatically, and these items (display only) are supposed to show given values in the form automatically.
I used the APEX form with report. The update and delete worked well. But I cannot show automatic values when insert. By default APEX insert form makes every item null; I tried to give value for two items: P5212_USERKEY, P5212_DAILY_VER_DATE with process before header, after header, after regions and before footer, and computation, or set values of these two items in the branch when user hit create button (submit). It never worked out, the two items always displayed null value, and when I insert, I got "ORA-01400: cannot insert NULL into ("TBSBI"."DAILYVERPRODNOTE"."USERKEY")", since I have set up constraint in database that these two columns should not be null.
Could anyone help on this? any suggestion would be appreciated.
SamIf you have made these values 'Display Only' they would by default not save the session state. Accessing the page items will always return NULL. Did you change the 'Save Session State' option to 'Yes'?
-
Image upload in Form with Report
Hello
I have created a table FA_CUST_DTL
Column Name Data Type Nullable Default Primary Key
CUST_ID NUMBER No 1
CUST_NAME VARCHAR2(1000) Yes
CUST_ADD VARCHAR2(4000) Yes
MOBILE NUMBER(12,0) Yes
PHONE VARCHAR2(15) Yes
EMAIL VARCHAR2(100) Yes
SIGNATURE_IMAGE BLOB Yes
MIMETYPE VARCHAR2(200) Yes
FILENAME VARCHAR2(400) Yes
IMAGE_LAST_UPDATE DATE Yes
Then i created a page Form With report with the trigger . After Browsing , images are not showing in my report.
Can u tell me any idea abt it plz help me its urgent for me.
Regards
GeetIf you need to control height and width of your uploaded images, then you must use the APEX_UTIL.GET_BLOB_FILE_SRC function. Please refer to this documentation:
[http://download.oracle.com/docs/cd/E10513_01/doc/apirefs.310/e12855/apex_util.htm#AEAPI129] -
Rep-52005 error when running a report from form with parameter form
I am trying to run a report from a web deployed form and this report has a parameter form. I am getting a Rep-52005: The specified key report does not exist in key map file.
I am using Oracle Forms/Reports 10.1.2.0.2. My code is below. The first part works fine where I run a report with no parameter form, but the second part when I have a parameter form gets the about error.
PROCEDURE call_report (
p_report_name VARCHAR2,
p_reportobj_name VARCHAR2 DEFAULT NULL,
p_parameter_list paramlist DEFAULT NULL,
p_parameter_string VARCHAR2 DEFAULT NULL
IS
repid report_object;
v_rep VARCHAR2 (100);
rep_status VARCHAR2 (100);
v_report_url VARCHAR2 (240);
v_interface VARCHAR2 (50);
v_report_parameter VARCHAR2 (1);
vc_user_name VARCHAR2 (100);
vc_user_password VARCHAR2 (100);
vc_user_connect VARCHAR2 (100);
vc_connect VARCHAR2 (300);
v_reportserv VARCHAR2 (30);
v_job_number number;
BEGIN
/* Get the database to run the report against and
find out if the report has any parameters */
SELECT report_parameter_flag
INTO v_report_parameter
FROM program_list
WHERE program_type = 'REPORTS'
AND UPPER (screen_id) = UPPER (p_report_name);
vc_user_name := get_application_property (username);
vc_user_password := get_application_property (password);
vc_user_connect := get_application_property (connect_string);
v_reportserv := 'rep_xxxx_ias10g_home';
v_report_url := 'http://xxxx.state.il.us';
v_job_number := length(v_reportserv) +2;
vc_connect :=
vc_user_name
|| '/'
|| vc_user_password
|| '@'
|| vc_user_connect;
v_interface := get_application_property (user_interface);
IF ( v_interface = 'WEB'
AND v_report_parameter = 'N'
THEN
repid := find_report_object(p_reportobj_name);
set_report_object_property (repid, report_comm_mode, synchronous);
set_report_object_property (repid, report_destype, cache);
set_report_object_property (repid, report_desformat, 'pdf');
-- v_reportserv := get_report_object_property (repid,report_server);
set_report_object_property (repid, report_server, v_reportserv);
set_report_object_property (repid, report_other, p_parameter_string);
v_rep := run_report_object (repid);
rep_status := report_object_status (v_rep);
IF rep_status = 'FINISHED'
THEN
web.show_document (
v_report_url
|| '/reports/rwservlet/getjobid='
|| substr(v_rep,v_job_number)
|| '?server='
|| v_reportserv
,'_blank'
ELSE
message ( rep_status
|| 'Report output aborted');
END IF;
ELSIF ( v_interface = 'WEB'
AND v_report_parameter = 'Y'
THEN
repid := find_report_object (p_reportobj_name);
set_report_object_property (repid, report_comm_mode, synchronous);
set_report_object_property (repid, report_destype, cache);
set_report_object_property (repid, report_desformat, 'pdf');
set_report_object_property (repid, report_server, v_reportserv);
set_report_object_property (
repid,
report_other,
'paramform=yes P_USER_CONNECT='
|| vc_connect
|| ' P_SERVERNAME='
|| v_reportserv
|| ' P_ACTION='
|| v_report_url
|| '/reports/rwservlet'
v_rep := run_report_object (repid);
rep_status := report_object_status (v_rep);
IF rep_status = 'FINISHED'
THEN
web.show_document (
v_report_url
|| '/reports/rwservlet/getjobid='
|| substr(v_rep,v_job_number)
|| '?server='
|| v_reportserv
,'_blank'
ELSE
message ( rep_status
|| 'Report output aborted');
END IF;
ELSE
run_product (
reports,
p_report_name,
synchronous,
runtime,
filesystem,
p_parameter_list,
NULL
END IF;
EXCEPTION
WHEN OTHERS
THEN
message (SQLERRM);
END;
My parameter form comes up and I enter the necessary information and hit submit query button. Then I get the Rep-52005: The specified key report does not exist in key map file.
Any help will be greatly appreciated!!
Shellie BrickerYour code seems to be implementing metalink note 139546.1 - Using Reports parameter forms with RUN_REPORT_OBJECT on the web.
For what I can see, the P_ACTION parameter should end in ?...
i.e.
P_ACTION=http://<hostname.domain:port>/reports/rwservlet?'
set_report_object_property (
repid,
report_other,
'paramform=yes P_USER_CONNECT='
|| vc_connect
|| ' P_SERVERNAME='
|| v_reportserv
|| ' P_ACTION='
|| v_report_url
|| '/reports/rwservlet?'
);If this does not fix your problem, then to troubleshoot further you would have to post the code in your Before Parameter Form trigger of your report.
Hope this helps,
UPDATE:
If the above does not fix your problem, my guess is that report name is not being generated in the hidden runtime values build by the code in the Before Parameter Form trigger.
i.e.
http://localhost:8889/reports/rwservlet?report=&destype=cache&desformat=PDF
The above code will throw error REP-52005: The specified key report does not exist in key map file.
Edited by: Rodolfo Ferrari on Jul 8, 2009 9:43 PM -
Hi,
I have developed all my forms of type 'Form with report' which after entering values, displays the report page that shows the details entered.
In the form page definition I have a select list for customer id which diplays 'customer name' as return value. So after the form values are entered it redirects to the report page which displays the details such as customer id etc. How do I make this page to display the customer name instead of customer id. From user's perspective it would make more sense if he can see the customer name for editing/changes.
Also I wanted to know which kind of report would be the most appropriate if the report is based on a PL/SQL block. Would it be as interactive ?.
Appreciate all suggestions posted.Hi Zahid,
Yes, That is exactly what I wanted. So now I have my other table (resources ) for getting the resource_name . I do not see any quotes in your query which makes me wonder how your query under – ‘Region source’ of the Region definition looks like. Could you paste you code exactly as seen there. Besides I am not sure if we can join tables in there. I was getting –Unable to parse query error as well as Invalid character. I am not entirely sure of the syntax of the query definition in the report page as it is automatically generated . Any ideas? . I am pasting my query here for you to look at.
Appreciate your help.
select "RR.RESOURCE_ROLE_ID",
"RR.RESOURCE_ID";
"RE.RESOURCE_NAME",
"RR.ROLE_ID",
"RR.PROJECT_ID",
"RR.CREDITS_PER_HOUR",
"RR.ACTIVE_DATE_START",
"RR.ACTIVE_DATE_END",
"RR.LAST_UPDATED_BY",
"RR.LAST_UPDATE_DATE",
"RR.CREATED_BY",
"RR.CREATION_DATE"
from "#OWNER#"."RESOURCE_ROLES" "RR",
"#OWNER#"."RESOURCES" "RE"
where "RR.RESOURCE_ID" "=" "RE.RESOURCE_ID";
Thanks,
A -
Hi,
I have created form with report.i want to apply the function like initcap,upper or lower apply changes portion of item.
e.g when i click on pencil image to modify the value.item which holds the value.if i enter value in lower case.i want to make value in initcap format.how can i apply this function.
Please help me to solve this problem.
Thanks & regards
NishaHi,
First of all when do you want to make them Initcap? If its after submit, then you can handle it in your DML or at trigger level. If its before submit, you can go with JS.
for those who prefer recursion over looping...
<script type="text/javascript">
function fnInitCap(pStr)
var vReturn;
if (pStr.indexOf(" ") != -1)
// Initcap the first word
vReturn = pStr.substring(0, 1).toUpperCase() + pStr.substring(1, pStr.indexOf(" ") + 1).toLowerCase();
// Contains multiple words, call function recursively
return vReturn + fnInitCap(pStr.substring(pStr.indexOf(" ") + 1, pStr.length));
else
vReturn = pStr.substring(0, 1).toUpperCase() + pStr.substring(1, pStr.length).toLowerCase();
return vReturn;
</script>and put following in item attributes..
onChange="javascript:this.value=fnInitCap(this.value);"Regards,
Hari -
Use Formule on FORM with REPORT - result stored at table
Hi all,
What is the best solution for?
I have region with FORM WITH REPORT on the same PAGE.
Values stored at table INFO with column ID, MYDATE, TIME_START_HOUR, TIME_START_MIN, TIME_END_HOUR, TIME_END_MIN, SUM1, SUM2
ITEMS on the form:
P1_ID (hidden)
P1_MYDATE (date picker)
P1_TIME_START_HOUR (select list)
P1_TIME_START_MIN (select list)
P1_TIME_END_HOUR (select list)
P1_TIME_END_MIN (select list)
P1_SUM1 (hidden)
P1_SUM2 (hidden)
After user fill in MYDATE, TIME_START_HOUR, TIME_START_MIN, TIME_END_HOUR, TIME_END_MIN then I need proces for calculation SUM1 en SUM2. Result stored (one record) at table INFO.
Report shows all columns. User had possibility to update the record
Formule:
Select
(CASE
when to_char(mydate,'DY','nls_date_language=dutch') in ('ZA','ZO')
THEN substr(to_timestamp (mydate||':'||TIME_END_HOUR||':'||TIME_END_MIN ||':00','DD-MM-YY:HH24:MI:SS') -
to_timestamp (mydate||':'||TIME_START_HOUR||':'||TIME_START_MIN ||':00','DD-MM-YY:HH24:MI:SS') -
(interval '00 00:00:00' day to second)
,12,5)
ELSE '08:00'
END) SUM1,
(CASE
when to_char(mydate,'DY','nls_date_language=dutch') in ('ZA','ZO')
THEN substr(to_timestamp (mydate||':'||TIME_END_HOUR||':'||TIME_END_MIN ||':00','DD-MM-YY:HH24:MI:SS') -
to_timestamp (mydate||':'||TIME_START_HOUR||':'||TIME_START_MIN ||':00','DD-MM-YY:HH24:MI:SS') -
(interval '00 04:00:00' day to second)
,12,5)
ELSE '04:00'
END) SUM2
FROM INFO
where id=:ID
What is the best way for the calculation: computation or processes or etc? The calculation after or before user push button(New:create button of Update:Apply Changes)?
How to fill the answer (SUM1 and SUM2) at table INFO?
Thanks WalterI have something similar I use:
DECLARE
str_day VARCHAR2(10);
dt_indx DATE;
db_dt_indx VARCHAR2(20);
str_st_tm VARCHAR2(20);
dt_st_tm DATE;
db_st_tm VARCHAR2(20);
str_ed_tm VARCHAR2(20);
dt_ed_tm DATE;
db_ed_tm VARCHAR2(20);
shft_flag NUMBER;
BEGIN
str_day := :P1050_DATE_MM || '/' || :P1050_DATE_DD || '/' || :P1050_DATE_YYYY;
dt_indx := to_date(str_day, 'MM/DD/YYYY');
db_dt_indx := to_char(dt_indx, 'MM/DD/YYYY');
str_st_tm := str_day || ' ' || :P1050_TIME_IN_HH || ':' || :P1050_TIME_IN_MI || ' ' || :P1050_TIME_IN_AM;
dt_st_tm := TO_DATE(str_st_tm, 'MM/DD/YYYY HH:MI AM');
str_ed_tm := str_day || ' ' || :P1050_TIME_OUT_HH || ':' || :P1050_TIME_OUT_MI || ' ' || :P1050_TIME_OUT_AM;
dt_ed_tm := TO_DATE(str_ed_tm, 'MM/DD/YYYY HH:MI AM');
--Alter date if night shift
SELECT NVL(:P1050_NIGHT_FLAG,0) into shft_flag from dual;
IF dt_ed_tm < dt_st_tm THEN
dt_ed_tm := dt_ed_tm + 1;
END IF;
db_st_tm := to_char(dt_st_tm + shft_flag,'MM/DD/YYYY HH:MI AM');
db_ed_tm := to_char(dt_ed_tm + shft_flag,'MM/DD/YYYY HH:MI AM');
end;You'll need to modify it for your page variables. -
Question of Form with Report?
This is great since I can create a form with report.
For my search on form selection, I can only select one column, can I select more than one columns so I can search column A and B?
Thank you.User,
What is your name?
Yes, when you're creating the report it's easy as you should see a list of columns and be able to select the ones you want. Afterward you'll have to manually modify the query which is easy enough.
Regards,
Dan
http://danielmcghan.us
http://sourceforge.net/projects/tapigen
http://sourceforge.net/projects/plrecur
You can reward this reply by marking it as either Helpful or Correct ;-) -
dear sap gurus:
can any one tell me the all t code for form based report like ke86 and other and why it is diffrent from report painterDear Makrand,
Please look into the following:
I brought profit center in selection criterion:
For this I have changed my Form T Code: KE35:
General Data Selection :
Included Profit center along with the controlling Area.
Then I changed my report:
KE30:
Variables Tab:
Givn Profit center as entry at execution.
Hope this will helps you......
Regards,
Pavan Kumar Arvapally -
Report for Asset with only values (No Zero values)
Hi All
There is requirement where in the user wants to genenerate report for assets with values .There should not be Zero balance assets included in the output. In short only with values in the asset master the report needs to be generated. Can one have any idea on this .
regards
Navin
Edited by: Naveen Rao on Jan 22, 2009 10:04 AMHi
Can you please specify the report name.
regards
Navin -
Creating a Form with Report based on View
Hi All,
I wanted to create a form with report based on two tables so:
1. I created a view (called COMBO) based on two tables
2. I then created a form with report based on the view
Everything seemed fine thus far until I tried to edit existing records - I got the error:
ORA-20505: Error in DML: p_rowid=2002082600001172, p_alt_rowid=REPATRIATION_ID, p_rowid2=, p_alt_rowid2=. ORA-01776: cannot modify more than one base table through a join view
Unable to process row of table COMBO.NB: REPATRIATION_ID is the primary key of the Repatriation table. The other table is Applicant.
& when I tried to create a new record - I got the error:
ORA-01776: cannot modify more than one base table through a join view
Unable to process row of table COMBO.Someone please enlighten me!
Kind Regards
Kamo
Edited by: Kamo on 2009/03/12 2:33 AMHello Kamo,
You need to create an 'instead of' (update/insert/delete) trigger on your view to process the inserts etc into the 'real' tables.
Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this reply by marking it as either Helpful or Correct ;-)
Maybe you are looking for
-
Trouble running DVI video and HDMI audio out of 6950
Twin frozr iii 6950 2gb (X2 crossfire) Asus VG236 Monitor Windows 7 MSI P67A-G43 Motherboard Yamaha RX-V371 Receiver I have two Twin Frozr iii 2gb 6950 cards and am attempting to use the HDMI on the video card solely for 5.1 audio out to my receiver
-
Just wondering if the new iMac uses a PVA Samsung panel instead of the IPS panel in the 20" iMac and ACD and 23" ACD. People have color shift issues with the PVA panels... anyone here use a PVA panel and like it?
-
IN F-43 tax calculation tab is not coming
hi In F-43 tax tab (Enter/display tax item) is coming but when i gone for calculating that no tab for calculate. so to get a calculate tab in f-43. Thanks Inadvance
-
Captivate 7 Publishing Powerpoint slides and crashing
I have recently updated Captivate 7 on my mac using the patch to make it work with Mavericks. All appears fine, however I have a project that has some powerpoint slides in it. When Captivate previews the content it locks up and freezes on any of thes
-
Solaris Volume Manager Enhanced Storage BUG?
All of our 64 bi sparc machines from solaris 8 and up used the Solstise Disk Suite...now solaris volume manager. The default solaris 10 install installs the command line metadb and other tools. I did formerly enjoy the metatool command for configurin