Running apex_util.get_print_document with APEX_MAIL

I am trying to automate the running of an apex_util.get_print_document, emailing the output to my users. When the job tries to run I get this error in the log:
ORA-20022: Null value supplied for parameter p_attachment.
ORA-06512: at "FLOWS_030100.WWV_FLOW_MAIL", line 731
ORA-06512: at "SIS_EXPRESS.SIS_EXPRESS_REPORTS", line 154
ORA-06512: at line 2
Not sure where I can check this to see the problem. Anybody do this before?
BEGIN
l_report_blob := apex_util.get_print_document(
p_application_id => l_application_id,
p_report_layout_name => l_report_query_name,
p_report_query_name => l_report_query_name,
p_report_layout_type => l_output_format,
p_document_format => l_output_format,
p_print_server => null);
l_id := APEX_MAIL.SEND( p_to => '[email protected]',
p_from => '[email protected]',
p_subj => 'APEX_MAIL with attachment',
p_body => 'Please review the attachment.',
p_body_html => 'Please review the attachment' );
APEX_MAIL.ADD_ATTACHMENT( p_mail_id => l_id,
p_attachment => l_report_blob,
p_filename => l_report_query_name,
p_mime_type => l_mime_type);
COMMIT;
END;

Hi Paul,
APEX_UTIL API consists of 4 different GET_PRINT_DOCUMENT Functions based on parameters types(Function Overloading) that are being passed. If you look at the function where CLOB is the data type for parameter p_report_data, the bind variables can be passed to the SQL which willl be used by DBMS_XMLGEN or other XML/CLOB generation API's.
I have used DBMS_XMLGEN to generate the CLOB data which intern used by GET_PRINT_DOCUMENT function.
Regards
Shesh

