Get report file name in oracle report builder at run time
Dear All,
Is there any way to get the report file name in oracle report builder at run time?
for example "HR_REP012.REP"
i need this very important...
Regards,
Yousef
Edited by: Yousef_m on Jun 2, 2012 5:18 AM
Hello,
Did you try the builtin SRW.GET_REPORT_NAME built-in function ?
Example
function AfterPForm return boolean is
my_var varchar2(80);
BEGIN
SRW.GET_REPORT_NAME(my_var);
SRW.MESSAGE(0,'Report Filename = '||my_var);
RETURN (TRUE);
END;
Regards
Similar Messages
-
How to get the file name from Oracle B2B 10g
Hi My requirement is I am getting a CSV file from Trading partner, I am using oracle 10g b2b to translate the data.
In my BPEL 10g I am using AQ adapter to get the message from IP_IN_QUEUE.
Now I want to get the file name Eg: SampleFile.dat of the CSV file in my BPEL process.
I tried using the b2b.filename property in the receive activity and it is not getting the file name.
<sequence name="main">
<receive name="Receive_Note" partnerLink="GetB2BNote"
portType="ns1:Dequeue_ptt" operation="Dequeue"
variable="Receive_Note_Dequeue_InputVariable"
createInstance="yes">
<bpelx:property name="b2b.fileName" variable="WriteFileName"/>
</receive>
</sequence>
Can you help me to get the file name from Oracle b2b 10g ?
Thanks,
b2b userHi My requirement is I am getting a CSV file from Trading partner, I am using oracle 10g b2b to translate the data.
In my BPEL 10g I am using AQ adapter to get the message from IP_IN_QUEUE.
Now I want to get the file name Eg: SampleFile.dat of the CSV file in my BPEL process.
I tried using the b2b.filename property in the receive activity and it is not getting the file name.
<sequence name="main">
<receive name="Receive_Note" partnerLink="GetB2BNote"
portType="ns1:Dequeue_ptt" operation="Dequeue"
variable="Receive_Note_Dequeue_InputVariable"
createInstance="yes">
<bpelx:property name="b2b.fileName" variable="WriteFileName"/>
</receive>
</sequence>
Can you help me to get the file name from Oracle b2b 10g ?
Thanks,
b2b user -
Getting OAS server name in oracle reports
Hi Experts,
I need to get the OAS name in the After parameter form trigger. Is there any built-in funtion that will return the Current OAS name? Please help me. Thanks in advance.
Regards,
J.PHello,
When using the Reports Servlet some "extra" parameters are passed :
http://download.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_run.htm#i1009092
If you want to read these paramaters values , you need to "declare" these parameters in your Reports
Regards -
How to display report server name in oracle reports 9i.
I need to do some validation based on report server name.Pl. suggest.
How do you execute the call for a Report?
URL? -
i am using 9ids
i use
web.show_document() to run report.
now report gets generated into cache and then it is viewed. now i want two things.
1) i want to get the genrated report file name.
2) copy that file to user-end.
through webutil.
pls help me how or give me function/procedure to do this.
thanks.
now report has run.
please guide me further how to get file name from report/cache.
and download into user-end.Rajendra,
webutil can download files based on a URL. Just provide the URL that you usually put into web.show_document() to webutil.
From the comments in webutil.pll:
* DownLoadFromURL - pulls a file from the specified URL on * the server and sends it via http to the specified destination
* on the client
* If you specify file size we can so a comparison after
* download to ensure that the sizes match
* Additionally of you specify withProgress and size you
* will get a progress bar
* Note that the Title, subtitle and message strings cannot
* contain the '|' character
FUNCTION DownLoadFromURL(sourceURL in VARCHAR2,
clientDestination in VARCHAR2,
fileSize in PLS_INTEGER default 0) return BOOLEAN;
FUNCTION DownLoadFromURLWithProgress(sourceURL in VARCHAR2,
clientDestination in VARCHAR2,
fileSize in PLS_INTEGER,
progressTitle in VARCHAR2,
progressSubTitle in VARCHAR2,
progressMessage in VARCHAR2) return BOOLEAN;
Frank -
How can I change the report file name depending on which seq file is run in the main seq?
I'm using TestStand 3.0.
I have a main sequence file with a menu option to select one of several sequence files to run.
How can I get TestStand to change report file name to the selected sequence file rather than the main sequence file name?
Thanks
HarminderHi Harminder
Try RunState.Root.Locals.ReportFilePath = "PathToMyFile.xxx"
regards
Juergen
=s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e= -
PDF file created from Oracle Report is attached wrongly
Hi,
Please help. It is very urgent.
I am using Oracle Developer 10gR2, Oracle Report 10.1.2 on Windows 2000.
I would like to attach the PDF file created by Oracle Report to the Notification sent from Workflow.
I use the following package procedure in my Workflow.
procedure 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;
begin
l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
l_output_directory := 'USR_TMP_DIR';
l_filename := Wf_Engine.GetItemAttrText(l_itemtype, l_itemkey, 'ATR_FILENAME');
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';
end Create_File_Attachment;Oracle Report created the PDF file correctly (original.pdf).
I tried to attach the PDF into my Workflow.
I can see the file is attached (attach.pdf), but it cannot be opened.
The Adobe shows : 'A drawing error occured.' each time I open the attachment.
I compare the original.pdf and the attach.pdf
However, there is one specific difference
- in original.pdf, the line started with '.' (single period)
in attach.pdf, the line is started with '..' (two periods)
Thus the attachment cannot be opened.
After I delete the period, it can be opened.
Question:
- Has someone ever succeed in attaching the PDF created from Report?
- Are the codes above is wrong?
- Or perhaps the DBMS_LOB.LOADBLOBFROMFILE always double the single period on front of the line?
- Is there any solution on this?
Note:
I have succeed in attaching PDF files unless the PDF created by the Report.
Sorry for the long post.
Please help. It is very urgent.
Any help is appreciated.
Many thanks,
BuntoroThe code looks absolutely good. I have the same code working in my system. Only difference is I use TRUE and DBMS_LOB.Session for the BLOB I use to read from the BFILE.
I can suggest one more way to handle to binary attachments if you are on Oracle 9i DB are later versions.
procedure attach_document (p_document_id in varchar2,
p_display_type in varchar2,
p_document in out nocopy clob,
p_document_type in out nocopy varchar2)
is
l_nid number;
l_directory varchar2(100);
l_filename varchar2(100);
l_content_type varchar2(100);
l_src_offset binary_integer := 1;
l_dst_offset binary_integer := 1;
l_err_msg varchar2(100);
l_amount number;
l_bfile BFILE;
l_blob BLOB;
l_clob CLOB;
file_not_found exception;
pragma EXCEPTION_INIT(file_not_found, -22288);
begin
l_nid := to_number(p_document_id);
l_directory := trim(wf_notification.GetAttrText(l_nid, 'ATTR_DIRECTORY'));
l_filename := trim(wf_notification.GetAttrText(l_nid, 'ATTR_FILENAME'));
l_content_type := trim(wf_notification.GetAttrText(l_nid, 'ATTR_CONTENT_TYPE'));
l_bfile := BFILENAME(l_directory, l_filename);
dbms_lob.createtemporary(l_blob, true, dbms_lob.Session);
dbms_lob.createtemporary(l_clob, true, dbms_lob.Session);
begin
dbms_lob.FileOpen(l_bfile, dbms_lob.File_Readonly);
exception
when file_not_found then
l_err_msg := to_char(sqlcode)||' - Attachment File "'||l_filename||'" is not found.';
raise_application_error(-20002, l_err_msg);
end;
dbms_lob.LoadBLOBFromFile(l_blob, l_bfile, dbms_lob.LobMaxSize, l_src_offset, l_dst_offset);
dbms_lob.FileClose(l_bfile);
-- Encode the BLOB content to BASE64 and attach to notification
wf_mail_util.EncodeBLOB(l_blob, l_clob);
l_amount := dbms_lob.GetLength(l_clob);
dbms_lob.Copy(p_document, l_clob, l_amount, 1, 1);
-- Mention an appropriate Content Type so that Notification System
-- understands the attachment content
p_document_type := l_content_type||'; encoding=base64; name='||l_filename;
end attach_document;Here I read the BLOB from the filesystem and base64 encode it before giving it to the Mailer. Please note that this is a PLSQLCLOB based attachment as against PLSQLBLOB that you are using.
Thanks - Vijay -
PDF file created from Oracle Report is created wrongly using dbms_lob
Hi,
Please help. It is very urgent.
I am using Oracle Developer 10gR2, Oracle Report 10.1.2 on Windows 2000.
I would like to attach the PDF file created by Oracle Report to the Notification sent from Workflow.
I use the following package procedure in my Workflow.
procedure 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;
begin
l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
l_output_directory := 'USR_TMP_DIR';
l_filename := Wf_Engine.GetItemAttrText(l_itemtype, l_itemkey, 'ATR_FILENAME');
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';
end Create_File_Attachment;Oracle Report created the PDF file correctly (original.pdf).
I tried to attach the PDF into my Workflow.
I can see the file is attached (attach.pdf), but it cannot be opened.
The Adobe shows : 'A drawing error occured.' each time I open the attachment.
I compare the original.pdf and the attach.pdf
However, there is one specific difference
- in original.pdf, the line started with '.' (single period)
in attach.pdf, the line is started with '..' (two periods)
Thus the attachment cannot be opened.
After I delete the period, it can be opened.
Question:
- Has someone ever succeed in attaching the PDF created from Report?
- Are the codes above is wrong?
- Or perhaps the DBMS_LOB.LOADBLOBFROMFILE always double the single period on front of the line?
- Is there any solution on this?
Note:
I have succeed in attaching PDF files unless the PDF created by the Report.
Sorry for the long post.
Please help. It is very urgent.
Any help is appreciated.
Many thanks,
BuntoroHi,
Please help. It is very urgent.
I am using Oracle Developer 10gR2, Oracle Report 10.1.2 on Windows 2000.
I would like to attach the PDF file created by Oracle Report to the Notification sent from Workflow.
I use the following package procedure in my Workflow.
procedure 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;
begin
l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
l_output_directory := 'USR_TMP_DIR';
l_filename := Wf_Engine.GetItemAttrText(l_itemtype, l_itemkey, 'ATR_FILENAME');
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';
end Create_File_Attachment;Oracle Report created the PDF file correctly (original.pdf).
I tried to attach the PDF into my Workflow.
I can see the file is attached (attach.pdf), but it cannot be opened.
The Adobe shows : 'A drawing error occured.' each time I open the attachment.
I compare the original.pdf and the attach.pdf
However, there is one specific difference
- in original.pdf, the line started with '.' (single period)
in attach.pdf, the line is started with '..' (two periods)
Thus the attachment cannot be opened.
After I delete the period, it can be opened.
Question:
- Has someone ever succeed in attaching the PDF created from Report?
- Are the codes above is wrong?
- Or perhaps the DBMS_LOB.LOADBLOBFROMFILE always double the single period on front of the line?
- Is there any solution on this?
Note:
I have succeed in attaching PDF files unless the PDF created by the Report.
Sorry for the long post.
Please help. It is very urgent.
Any help is appreciated.
Many thanks,
Buntoro -
Retrieve Current Report File Name
i am using Forms and Reports 6i.
in Forms, i am using the following statement to get the current form name -
GET_FORM_PROPERTY (:system.current_form, FILE_NAME)
i didn't find a similar statement in report to get the report file name,
plz help...Hello,
You will have more chance to get an answer by sending this question in the Reports forum.
Francois -
There's probably a simple answer to this but I can't figure it out...
I have made a jsp-page to view my report using CR4E's Create Viewer JSP wizard. Instead of hard-coded report file name, I'm taking the name from URL parameter like this
myviewer.jsp?report=myreport.rpt
The report shows fine until I click any of the controls (next page, print, export, etc.) in HTML-viewer. This seems to run some javascript code that calls the myviewer.jsp again, but loses all URL parameters! How can I preserve those parameters?Page navigation with the viewer works by post-back to the page where you've defined the viewer - the viewer interprets the postback GET parameters for the action required.
This means that the ReportSource must be available for every postback - usually, it's stored in HTTP Session.
Check out the following sample codes:
http://support.businessobjects.com/communityCS/FilesAndUpdates/crxi_r2_jrc_web_samples.zip.asp
Sincerely,
Ted Ueda -
Hello,
I use TesStand 3.1 in Batchmode with 4 Testsockets and generate a XML Testreport for every UUT with the serial number in the file name.
I leave the "Enter UUT Serial Number" dialog boxes at the begin empty.
After that i read out the Serial Number of my UUTs at the runtime via CAN and use the "PostUUT-Callback" to modify the "Parameters.UUT.SerialNumber".
Because of that the UUT Serial Number appears in the Report Header.
But the report filename is always "Report[NO_UUT_SERIAL_NUM0][date][time].xml".
Is it possible to modify the "UUT Serial Number" in the Report File Name, too?
Thanx for your answers!
Greetz ALIENWe modify the report name to include error count, Model, build, etc. but it requires that the Report be complete at that point (file no longer locked by TestStand).
In order to do this, you'll need to create a Sequence (with no Process Model) to call the test sequence using Subsequence call with the "Run Sequence in a New Execution" selected in the "Specify Module", Multithreading selection ring.
There may be other ways to do what you're attempting, but this gives you freedom to rename the file.
Mike -
Getting the variant name when the report program is run in background
Hi All,
How to get the variant name for the report program when run in background? My requirement is to create an email attachement with the name 'variant.XLS', where variant = selection screen variant, when the report program is run in background. The system field SY-SLSET holds the variant name only when run online.
Any pointers to this will be highly appreciated.
Thanks and regards,
Nilesh.Hello Nilesh,
Please find the algo:
1. Call the FM: GET_JOB_RUNTIME_INFO to get the background job details.
2. Select data from TBTCP using these details:
DATA:
FP_EVENTID TYPE BTCEVENTID
FP_EVTPARM TYPE BTCEVTPARM
FP_ACTIVE TYPE BTCXPGFLAG
FP_JOBCNT TYPE BTCJOBCNT
FP_JOBNM TYPE BTCJOB
FP_STEPCNT TYPE BTCSTEPCNT.
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
EVENTID = FP_EVENTID
EVENTPARM = FP_EVTPARM
EXTERNAL_PROGRAM_ACTIVE = FP_ACTIVE
JOBCOUNT = FP_JOBCNT
JOBNAME = FP_JOBNM
STEPCOUNT = FP_STEPCNT
EXCEPTIONS
NO_RUNTIME_INFO = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* Error calling FM: GET_JOB_RUNTIME_INFO
ENDIF.
DATA: FP_VARIANT TYPE BTCVARIANT.
SELECT JOBNAME JOBCOUNT STEPCOUNT VARIANT
FROM TBTCP
INTO TABLE L_IT_TBTCP
WHERE JOBNAME = FP_JOBNM
AND JOBCOUNT = FP_JOBCNT
AND STEPCOUNT = FP_STEPCNT.
IF SY-SUBRC = 0.
SORT L_IT_TBTCP BY JOBNM JOBCNT STEPCNT.
READ TABLE L_IT_TBTCP INTO L_WA_TBTCP INDEX 1.
IF SY-SUBRC = 0.
FP_VARIANT = L_WA_TBTCP-VARIANT.
ENDIF.
ENDIF.
Hope this helps.
BR,
Suhas -
Overwrite crystal report file name with new version but keep history
I am writing a Crystal Reports .NET SDK in C# code to upload a crystal report files from its destination to CMC folder on BO XI R2 Platform.
On "Upload Button" click_event, validate the two check boxes controls named "Keep History", and "Remove History". Once "Keep History" check box is selected, check If the SAME report file name exists in the same destination CMC folder, if Yes, overwrite it BUT Keep the History and all its associated objects like "recurring objects". If "Remove History" is selected, then remove the existing report and upload the new report file name.
Please provide me some codes on how to do this task. This is definitely a "WIN" - "WIN" effort and contribution to my Team Goals.
P.S. This is a similar scenario when you are uploading report on BO Enterprise R2 CMC.
When Uploading a new report to a folder but same report file name exists, the BO System will promt message "Report File Name" already exists. Do you want to Overwrite it?" If Yes, then system will overwrite the file but it will keep the history and recurring objects.
Any help would be greatly appreciated.
Thanks,
BienSuggest looking at [this|https://wiki.sdn.sap.com/wiki/display/BOBJ/NETBusinessObjectsEnterpriseSDKSamples] wiki for links to pertinent samples. Also, check out the [Developer Help File|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/WS_SDK/wssdk_server/default.htm]. Searching these forums for similar queries may also prove to be fruitful
Ludek -
How to print the report file name and path and the last mod date
Good morning,
I am trying to print on the footer of the report the report file name and path as well as the report last modification date.
Anyone would know how I can do that? I have checked the doc but found nothing.
Thks. Philippe.Did you ever determine how to print report name and report last mod date?
Thanks -
Adding batch serial number to report file name in sequential model
Hi,
I'm using a Sequential model in TS 4.0 and have learned how to add the UUT serial number to the report file name. But I would like to add the batch serial number instead. Is this possible? Any modifications to the ReportOptions callback seem to only modify the temp report name.
Thanks!
ChrisHi Chris,
While Paul's suggestion may be useful in this case, if you would like the flexibility of customizing your Report File Pathnames further, you may want to consider upgrading to TestStand 4.2.
In TestStand 4.2 we introduced predefined macros and the ability to use custom expressions to specify the Report File Pathname. For example, the <Batch> macro will add the Batch Serial Number to the Report File Pathname as you specify it.
Please see the Using Expressions to Customize Report File Paths section of the TestStand 4.2 Reference Manual for more information on these new reporting features and how one might use them. For a specific explanation of the different macros and what they might be used for, please see the Specifying Report File Paths by Expression section of the TestStand 4.2 Online Help.
Manooch H.
National Instruments
Maybe you are looking for
-
I have a Bluetooth receiver transmitter by Brookstone attached to the home stereo that we use to connect via bluetooth and play music from Pandora etc. From our iPhones or iPad. It has worked flawlessly until I updated the software on my iPad and iP
-
I am not sure if this is the correct place to post this question. I work for a company that has an intranet and very active firewall. I recently upgrade to Leopard (10.5.2) on a 2.66GHz Dual-Core Intel Xeon. I usually have Safari, Apple Mail and acce
-
Hi, I am trying a RFC to JDBC scenario wherin i am insertin records into Oracle Database. I am testing the scenario from XI RWB. While testing i am getting error that tables doesnot exists. " JDBC message processing failed; reason Error processing re
-
I proceeded all the installation steps of WebUtil in my Oracle 9iDS 9.0.2.2 I did also the additional installation steps (jacob.jar etc.). When I run the WU_TEST.FMB from forms builder, I get the error WUC-015: Your Form must contain the following Be
-
Move-ActiveMailboxDatabase Failed
Running Exchange 2010. I have a database copy between DB7 and DB8. I needed to reboot DB8 so I moved the active DB to DB7. It moved successfully. I rebooted the server with DB8. The server came back up and I tried to move the database back and got th