Home » Developer & Programmer » Forms » Include graphics on form (Form6i)
Include graphics on form [message #660112] Thu, 09 February 2017 03:33 Go to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
i want to display chart on form 6i. How it can be possible.
Re: Include graphics on form [message #660132 is a reply to message #660112] Thu, 09 February 2017 06:42 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If I remember correctly, Layout Editor in Forms 6i contains graph icon in its toolbar. Did you try to use it?
Re: Include graphics on form [message #660151 is a reply to message #660132] Fri, 10 February 2017 02:20 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
I have created a grpah (Stcn.ogd) in graphics builder. how i can call this in runtime form.
Re: Include graphics on form [message #660156 is a reply to message #660151] Fri, 10 February 2017 03:26 Go to previous messageGo to next message
cookiemonster
Messages: 13917
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 #660160 is a reply to message #660156] Fri, 10 February 2017 03:58 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
yes i have checked all that in form help built in.
please note that the following link ehich i am reading. it 2nd page is not showing.

https://www.scribd.com/document/41191349/Include-Graphics-Charts-on-Forms-6i

please advised from where book it is taken from.
Re: Include graphics on form [message #660209 is a reply to message #660160] Sun, 12 February 2017 08:06 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
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 #660220 is a reply to message #660209] Sun, 12 February 2017 10:10 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

What an ugly code, no indentation, long lines!

Re: Include graphics on form [message #673214 is a reply to message #660160] Mon, 12 November 2018 05:23 Go to previous messageGo to next message
Rizwi
Messages: 16
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

Re: Include graphics on form [message #673217 is a reply to message #673214] Mon, 12 November 2018 05:33 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Re: Include graphics on form [message #673238 is a reply to message #673217] Mon, 12 November 2018 16:06 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It appears you didn't read what Shahzad had said. Don't just copy/paste his code, read everything he wrote.

Hint:

Shahzad

Create chart in Graphics Builder.
Include graphics on form(Two screen shot ) [message #673281 is a reply to message #660151] Wed, 14 November 2018 04:31 Go to previous message
Rizwi
Messages: 16
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 1965 times)

[Updated on: Wed, 14 November 2018 04:38]

Report message to a moderator

Previous Topic: Browse Picture
Next Topic: Process of Sending SMS to mobile phone.
Goto Forum:
  


Current Time: Thu Mar 28 11:03:01 CDT 2024