Similar Messages

  • Call print apex_util.get_print_document() with page item values

    Hi all
    I ran into an issue that very frustrated as it sounds so simple.
    I'm in Apex 3.1.
    My database has table TAB_CLASSES, TAB_STUDENT
    My application has page 1 with P1_SID is student_ID
    I had an simple report query name Class_query, show all classes that a student attends
    select * from TAB_CLASSES where SID = :P1_SID;
    I also select option "include application and session information"
    I had report template Class_template
    In my application, I have a process tried to generate report list classes for all students.
    l_report blob;
    for x in (select * from TAB_STUDENT)
    loop
    :P1_SID := x.SID;
    l_report := apex_util.get_print_document (
    p_application_id => :APP_ID,
    p_report_query_name => 'Class_query',
    p_report_layout_name => 'Class_template',
    p_report_layout_type => 'rtf',
    p_document_format => 'pdf'
    insert all the l_report into database with SID as a part of l_report name (*) 
    end loop;
    After this, I got multiple of l_report blob in database, number of report is exactly number of student in the TAB_STUDENT table. The problem is that every report looks the same, and it got the information of only first student
    I guessed it did not pass the item value (P1_SID) every time it call the get_print_document, but it still shows in the report name (*)
    Please help me. Thanks for any idea.
    Teiv
    Edited by: teiviag on Mar 10, 2010 7:16 AM

    This post had the same problem with me
    [ http://forums.oracle.com/forums/thread.jspa?threadID=663186&start=0&tstart=0|http://forums.oracle.com/forums/thread.jspa?threadID=663186&start=0&tstart=0]
    Thanks for the post of Marc, about how variables are binding and calling by process, I changed my app design to have a sp to print and store the pdf file. Then in my app, I just called the sp and passed the P1_SID. It worked.
    Thanks.
    Edited by: teiviag on Mar 10, 2010 10:49 AM
    Edited by: teiviag on Mar 10, 2010 10:50 AM
    Edited by: teiviag on Mar 10, 2010 10:50 AM

  • Using apex_util.get_print_document with DBMS Scheduler

    I'm trying to run report_query from DBMS_SCHEDULER job. When the job tries to execute I get this error in dba_scheduler_job_run_details. Notsure how to debug this. Any ideas?
    Select error#, additional_info from dba_scheduler_job_run_details where job_name ='TEST10'
    6502
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "APEX_030200.WWV_FLOW_RENDER_QUERY", line 644
    ORA-01003: no statement parsed
    ORA-06512: at "APEX_030200.WWV_FLOW_RENDER_QUERY", line 1469
    ORA-06512: at "APEX_030200.WWV_FLOW_UTILITIES", line 9233
    ORA-06512: at "APEX_030200.HTMLDB_UTIL", line 1836
    ORA-06512: at "SIS_EXPRESS.SIS_EXPRESS_REPORTS", line 867
    ORA-06512: at line 2
    DECLARE l_report_blob blob;
    l_id number;
    l_application_id report_scheduler_job.application_id%TYPE;
    l_application_owner report_scheduler_job.application_owner%TYPE;
    l_report_query_name report_scheduler_job.report_query_name%TYPE;
    l_report_layout_name report_scheduler_job.report_layout_name%TYPE;
    l_output_format varchar2(10);
    BEGIN
    l_report_blob := apex_util.get_print_document(
    p_application_id => l_application_id,
    p_report_layout_name => l_report_layout_name,
    p_report_query_name => l_report_query_name,
    p_report_layout_type => l_output_format,
    p_document_format => l_output_format,
    p_print_server => null);
    END:

    You must use a "replace" function in you sql querie for the special characters. for example:
    select replace(replace(customer_name,''&'',''%26amp;''),chr(39),''%26apos;'') customer_name
       from accounts

  • Apex_util.get_print_document with bind

    All,
    I'm trying to create a process to bulk print a report to the file system using the API apex_util.get_print_document. Is there a way to pass bind variables to the report query when using this API? If not, has anyone come up w/another solution on mass printing reports that have parms?
    Thanks,
    Paul

    Hi Paul,
    APEX_UTIL API consists of 4 different GET_PRINT_DOCUMENT Functions based on parameters types(Function Overloading) that are being passed. If you look at the function where CLOB is the data type for parameter p_report_data, the bind variables can be passed to the SQL which willl be used by DBMS_XMLGEN or other XML/CLOB generation API's.
    I have used DBMS_XMLGEN to generate the CLOB data which intern used by GET_PRINT_DOCUMENT function.
    Regards
    Shesh

  • APEX_UTIL.GET_PRINT_DOCUMENT always returning empty BLOB

    Dear community,
    I have a huge problem when using the function APEX_UTIL.GET_PRINT_DOCUMENT in a job or database procedure.
    The following code runs perfectly when I integrate it in the APEX application directly e.g. using a button to execute it (of course I use an anonymous PL/SQL block in APEX itself). But when I run the same code as a procedure or job in the APEX database itself I always receive a mail with an empty PDF:
    CREATE OR REPLACE PROCEDURE APEX_DRUG_SAFETY.CALL_MAIL
    is
    l_id number;
    l_document BLOB;
    BEGIN
    wwv_flow_api.set_security_group_id;
    l_document := APEX_UTIL.GET_PRINT_DOCUMENT
    +(+
    p_application_id=>'105',
    p_report_query_name=>'TestReport',
    p_report_layout_type=>'pdf',
    p_document_format=>'pdf'
    +);+
    l_id := APEX_MAIL.SEND
    +(+
    p_to        => '[email protected]',
    p_from      => '[email protected]',
    p_subj      => 'sending PDF via print API',
    p_body      => 'Please review the attachment.',
    p_body_html => 'Please review the attachment.'
    +);+
    APEX_MAIL.ADD_ATTACHMENT
    +(+
    p_mail_id    => l_id,
    p_attachment => l_document,
    p_filename   => 'mydocument.pdf',
    p_mime_type  => 'application/pdf'
    +);+
    wwv_flow_mail.push_queue(
    P_SMTP_HOSTNAME => 'DESMTP.TEST.COM',
    P_SMTP_PORTNO => '25');
    end;
    The problem is that the function APEX_UTIL.GET_PRINT_DOCUMENT always returns an empty BLOB when executed outside of the APEX application. I found this issue in several other posts in this forum but I did not find a solution.
    The mail transmission itself works perfectly. Also with an attachment if e.g. I use another BLOB already stored in the database for testing purposes. So it is not the mail transmission that causes the problem but the empty variable l_document that is still empty.
    Thanks in advance for the help.

    user9007075 wrote:
    Dear community,
    wwv_flow_api.set_security_group_id;
    you should be using this
        l_workspace_id := apex_util.find_security_group_id (p_workspace => 'YOUR_WORKSPACE_NAME');
        apex_util.set_security_group_id (p_security_group_id => l_workspace_id);
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_util.htm#AEAPI512

  • Apex_util.get_print_document

    All,
    below is a procedure (test_send_attachment1) that I cannot get to work and I've run out of ideas.
    The value of xml_file_clob is detailed below and the rtf file spec is also provided. With these things, someone could, I believe, reproduce the problem.
    I don't receive any errors and I do receive an email with a pdf attached. The problem is the pdf is 'malformed'
    I should add that if I save the query that was used to generate this xml and upload to APEX the rtf file that I provided here and I test the report, it runs fine. Also, when I use the add-in to create the rtf with the below xml file and view the pdf, it processes just fine as well. So I think the "pieces" are correct.
    I am using Oracle BI Publisher Template Builder for Word 10.1.3.4.1 (Build 130)
    Thanks for having a look. I posted this here (even though it's related to BI Publisher) because I feel like the problem is with APEX_UTIL.get_print_document .... If the administrators feel this is better posted in another forum, let me know.
    Regards.
    ============================================================================================
    xml file :
    ============================================================================================
    <ROWSET>
    <ROW>
    <PL_ID>1</PL_ID>
    <PL_DESC>Yield</PL_DESC>
    </ROW>
    <ROW>
    <PL_ID>2</PL_ID>
    <PL_DESC>Dealer markup</PL_DESC>
    </ROW>
    <ROW>
    <PL_ID>3</PL_ID>
    <PL_DESC>Dealer Premium</PL_DESC>
    </ROW>
    <ROW>
    <PL_ID>4</PL_ID>
    <PL_DESC>Flats</PL_DESC>
    </ROW>
    </ROWSET>
    ========================================================================================================
    rtf file:
    ========================================================================================================
    {\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f36\froman\fcharset238\fprq2 Times New Roman CE;}
    {\f37\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f39\froman\fcharset161\fprq2 Times New Roman Greek;}{\f40\froman\fcharset162\fprq2 Times New Roman Tur;}{\f41\froman\fcharset177\fprq2 Times New Roman (Hebrew);}
    {\f42\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f43\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f44\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;
    \red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;
    \red128\green128\blue128;\red192\green192\blue192;\red231\green243\blue253;}{\stylesheet{\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*
    \cs10 \additive \ssemihidden Default Paragraph Font;}{\*
    \ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
    \ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{\*\ts15\tsrowd\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb
    \brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
    \trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
    \ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \sbasedon11 \snext15 \styrsid10303210 Table Grid;}}{\*\rsidtbl \rsid10303210}
    {\*\generator Microsoft Word 10.0.6854;}{\info{\title This is a simple test}{\author g001131}{\operator g001131}{\creatim\yr2009\mo11\dy22\hr15\min38}{\revtim\yr2009\mo11\dy22\hr15\min41}{\version1}{\edmins3}{\nofpages1}{\nofwords17}{\nofchars97}
    {\*\company JPMorgan Chase & Co.}{\nofcharsws113}{\vern16393}{\*\password 00000000}}{\*\xmlnstbl }\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\gutter0
    \widowctrl\ftnbj\aenddoc\grfdocevents0\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1800\dgvorigin1440\dghshow1\dgvshow1
    \jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct\asianbrkrule\rsidroot10303210 \fet0
    {\*\wgrffmtfilter 013f}\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang
    {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7
    \pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain
    \ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid10303210 This is a simple test
    \par }\trowd \irow0\irowband0\ts15\trgaph108\trleft-108\trhdr\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
    \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid7238448\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
    \brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clcbpat17\cltxlrtb\clftsWidth3\clwWidth4428\clcbpatraw17 \cellx4320\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
    \clcbpat17\cltxlrtb\clftsWidth3\clwWidth4428\clcbpatraw17 \cellx8748\pard \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid7238448 {\b\insrsid10303210 Pl Id}{\insrsid10303210\charrsid10303210 \cell }{
    \b\insrsid10303210 Pl Desc}{\insrsid10303210\charrsid10303210 \cell }\pard \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\insrsid10303210 \trowd \irow0\irowband0\ts15\trgaph108\trleft-108\trhdr\trbrdrt
    \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
    \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid7238448\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
    \brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clcbpat17\cltxlrtb\clftsWidth3\clwWidth4428\clcbpatraw17 \cellx4320\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
    \clcbpat17\cltxlrtb\clftsWidth3\clwWidth4428\clcbpatraw17 \cellx8748\row }\trowd \irow1\irowband1\lastrow \ts15\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv
    \brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid7238448\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl
    \brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4428\clshdrawnil \cellx4320\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
    \cltxlrtb\clftsWidth3\clwWidth4428\clshdrawnil \cellx8748\pard \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid7238448 {\field\flddirty{\*\fldinst {\cf9\insrsid10303210\charrsid10303210  FORMTEXT }{
    \cf9\insrsid10303210\charrsid10303210 {\*\datafield 8001000000000000055465787431000246200000000000103c3f666f722d656163683a524f573f3e0000000000}{\*\formfield{\fftype0\ffownhelp\ffownstat\fftypetxt0{\*\ffname Text1}{\*\ffdeftext F }{\*\ffstattext
    <?for-each:ROW?>}}}}}{\fldrslt {\cf9\lang1024\langfe1024\noproof\insrsid10303210\charrsid10303210 F }}}\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\field\flddirty{\*\fldinst {\insrsid10303210\charrsid10303210  FORMTEXT }{
    \insrsid10303210\charrsid10303210 {\*\datafield 80010000000000000554657874320005504c5f49440000000000093c3f504c5f49443f3e0000000000}{\*\formfield{\fftype0\ffownhelp\ffownstat\fftypetxt0{\*\ffname Text2}{\*\ffdeftext PL_ID}{\*\ffstattext <?PL_ID?>}}}}
    }{\fldrslt {\lang1024\langfe1024\noproof\insrsid10303210\charrsid10303210 PL_ID}}}\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\insrsid10303210 \cell }{\field\flddirty{\*\fldinst {\insrsid10303210\charrsid10303210  FORMTEXT }{
    \insrsid10303210\charrsid10303210 {\*\datafield 80010000000000000554657874330007504c5f4445534300000000000b3c3f504c5f444553433f3e0000000000}{\*\formfield{\fftype0\ffownhelp\ffownstat\fftypetxt0{\*\ffname Text3}{\*\ffdeftext PL_DESC}{\*\ffstattext
    <?PL_DESC?>}}}}}{\fldrslt {\lang1024\langfe1024\noproof\insrsid10303210\charrsid10303210 PL_DESC}}}\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\field\flddirty{\*\fldinst {\cf9\insrsid10303210\charrsid10303210  FORMTEXT }{
    \cf9\insrsid10303210\charrsid10303210 {\*\datafield 8001000000000000055465787434000220450000000000103c3f656e6420666f722d656163683f3e0000000000}{\*\formfield{\fftype0\ffownhelp\ffownstat\fftypetxt0{\*\ffname Text4}{\*\ffdeftext  E}{\*\ffstattext
    <?end for-each?>}}}}}{\fldrslt {\cf9\lang1024\langfe1024\noproof\insrsid10303210\charrsid10303210  E}}}\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\insrsid10303210 \cell }\pard
    \ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\insrsid10303210 \trowd \irow1\irowband1\lastrow \ts15\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10
    \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid7238448\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol\tblind0\tblindtype3 \clvertalt\clbrdrt
    \brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4428\clshdrawnil \cellx4320\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
    \cltxlrtb\clftsWidth3\clwWidth4428\clshdrawnil \cellx8748\row }\pard \ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\insrsid10303210
    \par
    \par }}
    ===========================================================================================
    PROCEDURE DEFINITION
    ===========================================================================================
    procedure test_send_attachment1 is
    l_id number;
    l_document blob;
    v_data clob;
    v_fmt clob;
    begin
    select xml_file_clob, rtf_layout_clob
    into v_data, v_fmt
    from profitauto.xml_test1
    where xml_id = 10;
    l_document :=
    apex_util.get_print_document(p_report_data => v_data
    ,p_report_layout => v_fmt
    ,p_report_layout_type => 'rtf'
    ,p_document_format => 'pdf');
    l_id :=
    apex_mail.send(p_to => [email protected]
    ,p_from => '[email protected]'
    ,p_subj => 'test_send_attachment1'
    ,p_body => 'Please review the attachment.'
    ,p_body_html => 'Please review the attachment');
    apex_mail.add_attachment(p_mail_id => l_id
    ,p_attachment => l_document
    ,p_filename => 'mydocument.pdf'
    ,p_mime_type => 'application/pdf');
    end test_send_attachment1;

    Anyone?

  • APEX_UTIL.GET_PRINT_DOCUMENT Error Unable to get the document

    Hi,
       I am working on Oracle APEX 4.1 to send the report as an attachment through mail  I am unable to get the document while calling the APEX_UTIL.get_print_document. I have created a report query and report template (rtf template) so as to send the report as an email attachment. The report works fine individually upon clicking of button so there is no issue in BI publisher configuration. I am sure there is something very trivial which I am missing out here. Any help will be appreciated.
    Declare
       l_id number;
       l_document BLOB;
       l_error_msg varchar2(2000);
    BEGIN
       l_document := APEX_UTIL.GET_PRINT_DOCUMENT
             p_application_id=>'123',
             p_report_query_name=>'Sample_Report',   
             p_report_layout_name=> 'Sample_Report',
             p_report_layout_type=>'RTF',
             p_document_format=>'PDF',
             p_print_server => 'f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=Sample_Report'
       IF l_document is null
       THEN
           dbms_output.put_line( ' no report returned');
          l_error_msg:='<html> <body> <h1 > Apologies the report was not returned from the apex , as there is some printing issues </h1> </body> </html> ';
       ELSE
          l_error_msg:=null;
       END IF;
       IF l_error_msg IS NULL THEN
           l_id := APEX_MAIL.SEND(
           p_to => '[email protected]',
           p_from => '[email protected]',
           p_subj => 'APEX_MAIL with attachment',
           p_body => 'Please review the attachment.',
           p_body_html => '<b>Please</b> review the attachment' || l_error_msg);
          dbms_output.put_line(l_id);
          IF l_document is not null then
             APEX_MAIL.ADD_ATTACHMENT (
                        p_mail_id => l_id,
                        p_attachment => l_document,
                        p_filename => 'Sample_Report.pdf',
                        p_mime_type => 'application/pdf');
          END IF;
    END IF;
    END;
    Here the output says no report returned.
    Thanks & Regards
    Ahmed

    Try removing the parameter p_print_server from the call.  This will use your default print server which should already be configured to use the BI Publisher engine.

  • Apex_util.get_print_document results in "503-service unavailable"

    I'm using APEX 4.2.0.3.00.08 with GlassFish 3.1.2.2 on an Oracle 10.2.0.5 database.
    Recently I created a report-query together with a xsl-fo report-layout created in Altova Stylevision. I've enabled and configured print-options and when I press my application button, I'm perfectly capable of viewing and/or saving the pdf-version of my report.
    Additionally I want to save my report as BLOB in the database, but when I try this using apex_util.get_print_document, all I get in my table is a html-page containing the message "503-service unavailable".
    I used the following page as reference:
    Creating High Fidelity PDF Reports with Oracle Application Express but apparently I'm missing something or doing something wrong......I truly hope there's someone out here to help me!!
    Thanks in advance!

    Hello Mike,
    I've been trying to create an application on apex.oracle.com to reproduce the problem, but I can't seem to get it to work.
    I've uploaded a very simple layout created in StylusStudio, a simple query on the EMP-table only containgin FIRST_NAME, LAST_NAME and EMAIL and when I add the layout to the query and press "Test report", it works fine.
    When I run the report from my application, it only shows a pdf with a thick, horizontal lines, like it's showing only empty cell borders.
    Meanwhile I found out that the APEX-listener keeps reporting similair errors, even when I use that same simple stylesheet (created with StylusStudio) on the EMP-table, even when the stylesheet does not contain any special characters at all. In stead of the message starting with INFO: Character decoding failed. Parameter [#x200B;</xsl:text> , it then ignores the complete xslt-stylesheet (the complete contents of the stylesheet is between the brackets, in stead of just the string containg the special chars).
    To be honest I'm a little lost now. First my focus was on how to get rid of the special characters, but now it looks like, even when I might succeed in that, it doesn't even solve my problem.
    Any idea why my application doesn't show me the same report I see when testing the report-query?
    The application can be found here:
    https://apex.oracle.com/pls/apex/htmldb/f?p=29586
    The bottom region is an attempt to show the pdf with the highest id, but I think it does not show the actual pdf (http-404)
    The source for that PL/SQL region is:
    declare
      src_  varchar2(256);
      mime_ varchar(48);
      id_   number;
    begin
    select max(id)
    into id_
    from report_archive;
        select mimetype
          into mime_
          from report_archive
         where id = id_;
        src_ := 'src="#OWNER#.download_doc?i_doc_id=' || id_ || '" ';
        htp.p('<div style="">');
        if instr(mime_,'pdf') > 0 then
          htp.p('<embed height="800" width="1200" name="statement" ');
        elsif instr(mime_,'excel') > 0 then
          htp.p('<embed height="800" width="1200" name="statement" ');
        else
          htp.p('<embed height="800" name="statement" ');
        end if;
        htp.p(src_);
        htp.p('type="' || mime_ || '" />');
        htp.p('</div>');
    exception
       when no_data_found then
          null;
    end;
    I really hope we can solve this!!!!
    Best regards,
    Marco

  • Apex_util.get_print_document not generating correct output

    hello,
    Basically what I've done is this.
    1) stored a very simple xml file in a clob field called xml_file_clob in a table called xml_test1
    2) stored an rtf file in a clob field called rtf_layout in a table called xml_test1
    3) created a procedure (below) called generate_report_as_blob which attempts to combine the xml and layout and generate a PDF from it which is stored into a blob field in the same table where 1) and 2) are above .....
    4) I have confirmed that taking the clobs in 1) and 2) from the table above and creating xml and rtf files on my desktop that I can open the rtf file in Word, load the xml file and preview it and it does render the pdf as intended (so I think my clobs in the table are good)
    5) run the procedure below. It compiles and runs with no errors but generates a file into the blob column that when downloaded to my desktop looks like the below output (when opening w/ pdf it says there was an error opening the file)
    Any thoughts are greatly appreciated. I feel like I'm really close and am excited about what I could do with this if this can work.
    Thanks in advance, KW
    =========================================================================
    MY PROC
    ============================
    procedure generate_report_as_blob is
    v_xml xmltype;
    rtf_layout clob;
    v_rpt_output blob;
    v_xml_rpt_data clob;
    begin
    select xml_file_clob, rtf_layout_clob
    into v_xml_rpt_data, rtf_layout
    from xml_test1
    where xml_id = 2;
    v_rpt_output :=
    apex_util.get_print_document(p_report_data => v_xml_rpt_data
    ,p_report_layout => rtf_layout
    ,p_report_layout_type => 'rtf'
    ,p_document_format => 'pdf'
    ,p_print_server => null);
    update xml_test1
    set rpt_pdf_output = v_rpt_output
    where xml_id = 2;
    commit;
    end generate_report_as_blob;
    ==========================================================================
    ==========================================================================
    MY OUTPUT (as apdf file) :
    =================
    %PDF-1.4
    1 0 obj
    <<
    /Type /Catalog
    /Pages 3 0 R
    >>
    endobj
    2 0 obj
    <<
    /Type /Info
    /Producer (Oracle BI Publisher 10.1.3.4.0)
    >>
    endobj
    3 0 obj
    <<
    /Type /Pages
    /Kids [
    /Count 0
    >>
    endobj
    4 0 obj
    <<
    /ProcSet [ /PDF /Text ]
    >>
    endobj
    xref
    0 5
    0000000000 65535 f
    0000000010 00000 n
    0000000065 00000 n
    0000000147 00000 n
    0000000208 00000 n
    trailer
    <<
    /Size 5
    /Root 1 0 R
    /Info 2 0 R
    /ID [<fdd8d0c54769561cc797a7c9d0ae42cd><fdd8d0c54769561cc797a7c9d0ae42cd>]
    >>
    startxref
    258
    %%EOF
    ====================================
    Edited by: Ken Wood on Oct 30, 2009 8:56 AM

    I have the same problem exactly...works as an APEX proc, will not work from sqlplus despite setting security group id. Mail works. Attachments with another BLOB works. But I can't get this function to give me the BLOB.

  • Making apex_util.get_print_document return an error message

    We are using apex_util.get_print_document in a process to run a report something like this:
    declare
       l_report blob := null;
    begin
        l_report := apex_util.get_print_document (
            p_application_id      => :APP_ID,
            p_report_query_name   => 'report_query_name',
            p_report_layout_name  => 'report_layout_name',
            p_report_layout_type  => 'rtf',
            p_document_format     => 'rtf'
       if l_report is not null and dbms_lob.getlength(l_report) > 0 then
          apex_application.g_print_success_message := 'Report Created.<br>';       
          INSERT INTO reports (attachment, date_created, filename, mime_type)
          VALUES (l_report, sysdate, 'report.rtf', 'text/rtf' );       
       else       
          apex_application.g_print_success_message := '<span style="color:#CC0000">There was a problem creating the report.</span><br>';   
       end if; 
    end;And this works well most of the time. The problem is, if the report fails for some reason, apex_util.get_print_document gives no information whatsoever as to what went wrong. Is there any way at all we can find out what the problem was?
    Application Express 4.0.2.00.07
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

    Hi,
    add exception to your code.
    declare
       l_report blob := null;
    begin
        l_report := apex_util.get_print_document (
            p_application_id      => :APP_ID,
            p_report_query_name   => 'report_query_name',
            p_report_layout_name  => 'report_layout_name',
            p_report_layout_type  => 'rtf',
            p_document_format     => 'rtf'
       if l_report is not null and dbms_lob.getlength(l_report) > 0 then
          apex_application.g_print_success_message := 'Report Created.<br>';       
          INSERT INTO reports (attachment, date_created, filename, mime_type)
          VALUES (l_report, sysdate, 'report.rtf', 'text/rtf' );       
       else       
          apex_application.g_print_success_message := '<span style="color:#CC0000">There was a problem creating the report.</span><br>';   
       end if; 
    EXCEPTION
       WHEN OTHERS THEN
          raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    end;This will give proper error message.
    Hope this will helps you.
    Regards,
    Jitendra

  • Apex_util.get_print_document returns empty blob

    Hi,
    I'm trying to convert a xsl-fo template into PDF. I have the following code:
    begin
    declare
    v_retval blob;
    v_data blob;
    v_xls clob;
    v_xml_dat clob;
    begin
    select page_template
    into v_xls
    from flows_030100.wwv_flow_report_layouts
    where flow_id =101
    and report_layout_name = 'vv';
    v_xml_dat := to_clob('<data><row><dat1>fff</dat1></row></data>');
    v_data := wwv_flow_utilities.clob_to_blob(v_xml_dat);
    v_retval := apex_util.get_print_document (v_data,v_xls,'xsl-fo','pdf')
    htp.p(dbms_lob.getlength(v_retval));
    end;
    end;
    This returns 0 instead of some PDF document. I guess there is something wrong with my input, probably the XML data. Any thoughts?

    Anyone?

  • APEX_UTIL.GET_PRINT_DOCUMENT  not returning anything

    I have a report query and have provided a layout to print it
    I need to get the html generated from the report so that I can mail it.
    As I could not get the generated file in the PL/SQL package written , for quick testing I started testing using a SQL stmt to check for the length of the LOB
    select dbms_lob.getlength(APEX_UTIL.GET_PRINT_DOCUMENT (
    p_application_id=>my_app_id,
    p_report_query_name=>'name of qry',
    p_report_layout_name=>'name of layout',
    p_report_layout_type=>'rtf',
    p_document_format=>'htm')) lob_size
    from dual
    I also tried by providing the p_print_server => null in addition to the parameters passed.
    But the query returns NULL only.
    The qry and layout are correct as the query when tested in the edit qry screen in APEX shows the output report in the format required (including html , PDF etc)
    Any pointers ?
    Thx
    Edited by: user618186 on Apr 24, 2009 2:35 PM
    Edited by: user618186 on Apr 24, 2009 2:36 PM

    I have the same problem exactly...works as an APEX proc, will not work from sqlplus despite setting security group id. Mail works. Attachments with another BLOB works. But I can't get this function to give me the BLOB.

  • How to protect an application running on IIS with OAM 11gR2

    Hello Gurus,
    I have a question regarding protecting an application running on IIS with OAM 11gR2. We have an OHS server running and all the requests from the users are coming to this OHS server webgate for them to login using the SSO login page. These is all solaris. I am protecting other applications like pplsoft moduels with this OHS instance and OAM server. There is another application that I need to protect which is itself running on IIS windows machine. I need guidance as to -
    1.) Do I need to install a windows version of webgate to protect this IIS based application?
    2.) Or I can still protect and proxy requests from this application to current OHS instance? How can I do this?
    3.) Or Do I need to proxy requests directly from IIS to OAM weblogic server?
    Please advise to the earliest as this is an urgent issue.
    Thanks !!

    From your description it is not clear how exactly architecture looks like
    We have an OHS server running and all the requests from the users are coming to this OHS server webgate for them to login using the SSO login page.
    is this OHS centralized login farm ? (Case 1)
    OR is this OHS server (with webgate) acting as virtual web server hosting multiple web sites so that request to any site passes through this OHS/webgate (Case 2)
    1.) Do I need to install a windows version of webgate to protect this IIS based application?
    If case 1 then you need to install 10g webgate on top of IIS server to protect this application
    If case 2 then you can just proxy request from OHS to IIS server. As every request passes through OHS user will be authenticated before request hits IIS
    Look at Product documentation for virtual web sites : http://docs.oracle.com/cd/E27559_01/admin.1112/e27239/shared.htm#autoId12
    It has steps to protect virtual web sites.
    Also you need to make sure no one hits IIIS web sites directly.
    Hope this helps

  • OCDM  - Sample Report Installation issue - Runs too longer with No progress

    Hello,
    As a part of OCDM environment setup for Practice we were successful installing following :
    * Supported Enterprise Linux
    * Oracle DB 11g R2 (OLAP & MINING option)
    * OWB was already installed as a part of Oracle DB 11gR2 - just unlocked the OWB accounts.
    * Installed OBIEE 11g R2 installation - Installation successful and able to open url's. (analytics and BI Publisher etc.) - Issue with login account.
    * Installation of Communication Data Model (First Installation type from OCDM Installer)
    When we try to install Sample Reports at same stage the screen remain open and runs too longer with No progress.
    The Installation process for OCDM Sample Reports is given in the attached doc with screenshot and the log file is also included in the attached document.
    Please let us know the following two issue:
    1) How to login to Analytics after OBIEE 11gR2 installed on Linux - ( in our case we use user as Administrator and tried password same as username, even checked with the user weblogic and other but no success. Please provide us the information which give details(document) about the Administartion of OBIEE 11gR2 on Linux).
    2) The issue with installation of OCDM Sampple Reports though successful installation of OCDM Data Model.(First Installation Type from OCDM Installer)
    Thanks & Best Regards,
    Amol Thite
    I think, I cant Attach the file here and character limit is 30K for the post here so putting below the few lines of Log File content:
    I can email the screen shots docs and complete log file on request if needed.
    It stuck in Configuration Assistance screen -
    After more than 1 hour the same screen – No progress – I tried 3 times but same issue. Log file also not growing and seems its waiting for some dependent thing that need to happen before it proceed.
    =====start few lines of Log File=======================================
    The file oraparam.ini could not be found at /u01/app/oracle/product/11.1.0/db_1/oui/bin/oraparam.ini
    Using paramFile: /u01/app/oracle/product/11.1.0/db_1/oui/oraparam.ini
    Checking swap space: must be greater than 500 MB. Actual 1027 MB Passed
    Checking monitor: must be configured to display at least 256 colors. Actual 65536 Passed
    The number of files bootstrapped for the jre is 689.
    The number of files bootstrapped for the oui is 77.
    Using the umask value '022' available from oraparam.ini
    =====end few lines of Log File==================================
    INFO: Copying Aggr XML for: Oracle Communications Data Model
    INFO: The Top level Aggreage File = /u01/app/oracle/product/11.1.0/db_1/inventory/ContentsXML/ConfigXML/oracle.ocdm.11_2_3_0_0.xml
    INFO: deleted all the required instance files
    INFO: OUI_CAPlugIn is not found in XML
    INFO: cf session will be created for OH: /u01/app/oracle/product/11.1.0/db_1/ TLAggr: oracle.ocdm instancePath: inventory/ContentsXML/ConfigXML/
    INFO: cf session for OH: /u01/app/oracle/product/11.1.0/db_1/ TL Aggr: [oracle.ocdm] instancePath: inventory/ContentsXML/ConfigXML/
    INFO: aggr ref length : 2
    INFO: cf session hashcode: 22855989
    INFO: cf session saved with key: OraDb11g_home1 oracle.ocdm
    INFO: cf session is ok
    INFO: created and saved cf session for oh: OraDb11g_home1
    INFO: passing params to cf
    INFO: Handling the storing of variables for aggr name oracle.ocdm
    INFO: This variable sl_ASMSelectableDiskGroups is not added to the global context map
    INFO: This variable s_scratchPath is not added to the global context map
    INFO: exitonly tools to be excuted passed: 0
    INFO: Starting to execute configuration assistants
    INFO: Command = oracle.ocdm.OCDMCfgPlugIn /u01/app/oracle/product/11.1.0/db_1/ocdm/ocdm_install.sh ${s_dbSysPasswd}
    OCDMCfgPlugIn: Starting OCDM configuration...
    OCDMCfgPlugIn: OCDM configuration initialized, waiting for script response...
    OCDMCfgPlugIn: Receiving SYSTEM password...
    OCDMCfgPlugIn: Passing SYSTEM credentials to configuration script...
    OCDMCfgPlugIn: SYSTEM credentials passed to configuration script.
    OCDMCfgPlugIn: SYSTEM password received.
    OCDMCfgPlugIn: Initializing config parameteres...
    OCDMCfgPlugIn: Creating log folder...
    OCDMCfgPlugIn: ocdm log folder exist
    OCDMCfgPlugIn: Exporting config env...
    OCDMCfgPlugIn: Performing OWB check...
    OCDMCfgPlugIn: Installing OWB...
    OCDMCfgPlugIn: WARNING: OWB OWNER already exists.
    OCDMCfgPlugIn: Archive: /u01/app/oracle/product/11.1.0/db_1/ocdm/pdm/relational/sample_schema/ocdm_sample.dmp.zip
    OCDMCfgPlugIn: inflating: /u01/app/oracle/product/11.1.0/db_1/ocdm/install_tmp/ocdm_sample.dmp
    OCDMCfgPlugIn: 2011_02_28_11_24_30 10 % complete
    OCDMCfgPlugIn: Importing OCDM sample schema
    ==================end of log File ========================================

    Hi Please check my answers
    1) How to login to Analytics after OBIEE 11gR2 installed on Linux - ( in our case we use user as Administrator and tried password same as username, even checked with the user weblogic and other but no success. Please provide us the information which give details(document) about the Administartion of OBIEE 11gR2 on Linux).
    The current OCDM version does not support BIEE 11g, so you need to install BIEE 10g. In next release(will be available soon), OCDM will support BIEE 11g.
    2) The issue with installation of OCDM Sampple Reports though successful installation of OCDM Data Model.(First Installation Type from OCDM Installer)
    The importing will take a long time, you can login database with ocdm_sample_sys/ocdm_sample_sys, and use "select count(*) from tabs;" to monitor the import process.

  • Unable to run code analysis with WDK 9926

    Hi,
    I am trying to run code analysis with WDK 9926 and seeing below issue? can anybody help me to resolve this ?
    Error:
    ====
    C:\sw\dev\T4\windows\Src\kernel\vbd>msbuild.exe cht4vbd.vcxproj /p:Configuration="Windows 8.1 Debug" /P:Platform=x64 /P:RunCodeAnalysisOnce=True
    Microsoft (R) Build Engine version 12.0.21005.1
    [Microsoft .NET Framework, version 4.0.30319.33440]
    Copyright (C) Microsoft Corporation. All rights reserved.
    Build started 4/7/2015 12:08:30 AM.
    Project "C:\sw\dev\T4\windows\Src\kernel\vbd\cht4vbd.vcxproj" on node 1 (defaul
    t targets).
    DriverBuildNotifications:
      Building 'cht4vbd' with toolset 'WindowsKernelModeDriver10.0' and the 'Deskto
      p' target platform.
      Using KMDF 1.11.
    PrepareForBuild:
      Creating directory "x64\Windows8.1Debug\".
      Creating directory "C:\sw\dev\T4\windows\Src\kernel\vbd\x64\Windows8.1Debug\c
      hk\x64\".
      Creating directory "x64\Windows8.1Debug\cht4vbd.tlog\".
    InitializeBuildStatus:
      Creating "x64\Windows8.1Debug\cht4vbd.tlog\unsuccessfulbuild" because "Always
      Create" was specified.
    StampInf:
      c:\Program Files (x86)\Windows Kits\10\bin\x86\stampinf.exe -d "*" -a "amd64"
       -k "1.11" -f x64\Windows8.1Debug\chvbdx64.inf
      Copying "C:\sw\dev\T4\windows\Src\kernel\vbd\chvbdx64.inf" to "x64\Windows8.1
      Debug\chvbdx64.inf" for stamping
      Using version information from c:\Program Files (x86)\Windows Kits\10\Include
      \shared\\ntverp.h
      Could not open version header file c:\Program Files (x86)\Windows Kits\10\Inc
      lude\shared\\bldnump.h. (0x00000002)
      Could not determine version information.  Please specify using -v option.
      Updates common INF file directives
            USAGE:
            stampinf -f filename [-s section] [-d <xx/yy/zzzz> | *]
                     -a architecture -n [-c catalogfile]
                                 [-v <w.x.y.z> | *]
                                 [-k nnnnn] [-u nnnnn]
                                 [-i path]
            -f  specifies the INF file to process
            -s  specifies the INF section to place the DriverVer= directive.  By
                default this directive is placed in the [Version] section.
            -d  specifies the date written in the DriverVer= directive.  Note that
                a '*' given for a date value means for stampinf to write the
                current date. If the date is not specified, the date is taken
                from the STAMPINF_DATE environment variable.
            -v  specifies the version written in the DriverVer= directive. Note
                that a '*' given for a version value means for stampinf to write
                the current time (h.m.s.ms).  This is useful during development
                in order to get increasing version numbers. If the version is not
                specified, its value is taken from the STAMPINF_VERSION
                environment variable.
            -a  specifies the architecture string to replace the $ARCH$ keyword.
                The $ARCH$ keyword is used to tailor a TargetOSVersion decoration
                in a [Manufacturer] section, as well as its respective section
                name, to a specific platform. If no value is specified, stampinf
                takes its value from the _BuildArch environment variable.
            -c  specifies the value to be written in the CatalogFile= directive
                in the [Version] section. By default, this directive is not
                written.
            -k  specifies the version of KMDF that this driver depends on.  This
                is used to tailor the KmdfLibraryVersion & KMDF co-installer name
                in the INF. This will replace the $KMDFVERSION$ and
                $KMDFCOINSTALLERVERSION$ keywords in the INF.  The string is of
                the format:
                    <major_version>.<minor_version>
                As an example, supplying 1.5 as the version string will result in
                values of 1.5 and 01005 for the two keywords (respectively).
            -u  specifies the version of UMDF that this driver depends on.  This
                is used to tailor the UmdfLibraryVersion & UMDF co-installer name
                in the INF. This will replace the $UMDFVERSION$ and
                $UMDFCOINSTALLERVERSION$ keywords in the INF.  The string is of
                the format:
                    <major_version>.<minor_version>.<service_version>
                (where service_version is generally zero)
                As an example, supplying 1.5.0 as the version string will result
                in values of 1.5.0 and 01005 for the two keywords (respectively).
            -i  specifies the location of ntverp.h file.
                path represent the fully qualified
                location of the directory containing ntverp.h.
            -n  noisy mode shows verbose stampinf output
              -x  removes the coinstaller tag from the file and replaces the line w
      ith a ";"
            NOTES:
            The environment variable PRIVATE_DRIVER_PACKAGE can be set to
            enable stampinf's 'developer mode' behavior. When this is
            set, the date and version used for DriverVer is set to the
            current date and time, regardless of the command line
            settings. Also, 'CatalogFile=delta.cat' is written to the
            version section, unless a catalog was already specified
            with '-c'.
    c:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets(355,5
    ): error MSB6006: "stampinf.exe" exited with code 1. [C:\sw\dev\T4\windows\Src\
    kernel\vbd\cht4vbd.vcxproj]
    Done Building Project "C:\sw\dev\T4\windows\Src\kernel\vbd\cht4vbd.vcxproj" (de
    fault targets) -- FAILED.
    Build FAILED.
    "C:\sw\dev\T4\windows\Src\kernel\vbd\cht4vbd.vcxproj" (default target) (1) ->
    (StampInf target) ->
      c:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets(355
    ,5): error MSB6006: "stampinf.exe" exited with code 1. [C:\sw\dev\T4\windows\Sr
    c\kernel\vbd\cht4vbd.vcxproj]
        0 Warning(s)
        1 Error(s)
    Time Elapsed 00:00:04.07
    Thanks, Krishna

    Hi,
    I am trying to run code analysis with WDK 9926 and seeing below issue? can anybody help me to resolve this ?
    Error:
    ====
    C:\sw\dev\T4\windows\Src\kernel\vbd>msbuild.exe cht4vbd.vcxproj /p:Configuration="Windows 8.1 Debug" /P:Platform=x64 /P:RunCodeAnalysisOnce=True
    Microsoft (R) Build Engine version 12.0.21005.1
    [Microsoft .NET Framework, version 4.0.30319.33440]
    Copyright (C) Microsoft Corporation. All rights reserved.
    Build started 4/7/2015 12:08:30 AM.
    Project "C:\sw\dev\T4\windows\Src\kernel\vbd\cht4vbd.vcxproj" on node 1 (defaul
    t targets).
    DriverBuildNotifications:
      Building 'cht4vbd' with toolset 'WindowsKernelModeDriver10.0' and the 'Deskto
      p' target platform.
      Using KMDF 1.11.
    PrepareForBuild:
      Creating directory "x64\Windows8.1Debug\".
      Creating directory "C:\sw\dev\T4\windows\Src\kernel\vbd\x64\Windows8.1Debug\c
      hk\x64\".
      Creating directory "x64\Windows8.1Debug\cht4vbd.tlog\".
    InitializeBuildStatus:
      Creating "x64\Windows8.1Debug\cht4vbd.tlog\unsuccessfulbuild" because "Always
      Create" was specified.
    StampInf:
      c:\Program Files (x86)\Windows Kits\10\bin\x86\stampinf.exe -d "*" -a "amd64"
       -k "1.11" -f x64\Windows8.1Debug\chvbdx64.inf
      Copying "C:\sw\dev\T4\windows\Src\kernel\vbd\chvbdx64.inf" to "x64\Windows8.1
      Debug\chvbdx64.inf" for stamping
      Using version information from c:\Program Files (x86)\Windows Kits\10\Include
      \shared\\ntverp.h
      Could not open version header file c:\Program Files (x86)\Windows Kits\10\Inc
      lude\shared\\bldnump.h. (0x00000002)
      Could not determine version information.  Please specify using -v option.
      Updates common INF file directives
            USAGE:
            stampinf -f filename [-s section] [-d <xx/yy/zzzz> | *]
                     -a architecture -n [-c catalogfile]
                                 [-v <w.x.y.z> | *]
                                 [-k nnnnn] [-u nnnnn]
                                 [-i path]
            -f  specifies the INF file to process
            -s  specifies the INF section to place the DriverVer= directive.  By
                default this directive is placed in the [Version] section.
            -d  specifies the date written in the DriverVer= directive.  Note that
                a '*' given for a date value means for stampinf to write the
                current date. If the date is not specified, the date is taken
                from the STAMPINF_DATE environment variable.
            -v  specifies the version written in the DriverVer= directive. Note
                that a '*' given for a version value means for stampinf to write
                the current time (h.m.s.ms).  This is useful during development
                in order to get increasing version numbers. If the version is not
                specified, its value is taken from the STAMPINF_VERSION
                environment variable.
            -a  specifies the architecture string to replace the $ARCH$ keyword.
                The $ARCH$ keyword is used to tailor a TargetOSVersion decoration
                in a [Manufacturer] section, as well as its respective section
                name, to a specific platform. If no value is specified, stampinf
                takes its value from the _BuildArch environment variable.
            -c  specifies the value to be written in the CatalogFile= directive
                in the [Version] section. By default, this directive is not
                written.
            -k  specifies the version of KMDF that this driver depends on.  This
                is used to tailor the KmdfLibraryVersion & KMDF co-installer name
                in the INF. This will replace the $KMDFVERSION$ and
                $KMDFCOINSTALLERVERSION$ keywords in the INF.  The string is of
                the format:
                    <major_version>.<minor_version>
                As an example, supplying 1.5 as the version string will result in
                values of 1.5 and 01005 for the two keywords (respectively).
            -u  specifies the version of UMDF that this driver depends on.  This
                is used to tailor the UmdfLibraryVersion & UMDF co-installer name
                in the INF. This will replace the $UMDFVERSION$ and
                $UMDFCOINSTALLERVERSION$ keywords in the INF.  The string is of
                the format:
                    <major_version>.<minor_version>.<service_version>
                (where service_version is generally zero)
                As an example, supplying 1.5.0 as the version string will result
                in values of 1.5.0 and 01005 for the two keywords (respectively).
            -i  specifies the location of ntverp.h file.
                path represent the fully qualified
                location of the directory containing ntverp.h.
            -n  noisy mode shows verbose stampinf output
              -x  removes the coinstaller tag from the file and replaces the line w
      ith a ";"
            NOTES:
            The environment variable PRIVATE_DRIVER_PACKAGE can be set to
            enable stampinf's 'developer mode' behavior. When this is
            set, the date and version used for DriverVer is set to the
            current date and time, regardless of the command line
            settings. Also, 'CatalogFile=delta.cat' is written to the
            version section, unless a catalog was already specified
            with '-c'.
    c:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets(355,5
    ): error MSB6006: "stampinf.exe" exited with code 1. [C:\sw\dev\T4\windows\Src\
    kernel\vbd\cht4vbd.vcxproj]
    Done Building Project "C:\sw\dev\T4\windows\Src\kernel\vbd\cht4vbd.vcxproj" (de
    fault targets) -- FAILED.
    Build FAILED.
    "C:\sw\dev\T4\windows\Src\kernel\vbd\cht4vbd.vcxproj" (default target) (1) ->
    (StampInf target) ->
      c:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets(355
    ,5): error MSB6006: "stampinf.exe" exited with code 1. [C:\sw\dev\T4\windows\Sr
    c\kernel\vbd\cht4vbd.vcxproj]
        0 Warning(s)
        1 Error(s)
    Time Elapsed 00:00:04.07
    Thanks, Krishna

