calling report from forms [message #157852] |
Mon, 06 February 2006 13:18 |
dmack
Messages: 42 Registered: March 2005 Location: TNT
|
Member |
|
|
I am trying to call a report from forms developer. I ahve already searched the database as there are a number of questions relating to this but none of them seem to help.
I have also follwed the example in help this is fine.
The problem is when I run my report through form it comes up blank, when I run the report separately it works fine. When I run the report from form I can see the report previewer(with the name of the report),but a blank preview. I am stumped as to what the problem might be. Can any one offer any assistance.
Thank you....
|
|
|
|
Re: calling report from forms [message #157939 is a reply to message #157898] |
Tue, 07 February 2006 06:22 |
dmack
Messages: 42 Registered: March 2005 Location: TNT
|
Member |
|
|
Yes i have populated all the parameters.
This is what the code looks like:
DECLARE
pl_id PARAMLIST;
pl_name VARCHAR2(30) := 'tempdata';
CURSOR get_stat is
SELECT Distinct clm_no,clm_stat_cd1,awd_int_pay_st,awd_clm_prno
FROM claim,benefit_payt,awd_benefit,award_ben_rates
WHERE clm_no = bp_clm_no
AND clm_proc_no = bp_proc_no
AND clm_no = awd_clno
AND clm_proc_no = awd_clm_prno
AND awd_clno = bp_clm_no
AND awd_clm_prno = bp_proc_no
AND abr_clno = bp_clm_no
AND abr_clm_prno = bp_proc_no
AND awd_clno = abr_clno
AND awd_clm_prno = abr_clm_prno
AND bp_off between :p_off_1 and :p_off_2
AND bp_clm_type = 'RB'
AND bp_pay_reason_cd = 1
AND bp_confirm between :vchr_cfm_date_fr and :vchr_cfm_date_to;
BEGIN
FOR arec in get_stat LOOP
pl_id := Create_Parameter_List(pl_name);
ADD_PARAMETER(pl_id,'clm_num',TEXT_PARAMETER, TO_CHAR(arec.clm_no));
ADD_PARAMETER(pl_id,'p_off_1',TEXT_PARAMETER,To_CHAR(:p_off_1));
ADD_PARAMETER(pl_id,'p_off_2',TEXT_PARAMETER,To_CHAR(:p_off_2));
ADD_PARAMETER(pl_id,'vchr_cfm_date_fr',TEXT_PARAMETER,:vchr_cfm_date_fr);
ADD_PARAMETER(pl_id,'vchr_cfm_date_to',TEXT_PARAMETER,:vchr_cfm_date_to);
ADD_PARAMETER(pl_id,'DESTYPE',TEXT_PARAMETER,:sdestination);
ADD_PARAMETER(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
IF arec.clm_stat_cd1 = 95 AND
to_char(arec.awd_int_pay_st,'YYYY-MON-DD')< '20040301' THEN
RUN_PRODUCT(REPORTS,'ret_allow_b.rep',SYNCHRONOUS,RUNTIME,FILESYSTEM,pl_id);
End if;
IF arec.clm_stat_cd1 = 95 AND
to_char(arec.awd_int_pay_st,'YYYY-MON-DD')>= '20040301' THEN
RUN_PRODUCT(REPORTS,'ret_allow.rep',SYNCHRONOUS,RUNTIME,FILESYSTEM,pl_id);
End if;
IF arec.clm_stat_cd1 = 93 THEN
RUN_PRODUCT(REPORTS,'ret_allow_gr.rep',SYNCHRONOUS,RUNTIME,FILESYSTEM,pl_id);
END IF;
DESTROY_PARAMETER_LIST(pl_id);
END LOOP;
GO_BLOCK('MAIN_BLK');
CLEAR_BLOCK;
END;
[Updated on: Thu, 09 February 2006 00:39] by Moderator Report message to a moderator
|
|
|
Re: calling report from forms [message #157964 is a reply to message #157852] |
Tue, 07 February 2006 09:29 |
M0nst3r
Messages: 38 Registered: February 2006 Location: Wherever the Money Is
|
Member |
|
|
It looks like you have a few problems with date conversions.
Make sure :vchr_cfm_date_fr and :vchr_cfm_date_to are both dates in your cursor. If they're VC2, use TO_DATE() to convert them to dates.
Change to_char(arec.awd_int_pay_st,'YYYY-MON-DD')< '20040301' to arec.awd_int_pay_st < TO_DATE('3/1/2004', 'MM/DD/YYYY').
Change to_char(arec.awd_int_pay_st,'YYYY-MON-DD')>= '20040301' to arec.awd_int_pay_st >= TO_DATE('3/1/2004', 'MM/DD/YYYY')
|
|
|
Re: calling report from forms [message #157975 is a reply to message #157852] |
Tue, 07 February 2006 11:00 |
dmack
Messages: 42 Registered: March 2005 Location: TNT
|
Member |
|
|
thanks that worked fine.
Now however when I run the report say I return 12 records (12 separate reports)I must close one report to get to the next. When I close the first report the report background engine runs again and then I get the second and ao on.
How can I avoid this?
|
|
|
|
|
|
|
Re: calling report from forms [message #158684 is a reply to message #158470] |
Mon, 13 February 2006 21:17 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Do you get the report title or do you get nothing at all? IF the later have you defined the REPORTS_PATH in your register?
David
|
|
|