This content has been marked as final. Show 22 replies
Ok, good stuff.
Copy your Oracle ODBC driver to the 'C:\apache-tomcat-5.5.12\webapps\birt\WEB-INF\platform\plugins\org.eclipse.birt.report.data.oda.jdbc_2.3.2.vxxxxxxxx\drivers' folder.
Copy your report file ie. the .rptdesign file to 'C:\apache-tomcat-5.5.12\webapps\birt' folder.
In your Apex application create a page, add a button link eg. an image type button with #IMAGE_PREFIX#/menu/printer_32.gif specified as the image. Specify the target as a URL with the following URL target :-
To pass a parameter to the report the URL target would be as follows :-
PARAM1 is the actual name of the parameter as defined in your BIRT report.
Where P116_ID is a page item. You can obviously pass as many parameters as you like in URL following the same syntax for additional parameters. You can also create links in reports and use the # syntax to pass parameters. The 'location.hostname' bit makes testing and deployment easier as you don't have to hard code the IP address of the server running BIRT.
Have a look at http://www.eclipse.org/birt/phoenix/deploy/viewerSetup.php and http://www.eclipse.org/birt/phoenix/deploy/viewerUsage.php for more info on the running and viewing of reports.
Hope I haven't missed anything out.
Vis Naidu wrote:Actually, there should be no slash between #IMAGE_PREFIX# and the directory: #IMAGE_PREFIX#menu/printer_32.gif
In your Apex application create a page, add a button link eg. an image type button with #IMAGE_PREFIX#/menu/printer_32.gif specified as the image.
Based on your mail merge example, I was able to upload certain rtf files. But I have rather larger files that I want to upload. And when I attempt to do so, I get this error message: ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 6457, maximum: 2000)
It seems to fail during the insert into the rtf table. Which is on this insert ...
insert into rtf
select id, name, filename, mime_type, doc_size, utl_raw.cast_to_varchar2(blob_content)
Do you know a workaround for this?
I was wondering if anyone could provide some input to how to integrate PL-FPDF to Oracle Apex, I can't see to find any information online about it.
Where would I get started?
Since it is just a pl/sql library to call I would think it should be pretty easy to use, however with no visual designer interface, it seems kinda hokey.. There are visual xsl editors available that when used with FOP/Cocoon will get you nice reports for $65 a Developer license plus the time to install setup Cocoon/FOP..
Otherwise, you COULD post a message to the PL-FPDF authors site and ask him how to mesh APEX and PL-FPDF..
Site is: http://www.erasme.org/PL-FPDF,1337
Great, I sent them a message, and I hope I can try to understand French, hehe
I guess they stopped allowing posts on their forums, I wish they would provide more support.
Thanks for you help Tony.
if you look at
syntax used is almost same other than the package name.
here is what i did( this is part of the code to give you idea )
FOR rec1 in cur1 loop l_comments := rec1.value_id; END LOOP;
FOR rec2 in cur2 loop l_strengths := rec2.value_id; END LOOP;
FOR rec3 in cur3 loop l_area_to_address := rec3.value_id; END LOOP;
--reset page margin
pl_fpdf.Text(pl_fpdf.GetX+8.875,pl_fpdf.GetY+.25,'Areas to Address');
this is the foundation on which this whole package is built
hope it help you
Edited by: binepal on Jun 11, 2009 2:26 PM
You're having trouble with large files.
I implemented this ages ago to use from Forms, and recently transcribed it to Apex.
I store the rtf file as a blob - so the upload (for me) is simply
insert into rtf
so then we have to convert to char in chunks (possibly) to do the replace.
Our tag identifiers are "<<" and ">>" e.g. "<<EMPNO>>"
Seems to work with any size of file - I tried it on a massive one with a large logo with no problems.
We also store the completed letter in a log file - easily removed if you don't need it!
I'll reproduce the full procedure - I think it's self-explanatory.
(fetch_det and replace_data should be obvious)
procedure mailmerge (p_module in varchar2
,p_empno in number := 1)
v_output blob := null;
-- Buffer for log blob content
v_default_bufflen number := 16384; -- 16k
v_offset number := 1;
v_first boolean := true;
cursor c_lob is
where module = v_module;
cursor c_seq is
select nvl(max(seqno),0) + 1
v_module := UPPER(p_module);
v_where := 'Retrieving RTF file';
if c_lob%notfound then
error_flag := true;
htp.print('Module not found');
-- Now retrieve the variables
v_where := 'Processing letter contents';
v_bufflen := v_default_bufflen;
dbms_lob.read(v_input, v_bufflen, v_offset, v_raw);
v_content := utl_raw.cast_to_varchar2( v_raw );
/* Now count backwards to find the last occurrence of "<<" */
v_start_pos := instr(v_content,'<<',-1,1) ;
if v_start_pos > 0 then -- found
/* Now , do we have a close symbol? */
v_end_pos := instr(v_content,'>>',v_start_pos);
IF v_end_pos = 0 then -- no close and we have a split replacement string
v_bufflen := v_start_pos - 1; -- cut buffer down to posn. BEFORE replace start
v_content := replace_data(v_content);
v_raw := utl_raw.cast_to_raw(v_content);
if v_first then
v_output := v_raw;
v_first := FALSE;
v_offset := v_offset + v_bufflen;
when no_data_found then
-- htp.print('end of file');
v_where := 'Log Seq';
if c_seq%notfound then
v_log_seq := 1;
v_where := 'Logging details';
insert into letter_log
when others then
error_flag := TRUE;
htp.print('<h1>'||'Error in Letter Log '||SQLERRM ||'<h1>');
if not error_flag then
v_where := 'Setting mime details';
v_where := 'Displaying processed content';