Maybe you are looking for

  • Photoshop CS2 RAW (NEF) Issue

    Hi, My RAW (.NEF) files will not open in Photoshop CS2. Everytime I try to open a raw image it says... "Could not complete your request because Photoshop does not recognize this type of file" Don't know what to do. CS2 on OSX 10.5.8 with Nikon D90 ph

  • How do i repair a corrupt hard drive and i lost my install disk

    My Macbook started acting up....when rebooting there was a flashing file folder with a ? inside. Finally got to reboot, ran Disk Verfiy and my hard drive is corrupt. We just moved and I have no install disc. How do I repair my hard drive?

  • Document "Check In" fails

    Hi All, I need your help. My use case is to edit a document locally which fails. In detail:    After pressing Edit locally the file opens in the right application.    Then I change some entries in the document, save it and want to check in the doc.  

  • IPad & memory issue....please help....

    Ok I keep getting this message when I use We Rule,and rock band....http://comparemacbook.com/2010/04/05/sorry-your-ipad-is-too-low-on-memory/ .....And I've had constant slowdowns on some apps,and just typing lags allot of times....I'm hesitant to res

  • Fast pixel access

    Hi there, I need to display an image that can change over time (the pixel values are subject to change). I get the image changes (int[] array) from the network and every time a change happens (and I get raw pixel data from the network) I need to upda