Home » Developer & Programmer » Forms » Include graphics on form (Form6i)
|
|
|
Re: Include graphics on form [message #660156 is a reply to message #660151] |
Fri, 10 February 2017 03:26 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Have you looked at the form builder help topics on the subject?
That's all LF and I would do since neither of us I believe has ever tried putting graphics into a form.
|
|
|
|
Re: Include graphics on form [message #660209 is a reply to message #660160] |
Sun, 12 February 2017 08:06 |
shahzad-ul-hasan
Messages: 643 Registered: August 2002
|
Senior Member |
|
|
Solved:
Just Follow these steps:
Create chart in Graphics Builder.
Open Oracle Forms builder, connect with a database user(like scott/tiger), then create a new "Forms"(CTRL+N)
Attach on this forms the libraries OG.PLL (see Object Navigator node "Attached Libraries")
Create a new data block (no base table) and build a text_item field (to user enter a parameter value to pass to Graphics as PR_SAL), alter the datatype to number;
On Canvas, drag and drop a chart item object, and choose "Build a new chart manually";
Double click on chart item and change the property "Filename" to the name of Oracle Graphics saved on step 1 (like sal.ogd);
and use this code on when_button_pressed. or when_new_form_instance.
declare
pl_id ParamList;
pl_name VARCHAR2(10) := 'tempdata';
BEGIN
pl_id := Get_Parameter_List(pl_name);
IF not Id_Null(pl_id) THEN
destroy_parameter_list(pl_id);
end if;
pl_id := Create_Parameter_List(pl_name);
/*Now add a parameter to pass to graphics*/
Add_Parameter(pl_id,'PR_SAL',TEXT_PARAMETER,to_char(:block1.pr_sal));
/*if need more parameters, use more Add_parameter to list*/ /*now, call the graphics sal.ogd file to show on especified chart_area and with a parameter list*/
OG.open('sal.ogd','block1.chart_area1',FALSE,TRUE,pl_id);
OG.close('sal.ogd','block1.chart_area1');
END;
you can now show any graph on forms.
|
|
|
|
Re: Include graphics on form [message #673214 is a reply to message #660160] |
Mon, 12 November 2018 05:23 |
|
Rizwi
Messages: 21 Registered: June 2014 Location: DUBAI
|
Junior Member |
|
|
@shahzad-ul-hasan ..As Salamu alaykum,how are you sir, Brother i have try but not open..message show .Chart document not found.,,,,
eclare
pl_id ParamList;
report_id REPORT_OBJECT;
V NUMBER;
Begin
pl_id := Get_Parameter_List('pl_id');
pl_id := Create_Parameter_List('pl_id');
Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER,'NO');
Add_Parameter(pl_id, 'maximize',TEXT_PARAMETER, 'YES');
OG.OPEN( 'SALEMNPIE.ogd' ,'salblk.char_area1',FALSE,TRUE,pl_id);
OG.CLOSE('SALEMNPIE.ogd' ,'salblk.char_area1');
end if;
Report name SALEMNPIE.ogd and also layout property name SALEMNPIE.ogd... after run show the error
Chart document not found
|
|
|
|
|
Include graphics on form(Two screen shot ) [message #673281 is a reply to message #660151] |
Wed, 14 November 2018 04:31 |
|
Rizwi
Messages: 21 Registered: June 2014 Location: DUBAI
|
Junior Member |
|
|
Sir,
Please find attached csv file...
I was made graphics report and alse generate OGD FIEL THEN COMPILE AND SHOW THE DATA...BUT I HAVE USE PARAMETER FORM6I THEN RUN
GRAPH IS SHOW BUT DATA IS NOT DISPLAYED...USING REPORT SCRIPT
select to_char(to_date(saldat,'dd/mm/rrrr'),'rrrrmm')YYMM,sum(itmval) from x3_uaeshopbase
WHERE CONTRY BETWEEN 'UAE' AND 'UAE'
AND saldat between to_date('01/01/2017','dd/mm/rrrr') and to_date('31/12/2017','dd/mm/rrrr')
group by to_char(to_date(saldat,'dd/mm/rrrr'),'rrrrmm')
order by 1 asc
AND FORMS PARAMETER
Declare
pl_id ParamList;
report_id REPORT_OBJECT;
V NUMBER;
Begin
pl_id := Get_Parameter_List('pl_id');
pl_id := Create_Parameter_List('pl_id');
Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER,'NO');
Add_Parameter(pl_id, 'maximize',TEXT_PARAMETER, 'YES');
ADD_PARAMETER(pl_id,'cntfrm',TEXT_PARAMETER,NVL(:SALBLK.CNTFRM,NULL));
ADD_PARAMETER(pl_id,'cntto',TEXT_PARAMETER,NVL(:SALBLK.CNTTO,NULL));
ADD_PARAMETER(pl_id,'cntfrm1',TEXT_PARAMETER,NVL(:global.cntcod,NULL));
ADD_PARAMETER(pl_id,'cntfrm9',TEXT_PARAMETER,NVL(:global.cntcod2,NULL));
Run_Product(GRAPHICS, :GLOBAL.PATH||'\AJMALMIS\NEWMIS\REPORT\SALEMNPIE.OGD',SYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id);
IF NOT(ID_NULL(pl_id)) THEN
DESTROY_PARAMETER_LIST(pl_id);
END IF;
end;
help me sir
-
Attachment: grpphic.pdf
(Size: 389.66KB, Downloaded 2632 times)
[Updated on: Wed, 14 November 2018 04:38] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu Jan 30 13:12:34 CST 2025
|