Getting error While attaching Report out put Pdf file to POAPPRV workflow
I am getting below error in workflow
Item Type = POAPPRV
Item Key = 60383-243513
User Key =40515
Error Name = WF_ERROR
Error Message = [WF_ERROR] ERROR_MESSAGE=3835: Error '-20002 - ORA-20002: [WFMLR_DOCUMENT_ERROR]' encountered during execution of Generate function 'WF_XML.Generate' for event 'oracle.apps.wf.notification.send'. ERROR_STACK=
GNE_PO_CREATE_FILE_ATTACHMENT.Gne_Create_File_Attachment(60383-243513 OAPPRV, text/html)
Wf_Notification.GetAttrblob(207046, PO_REPORT, text/html)
WF_XML.GetAttachment(207046, text/html)
WF_XML.GetAttachments(207046, http://gnedxbebsdev.gerab.ae:8003/pls/DEV, 850
WF_XML.GenerateDoc(oracle.apps.wf.notification.send, 207046)
WF_XML.Generate(oracle.apps.wf.notification.send, 207046)
WF_XML.Generate(oracle.apps.wf.notification.send, 207046)
Wf_Event.setMessage(oracle.apps.wf.notification.send, 207046, WF_XML.Generate)
Wf_Event.dispatch_internal()
Error Stack =
Activity Id = 124108
Activity Label = NOTIFY_APPROVER_SUBPROCESS:GNE_PO_NOTI_TO_CEO
Result Code = #MAIL
Notification Id = 207046
The Code used in procedure is given below
procedure Gne_Create_File_Attachment (document_id in varchar2,
display_type in varchar2,
document in out blob,
document_type in out varchar2)
is
l_itemtype varchar2(100);
l_itemkey varchar2(100);
l_output_directory varchar2(30);
l_filename varchar2(255);
src_loc bfile;
bdoc blob;
src_offset number := 1;
dst_offset number := 1;
amount number;
l_request_id varchar2(100);
begin
l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
select attribute4
into l_request_id
from po_headers_all
where to_char(PO_HEADER_ID)=l_itemtype;
l_output_directory := 'APPLCSF/APPLOUT';
l_filename := 'o'||l_request_id;
src_loc := bfilename(l_output_directory,l_filename);
dbms_lob.createTemporary(bdoc, FALSE, dbms_lob.call);
dbms_lob.fileopen(src_loc, dbms_lob.file_readonly);
dbms_lob.loadblobfromfile(bdoc,src_loc,dbms_lob.lobmaxsize,src_offset,dst_offset);
dbms_lob.fileclose(src_loc);
amount := dbms_lob.getLength(bdoc);
dbms_lob.copy(document,bdoc,amount,1,1);
document_type := 'application/pdf; name=attach.pdf';
EXCEPTION
WHEN OTHERS THEN
wf_core.CONTEXT('GNE_PO_CREATE_FILE_ATTACHMENT'
,'Gne_Create_File_Attachment'
,document_id
,display_type);
RAISE;
end GNE_Create_File_Attachment;
PROCEDURE Gne_Assign_wf_Attribute(
itemtype IN VARCHAR2,
itemkey IN VARCHAR2,
actid IN NUMBER,
funcmode IN VARCHAR2,
resultout OUT NOCOPY VARCHAR2)
IS
v_user_name varchar2(100);
BEGIN
IF FUNCMODE = 'RUN' THEN
wf_engine.setitemattrdocument
(itemtype => itemtype
, itemkey => itemkey
, aname => 'PO_REPORT'
, documentid =>'PLSQLBLOB:GNE_PO_CREATE_FILE_ATTACHMENT.GNE_Create_File_Attachment/'
|| itemkey
|| ':'
|| itemtype);
end if;
EXCEPTION
WHEN OTHERS THEN
wf_core.CONTEXT('GNE_PO_CREATE_FILE_ATTACHMENT'
,'Gne_Assign_wf_Attribute'
,itemtype
,itemkey);
RAISE;
END Gne_Assign_wf_Attribute;
Can Any Body Please help me....
It is very urgent..
Thanks In Advance
Anil Kumar
There are two ways to look at what error the PLSQLBLOB API is throwing.
1) Call your PLSQLBLOB API GNE_PO_CREATE_FILE_ATTACHMENT.Gne_Create_File_Attachment directly from a PLSQL block and verify that it returns the BLOB data successfully.
You could also call another WF API that in turn executes the PLSQLBLOB API internally. For example,
<pre>
declare
l_document blob;
l_doctype varchar2(240);
l_aname varchar2(90);
begin
dbms_lob.CreateTemporary(l_document, true, dbms_lob.Session);
-- 207046 - This is the notification id of your failed workflow
-- PO_REPORT - Document type attribute
-- 'text/html' - Content Type being generated for
Wf_Notification.GetAttrBLOB(207046, 'PO_REPORT', 'text/html', l_document, l_doctype, l_aname);
-- Print the size of the document here to verify it was fetched correctly
end;
</pre>
2) Turn on log for SYSADMIN user with following attributes.
Log Enabled = TRUE
Log Level = ERROR
Log Module = wf.plsql%
Restart the Workflow Deferred Agent Listener and Workflow Notification Deferred Agent Listener and run your workflow process. Search for log messages written for above context and you can identify the error at wf.plsql.WF_XML.GetAttachment module with message starting as "Error when getting BLOB attachment ->"
Hope this helps.
Vijay
Similar Messages
-
Getting Error While Attaching Concurrent Program Output PDF file for POAPPRV Workflow
Hi All,
I am getting the below error when I am trying to attach concurrent program output to the PO Approval Notification.
An Error occurred in the following Workflow.
Item Type = POAPPRV
Item Key = 1040589-528378
User Key =945871
Error Name = WF_ERROR
Error Message = [WF_ERROR] ERROR_MESSAGE=3835: Error '-20002 - ORA-20002: [WFMLR_DOCUMENT_ERROR]' encountered during execution of Generate function 'WF_XML.Generate' for event 'oracle.apps.wf.notification.send'. ERROR_STACK=
Wf_Notification.GetAttrblob(3604701, ZZ_PREVIOUS_PO_COMPARE, text/html)
WF_XML.GetAttachment(3604701, text/html)
WF_XML.GetAttachments(3604701, http://oraerp.am.corp.xxxx.com:8099/pls/DEV, 11283)
WF_XML.GenerateDoc(oracle.apps.wf.notification.send, 3604701)
WF_XML.Generate(oracle.apps.wf.notification.send, 3604701)
WF_XML.Generate(oracle.apps.wf.notification.send, 3604701)
Wf_Event.setMessage(oracle.apps.wf.notification.send, 3604701, WF_XML.Generate)
Wf_Event.dispatch_internal()
Error Stack =
Activity ID = 190844
Activity Label = AL_NOTIFY_APPROVER_PROCESS:ZZ_PO_PO_APPROVE_ATTCH
Result Code = #MAIL
Notification ID = 3604701
There are several threads for this error however I cannot find any specific solution to the problem.
Please find the code below -
wf_engine.setitemattrdocument(itemtype=>itemtype,
itemkey=> itemkey,
aname=>'ZZ_PREVIOUS_PO_COMPARE',
documentid =>'PLSQLBLOB:zz_po_reqapproval_init1.xx_notif_attachments/' || to_char(l_request_id_prev_po)||':'||to_char(l_document_num));
-- here l_request_id_q_and_s is the request id of the program and l_document_num is the PO document number
PROCEDURE xx_notif_attachments(p_request_id IN VARCHAR2,
p_document_num IN VARCHAR2,
p_document IN OUT BLOB,
p_document_type IN OUT VARCHAR2) IS
v_lob_id NUMBER;
v_document_num VARCHAR2(15);
v_document_prefix VARCHAR2(100);
v_file_name VARCHAR2(500);
v_file_on_os BFILE;
v_temp_lob BLOB;
v_dest_offset NUMBER := 1;
v_src_offset NUMBER := 1;
v_out_file_name VARCHAR2(2000);
v_conc_prog_name VARCHAR2(500);
v_conc_req_id NUMBER;
CURSOR get_output_file(p_concurrent_request_id NUMBER) IS
SELECT cr.outfile_name, cp.concurrent_program_name
FROM fnd_concurrent_requests cr, fnd_concurrent_programs_vl cp
WHERE request_id = p_concurrent_request_id
AND cp.concurrent_program_id = cr.concurrent_program_id;
BEGIN
-- set_debug_context('xx_notif_attach_procedure');
v_conc_req_id := to_number(substr(p_request_id,
1,
instr(p_request_id, ':') - 1));
v_document_num := substr(p_request_id,
instr(p_request_id, ':') + 1,
length(p_request_id) - 2);
OPEN get_output_file(v_conc_req_id);
FETCH get_output_file
INTO v_out_file_name, v_conc_prog_name;
CLOSE get_output_file;
v_out_file_name := substr(v_out_file_name,
instr(v_out_file_name, '/', -1) + 1);
v_file_name := to_char(v_document_num) || '-Previous_PO_Rev.pdf';
utl_file.fcopy(src_location => 'APPS_OUT_DIR',
src_filename => v_out_file_name,
dest_location => 'PO_DATA_DIR',
dest_filename => v_file_name);
-- v_lob_id := to_number(v_document_id);
v_file_on_os := bfilename('PO_DATA_DIR', v_file_name);
dbms_lob.createtemporary(v_temp_lob, cache => FALSE);
dbms_lob.fileopen(v_file_on_os, dbms_lob.file_readonly);
dbms_lob.loadblobfromfile(dest_lob => v_temp_lob,
src_bfile => v_file_on_os,
amount => dbms_lob.getlength(v_file_on_os),
dest_offset => v_dest_offset,
src_offset => v_src_offset);
dbms_lob.fileclose(v_file_on_os);
p_document_type := 'application/pdf;name=' || v_file_name;
dbms_lob.copy(p_document, v_temp_lob, dbms_lob.getlength(v_temp_lob));
EXCEPTION
WHEN OTHERS THEN
wf_core.CONTEXT('ZZ_PO_REQAPPROVAL_INIT1',
'xx_notif_attachments',
v_document_num,
p_request_id);
RAISE;
END xx_notif_attachments;
Please help me find a to the above mentioned error.
Thanks,
SuvigyaThere are two ways to look at what error the PLSQLBLOB API is throwing.
1) Call your PLSQLBLOB API GNE_PO_CREATE_FILE_ATTACHMENT.Gne_Create_File_Attachment directly from a PLSQL block and verify that it returns the BLOB data successfully.
You could also call another WF API that in turn executes the PLSQLBLOB API internally. For example,
<pre>
declare
l_document blob;
l_doctype varchar2(240);
l_aname varchar2(90);
begin
dbms_lob.CreateTemporary(l_document, true, dbms_lob.Session);
-- 207046 - This is the notification id of your failed workflow
-- PO_REPORT - Document type attribute
-- 'text/html' - Content Type being generated for
Wf_Notification.GetAttrBLOB(207046, 'PO_REPORT', 'text/html', l_document, l_doctype, l_aname);
-- Print the size of the document here to verify it was fetched correctly
end;
</pre>
2) Turn on log for SYSADMIN user with following attributes.
Log Enabled = TRUE
Log Level = ERROR
Log Module = wf.plsql%
Restart the Workflow Deferred Agent Listener and Workflow Notification Deferred Agent Listener and run your workflow process. Search for log messages written for above context and you can identify the error at wf.plsql.WF_XML.GetAttachment module with message starting as "Error when getting BLOB attachment ->"
Hope this helps.
Vijay -
Getting error while installing reporting servcies on existing sql server 2012.
Hi Expaerts,
sql 2012 sp1:
getting error while installing Reporting services on existing sql server. at final step
Error on scren: install_rsharepoint_cpu64_action : roll back , rolling back action.
error on popup windows: ' one or more files required to restore your computer to its previous state colud not be found. restoration will not be found.
Thanks in advance.Hello,
Please help to collect the useful log information while install SQL Server Reporting Services. Here is the article for your reference, please see:
Navigating the Setup Logs when you install SQL Server 2012 Reporting Services:
http://blogs.msdn.com/b/jtarquino/archive/2012/03/14/navigating-the-setup-logs-when-you-install-sql-server-2012-reporting-services.aspx
Regards,
Elvis Long
TechNet Community Support -
Getting error while posting reports on Unix Process Scheduler Server
Hello ,
I am getting the below error while posting reports on Unix Process Scheduler Server .
PSDSTSRV.14338 (2) [09/08/09 08:21:34 PostReport](1) (JNIUTIL): Java exception thrown: java.io.IOException: Stream closed.
PSDSTSRV.14338 (2) [09/08/09 08:21:34 PostReport](3) HTTP transfer error.
PSDSTSRV.14338 (2) [09/08/09 08:21:34 PostReport](3) Post Report Elapsed Time: 0.0900
PSDSTSRV.14171 (10) [09/08/09 08:21:34 PostReport](1) (JNIUTIL): Java exception thrown: java.io.IOException: Stream closed.
Please advise ,thank you.user5838027 wrote:
Node name :PS_HTTP
URL: http://ddas1020.dev.com:16000/psreports/hrdmo
URI:SchedulerTransfer/hr90dmo
URI Port: 16000
Please let me know if any other info is needed.
Thanks.
typo...
URL: http://ddas1020.dev.com:16000/psreports/hr90dmo
Hopefully, your application URL looks like http://ddas1020.dev.com:16000/psp/hr90dmo/..., your URI host looks like ddas1020.dev.com (or corresponding ip address), and hhtp is checked.
Did you also tried to give the web login/password ?
Nicolas. -
SAP Best Practices V 4.31 questions- Getting errors while mapping reports.
Case 1:
I am trying to map following reports from SAP BP V 4.31 to our data sources:
a)POSD-Month-Material Group
b)POSD-Month Suppliers
c)POSD-Suppliers
These are the 3 reports out of 9 reports under trade dashboard.
We have followed the steps outlined in section 9 and used the code provided in appendix IX of the "Manual data source creation document" ,
These reports seem to use a field "DMBTR" :
Report claims this field(DMBTR ) would exist under following structure : ZBPBI131_STRU_TRADE_POSD
But the document specified this(DMBTR) field as part of structure : ZBPBI131_STRU_TRADE_PO
And the report is hence showing this field as orphaned and needs to be mapped while updating source.
I am clueless what is wrong ( document and code given there (or) report version i got) and how to map that DMBTR field to existing infoset and what impact it would create if i force it into the infoset declining the guiding document.
Case 2:
While mapping reports under" Sales Plan vs. Actual Dashboard" , I am getting error saying "Some tables were not found" ,even after we created the Query ZBPBI131_QRYSD on top of its infoset in SAP.
I am clueless what have gone wrong.We have followed exact steps as mentioned in the manual data source creation document.
Any help from anyone is greatly appreciated.
Thank youIngo,
I saw the same reply from you for some other users post.
Suggesting to post to All in One forums.
I was unable to find that exact forum, could you point me with a link.
infact if i can get to that forum, may be my question has been already answered.
Your help is appreciated.
Thank you -
Getting error while creating report group using T code GR52
HI All,
Below error is coming while generating report group in T code GR52
"Set 01010002SSS6EL0001 does not contain any entries "
Thanks in Advance......Hi Veera,
Actually you are getting a warning message where one of two things could have happened. Either you specified an incorrect zone name or one of the zones has not been fully booted. It's likely that you haven't booted the zones, so please follow this:
zoneadm list -iv
If zone1 or zone2 are not running then boot and configure them
zoneadm -z <zone> boot
zlogin -C <zone>
After that you can continue to follow the step by step instructions at
http://docs.sun.com/app/docs/doc/819-2975/chddadaa?a=view
These may also help
http://blogs.sun.com/Jacky/entry/a_simple_expample_about_how
http://blogs.sun.com/SC/en_US/entry/sun_cluster_and_solaris_zones
Regards
Neil -
Getting Error while running Report on Enterprise Report console
Hi all,
I am using Report builder 6i, I have developed one report and configued it on Enterprise Reporting tool but when tried to run it through Enterprise Reporting Console I got the following error
REP-0177: Error while running in remote serverREP-0736: There exist uncompiled program unit(s).REP-1247: Report contains uncompiled PL/SQL. FAIL 1
although the report is running fine through the report builder.
any thoughts?
Thanks in advance
Manvar
Message was edited by:
[email protected]Hello,
Do you reproduce the error if you implment the example provided in the document :
Oracle Application Server 10G -Integrating Oracle Reports in Oracle Forms Services applications:
http://www.oracle.com/wocportal/page/wocprod/ver-31/ocom/technology/products/forms/pdf/10g/frm10gsrw10g.pdf
Regards -
Getting error while generating report from Siebel (Siebel/BI Publisher)
Dear,
I have completed the integration of siebel and BIP according to the oracle document, I successfully upload the sample template from siebel application to BIP server.
But now I am facing two issues,
I am getting error "Unauthorized access, Please contact the administrator." when I open report on BIP which I have uploaded from siebel.
When I try to generate report from siebel=>application=>Tables=>S_Contact I am getting the below error when click on table report from Report button.
(httptransport.cpp (1635)) SBL-EAI-04117: HTTP Request error during 'Submitting Data SendHTTP request': 'Status code - 500'
(httptransport.cpp (983)) SBL-EAI-04117: HTTP Request error during 'Submitting Data Send HTTP request': 'Status code - 500'
(soapbinding.cpp (675)) SBL-EAI-04304: Unknown Part ':oracle.xdo.webservice.exception.InvalidParametersException' for operation 'runReport' exists in SOAP message.
(outdisp.cpp (247)) SBL-EAI-04308: Operation 'runReport' of Web Service 'http://xmlns.oracle.com/oxp/service/PublicReportService.PublicReportServiceService' at port 'PublicReportService' failed with the following explanation: "oracle.xdo.webservice.
Invalid User Name and Password for BIP Server
(xmlpadaptersvc.cpp (2287)) SBL-RPT-50529: Verify BI Publisher Server Userid and Password.
Error in generating Report Output file /siebel8/sea81/siebsrvr/siebel8/sea81/siebsrvr/xmlp/reports/Rept11-3U7M403.PDF in the XMLP Engine
(xmlpadaptersvc.cpp (2983)) SBL-RPT-50524: BI Publisher engine failed to generate report.
Object manager error: ([0] BI Publisher engine failed to generate report.(SBL-RPT-50524) (0x95c55c))
( (0) err=2818155 sys=9815388) SBL-OMS-00107: Object manager error: ([0] BI Publisher engine failed to generate report.(SBL-RPT-50524) (0x95c55c))
(bsvcmgr.cpp (1392) err=2818251 sys=0) SBL-OMS-00203: Error 9815388 invoking method "GenerateReport" for Business Service "XMLP Driver Service"
(bsvcmgr.cpp (1236) err=2818251 sys=0) SBL-OMS-00203: Error 9815388 invoking method "GenerateReport" for Business Service "XMLP Driver Service"
(smireq.cpp (425) err=2818251 sys=0) SBL-OMS-00203: Error 9815388 invoking method "GenerateReport" for Business Service "XMLP Driver Service"
Please help to resolve this issue.
Regards,
SoahilThis specifically means that the destinations have not been configured in the Crystal Job Server. If you're running 4.x, this may be part of the "Adaptive Job Server" instead of or in addition to a Crystal Job Server. If you're using 3.1 or earlier, you'll also have to set up the destination in the Destination Job Server.
You'll have to log in to the CMC, go to Servers, right-click on the correct job server and go to "Destinations". You'll then add something like "File" or "Unmanaged Disk" to the available destinations and save. Stop the job server, start it again, and your error should go away.
Please be aware that unless you're using specific credentials to schedule the report or you're saving to the server where BO is installed, you'll need to make sure that the BO services are running under a network "Services" account that has access to the folder you're scheduling the report to. By default during installation it's set to run under the "Local Services" account that doesn't have access to the network.
-Dell -
Getting error while opening reports in EHS on portal
Hi,
I have deployed EHS Business package on portal. In the Industrial hygiene and safety role there is an iview "Standard Operating procedures". I am getting error
"Portal Runtime Error
An exception occurred while processing a request for :
iView : N/A
Component Name : N/A
iView not found: /global/services/java-iviews/com.sap.pct.ehs.reports.EHSReportGet." when i try to open any report on it. Can anybody please help me in this issue?check the logs under httP://server:port/nwa-monitoring-logs and traces-sap logs
you can see the detailed description of the error -
Getting error while calling reports through form
Hi I want to call a report from a form i put the following code on when-button-pressed but i am getting the following error.I can generate and run the reports.The object REPORTS is created under forms report object
FRM-41211: Integration error: SSL Failure running another report
DECLARE
repid REPORT_OBJECT;
report_prop VARCHAR2(20);
v_rep VARCHAR2(100);
BEGIN
repid := find_report_object('REPORTS');
set_report_object_property(repid,report_other,'p1=15 p2=19 paramform=yes');
v_rep := RUN_REPORT_OBJECT(repid);
END;
rgds
shyamHi
I can able to run the reports from the browser there was a syntax error, but not able to call from a form
I am getting error but i can run another forms without any problem
FRM-92101: There Was a failure in the FormsServer during startup
oracle.forms.net.connectionexception:forms session aborted:unable to communicate with the runtime process
rgds
rosh -
Error while trying to Insert a pdf file in database
Hi All,
I have sent this problem to Informix. By any chance if you had faced the same problem and found the solution, pls send mail to [email protected]
Thanks
Babu
Hi there,
I tried to insert a pdf file in to Informix database. I followed the guidelines
given in the "InformixJDBC Driver
Programmer's Guide". Actually my program works if i use
PreparedStatement.setBytes method. But why
PreparedStatement.setBinaryStream method is not working????.
Here is the code snippet.....
Connection conn = null;
PreparedStatement ps = null;
try
File ff = new File("C:\\test.pdf");
InputStream value = null;
FileInputStream fileinp = new FileInputStream(ff);
value = (InputStream) value;
int len = (int) ff.length();
System.out.println("len: " + len);
conn = connect();
String sql = "INSERT INTO dbep04m@inf10004:pg_wip_t (c_db,n_object,u_img) VALUES (\"2\",?,?)";
if (conn != null)
long stTime = System.currentTimeMillis();
ps = conn.prepareStatement(sql);
for (int ii=1;ii<=10000;ii++)
ps.setInt(1,ii);
ps.setBinaryStream(2,value,len);
int rtVal = ps.executeUpdate();
//System.out.println("return value" + rtVal);
ps.close();
conn.close();
long endTime = System.currentTimeMillis();
System.out.println("Total time taken for this run: " + (endTime-stTime)/(1000) + " seconds");
catch (FileNotFoundException ex)
ex.printStackTrace();
catch (IOException ex)
ex.printStackTrace();
catch (SQLException ex)
ex.printStackTrace();
finally
try
if (ps != null)
ps.close();
if (conn != null)
conn.close();
catch (SQLException ex)
ex.printStackTrace();
I am getting the following error message.......
java.sql.SQLException: Insufficient Blob data
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java)
at com.informix.jdbc.IfxSqli.sendStreamBlob(IfxSqli.java, Compiled Code)
at com.informix.jdbc.IfxSqli.sendBlob(IfxSqli.java, Compiled Code)
at com.informix.jdbc.IfxSqli.sendBind(IfxSqli.java, Compiled Code)
at com.informix.jdbc.IfxSqli.sendExecute(IfxSqli.java)
at com.informix.jdbc.IfxSqli.sendCommand(IfxSqli.java)
at com.informix.jdbc.IfxSqli.executeCommand(IfxSqli.java)
at com.informix.jdbc.IfxResultSet.executeUpdate(IfxResultSet.java)
at com.informix.jdbc.IfxStatement.executeUpdateImpl(IfxStatement.java)
at com.informix.jdbc.IfxPreparedStatement.executeUpdate(IfxPreparedStatement.java)
at com.aexp.eaim.iu.isp.testcase.InsertBlob.insertUsingSql(InsertBlob.java, Compiled Code)
at com.aexp.eaim.iu.isp.testcase.InsertBlob.main(InsertBlob.java:194)
Here is the example given in the "Informix JDBC Driver Programmer's Guide". In the line maked bold, the blob size was hard coded as 10. Then
why you are trying to find the file length???.
try
stmt = conn.createStatement();
stmt.executeUpdate("create table tab1(col1 byte)");
catch ( SQLException e)
System.out.println("Failed to create table ..." + e.getMessage());
System.out.println("Trying to insert data using Prepare Statement ...");
try
pstmt = conn.prepareStatement("insert into tab1 values (?)");
catch (SQLException e)
System.out.println("Failed to Insert into tab:" + e.toString());
File file = new File("data.dat");
int fileLength = (int) file.length();
InputStream value = null;
FileInputStream fileinp = null;
int row = 0;
String str = null;
int rc = 0;
ResultSet rs = null;
System.out.println("Inserting data ...\n");
try
fileinp = new FileInputStream(file);
value = (InputStream)fileinp;
catch (Exception e) {}
try
pstmt.setBinaryStream(1,value,10); //set 1st column
catch (SQLException e)
System.out.println("Unable to set parameter");
set_execute();
public static void set_execute()
try
pstmt.executeUpdate();
catch (SQLException e)
System.out.println("Failed to Insert into tab:" + e.toString());
e.printStackTrace();
Best Regards
Babusorry!!!. There is an error in the code
old code :
value = (InputStream) value ;
should be code :
value = (InputStream) fileinp; -
Data getting truncated while exporting report to a text file in crystal 10?
Hi All,
I am using crystal 10.When exporting report to a text file ,a dialog prompts asking for Character perinch with a default value 9.If I change the value from 9 to 16 i am getting the correct data(that means character per inch value is 16) and it update "CharPerInch" value in registry under following location to 16.
HKEY_CURRENT_USER\Software\Crystal Decisions\10.0\Crystal Reports\Export\Text
The dialog asked for character per inch also has option to select not to prompt again and i also selected that in first go.
When i export the report again in text format it didn't prompt for number of character per inch but the data gets truncated.
What i believe is even though it updates entry in registry and reads, it is not using the same value for export. It never consider the value that is in registry, if the check box is not selected then it is using the value entered in the dialog and if the check box is selected then in the next run it uses the default value as 9.
Can anyone suggest me how to override this problem ? Is there any other setting place in registry where i can enter the number of character per inch.I don't want to crystal to prompt always for character per inch.Hi Venkateswaran,
The other option to avoid truncation of the data could be
Right click the text filed
Click on Format Text to open the Format Editor
On Common tab check the text box for Can Grow.
This will prevent the data from truncating in preview as well as while exporting to text.
Otherwise you will have to set the characters per inch to 16 each time. I donu2019t see changing the registry value causing any difference here.
Regards,
Aditya Joshi -
Error while trying to open exported PDF file from Datagridview??
Hi everyone ,
I want to export datagridview to PDF file,After generating the pdf I'm not able to open that file..when i try to open it shows file corrupted error message and also not getting "Pdf Generation successfully " Message.
Here is my code :
private void btnExportPdf_Click(string heading, string filename)
try
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "All Files | *.* ";
if (saveFileDialog.ShowDialog() == DialogResult.OK)
string path = saveFileDialog.FileName;
Document pdfdoc = new Document(PageSize.A4); // Setting the page size for the PDF
PdfWriter writer = PdfWriter.GetInstance(pdfdoc, new FileStream(path + ".pdf", FileMode.Create)); //Using the PDF Writer class to generate the PDF
writer.PageEvent = new PDFFooter();
// Opening the PDF to write the data from the textbox
PdfPTable table = new PdfPTable(dataGridView1.Columns.Count);
//table.TotalWidth = GridView.Width;
float[] widths = new float[]
dataGridView1.Columns[0].Width, dataGridView1.Columns[1].Width, dataGridView1.Columns[2].Width
table.SetWidths(widths);
table.HorizontalAlignment = 1; // 0 - left, 1 - center, 2 - right;
table.SpacingBefore = 2.0F;
PdfPCell cell = null;
pdfdoc.Open();
//doc.Open();
// Phrase p = new Phrase(new Chunk(heading, titleFont));
// doc.Add(p);
foreach (DataGridViewColumn c in dataGridView1.Columns)
cell = new PdfPCell(new Phrase(new Chunk(c.HeaderText)));
cell.HorizontalAlignment = PdfPCell.ALIGN_CENTER;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
table.AddCell(cell);
if (dataGridView1.Rows.Count > 0)
for (int i = 0; i < dataGridView1.Rows.Count; i++)
PdfPCell[] objcell = new PdfPCell[dataGridView1.Columns.Count];
for (int j = 0; j < dataGridView1.Columns.Count - 1; j++)
cell = new PdfPCell(new Phrase(dataGridView1.Rows[i].Cells[j].Value.ToString()));
cell.HorizontalAlignment = PdfPCell.ALIGN_CENTER;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
table.AddCell(cell);
//lstCells.Add(cell);
objcell[j] = cell;
PdfPRow newrow = new PdfPRow(objcell);
table.Rows.Add(newrow);
pdfdoc.Add(table);
MessageBox.Show("Pdf Generation Successfully.");
pdfdoc.Close();
catch (Exception ex)
MessageBox.Show("Error in pdf Generation.");
Thanks & Regards RAJENDRAN MYour question sounds like it is related to PdfWriter as that is how you're saving the file. These forums are for MS products. Please post questions related to third-party products in their forums.
-
Getting Error While Running Report.
I have Developersuite 10g installed in my pc. While I'm running a report from
form, by issuing RUN_REPORT_OBJECT command I'm getting following Error :
FRM-41211 : Integration error: SSL failure running another product.
Please guide some one how to solve this problem.
So please guide me how to call report from form.
Thanx.Hello,
Do you reproduce the error if you implment the example provided in the document :
Oracle Application Server 10G -Integrating Oracle Reports in Oracle Forms Services applications:
http://www.oracle.com/wocportal/page/wocprod/ver-31/ocom/technology/products/forms/pdf/10g/frm10gsrw10g.pdf
Regards -
I am getting error while attaching Menu Module to FORM
Hi to everyone, I have created a Menu Module(mmx file), now i am trying to attach that menu to a FORM, I have entered the proper Menu Module address in the property window of that FORM, but i am continously facing the following problem.
FRM-40738: Argument 1 to builtin CALL_FORM cannot be null
Also i have applied following code in that Menu Module
call_form('F:\Database Files\Contingent Database\Forms & Reports\Forms\BILL DETAIL.fmx');
but the required FORM is not running.
Please help me to sove out this problemI did this today, in this way,
I create the menu then CRT-SHIFT K, then CRT -T
then check you have the mmx
- now you put full path to the form
Menu module like c:\aaa\bb\menuname
I did not put extension
Hope this will work.
Maybe you are looking for
-
UWL not getting refreshed automatically
Hi, We have a requirement, where in the MSS UWL, we dont require all the 4 tabs (Alerts, Tasks, Notification, Tracking) in the worklist. We only want Tasks tab, which is possible through UWl configuration, which we have done. Now we have only 1 tab w
-
hey i made a document sideways in pages on my phone but want to send it to people to were they dont have to rotate it to see it right how can i change it?
-
Move, trim, or delete clips in the primary storyline without affecting connected clips That's just what I was waiting for! But it's very difficult for me to use this option First af all the choice of the "Grave accent", which isn't present itself on
-
Discount amount should not be from total amount + freight amount while pay
How can I set up the system so that unplanned costs goes to fright account ( which I think is working fine) at the invoice level but also the discount amount while paying is not taken out from the amount +freight amount. We need to pay so that discou
-
IDOC with extension from external ECC system
Hello experts. I have a scenario where I need to receive an IDOC with extenstion from an external system. how can I define the xsd of that IDOC in my PI system? will I need to receive an xsd file from the external system and import it as an external