Download report to PDF at Output
Hi SDN's,
I am having a report which shows a output. Now my requirement is i need to download the Output of the Report as a PDF.
I would need to place a button on the appl tool bar, clicking on which should throw a popup of File Select Dialog.
Upon giving the filename, the output should be downloaded to the filepath mentioned.
I have already achieved the placing of button on the appl tool bar.
But my Question is how to show a popup of giving a File Select Dialog upon clicking the button.
And now Function module : CONVERT_OTF_2_PDF is used to convert to PDF. Is this right?
Is my approcah correct. Please suggest me if i am wroing at any point.
Regards
Pratyusha
Hi,
I will give u sample code...
DATA: fm_name TYPE rs38l_fnam,control TYPE ssfctrlop, op TYPE ssfcompop,
p_form TYPE tdsfname VALUE 'ZTAX_COMPU',
errtab TYPE tsferror,spoolid TYPE ssfcrescl.
DATA:t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
* Internal table to hold OTF data recd from the SMARTFORM
*T_OTF_FROM_FM TYPE SSFCRESCL,
* Internal table to hold the data from the FM CONVERT_OTF
t_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA:
*w_form_name TYPE tdsfname VALUE 'ZSURESH_TEST',
w_fmodule TYPE rs38l_fnam,
w_cparam TYPE ssfctrlop,
w_outoptions TYPE ssfcompop,
w_bin_filesize TYPE i, " Binary File Size
w_file_name TYPE string,
w_file_path TYPE string,
w_full_path TYPE string,pnrno(8),ldate TYPE sy-datum.
CLEAR control.
control-preview = 'X'.
control-no_open = 'X'.
control-no_close = 'X'.
control-no_dialog = 'X'.
control-getotf = 'X'.
* control-DEVICE = 'A000'.
op-tddest = 'A000'.
op-tdnewid = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING formname = p_form
* variant = ' '
* direct_call = ' '
IMPORTING fm_name = fm_name
EXCEPTIONS no_form = 1
no_function_module = 2
OTHERS = 3.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
* ARCHIVE_PARAMETERS =
user_settings = ' '
* MAIL_SENDER =
* MAIL_RECIPIENT =
* MAIL_APPL_OBJ =
output_options = op
control_parameters = control
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
CALL FUNCTION fm_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = control
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = op
user_settings = ' '
emp_no = itab-emp_no
proc_yyyymm = procyymm
category = itab-category
sp1 = wa
sp2 = wa1
itexem = exem
TABLES
it_etc = it_etc
it_f16 = it_f16
it_hrc = it_hrc
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'SSF_CLOSE'
IMPORTING
job_output_info = spoolid
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* error handling
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
REFRESH : it_etc,it_f16,it_hrc.CLEAR : it_etc,it_f16,it_hrc.
t_otf[] = spoolid-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 10
IMPORTING
bin_filesize = w_bin_filesize
* BIN_FILE =
TABLES
otf = t_otf
lines = t_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR:w_full_path.
IF itab-pnrno NA sy-abcde.
UNPACK itab-pnrno TO itab-pnrno.
ENDIF.
pnrno = itab-pnrno+2(8).
* SHIFT pnrno LEFT DELETING LEADING '0'.
CONCATENATE path '\' pnrno '.pdf' INTO w_full_path.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = w_bin_filesize
filename = w_full_path
filetype = 'BIN'
TABLES
data_tab = t_pdf_tab.
CLEAR w_full_path.
CONCATENATE 'Download completed for Employee - ' itab-emp_no INTO w_full_path SEPARATED BY space.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
* PERCENTAGE = 0
text = w_full_path.
CLEAR : t_otf,spoolid, t_pdf_tab,pnrno.
REFRESH : t_otf, t_pdf_tab.
Regards,
V.Balaji
Reward if Usefull...
Similar Messages
-
Reports Generated PDF Turkish Output characters corrupted
hi,
we are using acrobat proffessional 7.0
in pdf file generated from the reports the characters like 'İ,Ş,ı' are not being displayed properly.(for example İ seems Ý ,Ş seems Þ)
i am researching but could not succeed discovering the cause.
any help would be appreciated..
Regardsi want to supply extra information.
we are using reports 6i. there is no report server, the reports are being executed on client machines. databse is unix, client machines are all windows xp.
i have added ttf s to the paths remaining in Reports_path property.
didnt worked.
any help would be appreciated. -
How to display infinity symbol in Crystal Reports using PDF as output
Hi
I need to show infinity symbol (u221E) in reports. I am using a formula and based on certain criteria i have to display infinity symbol.
If (somthing ) then show 'Error' (String)
else if something then 'u221E' (String)
This works fine in RPT file preview , but when opens in PDF , it shows ? mark as if not understood.
I used ChrW (Number) but it has until 255 and does not have a number for infinity
Can someone let me know how do i do thisThanks for your reply
The version is JRC 11.8.4.1197
It would not be feasible to upgrade at this moment, we are already in production and need a solution for showing infinity in PDF.
Can you suggest something using crystal formulas could be possible or any other solution please . -
Download report/dashboard in pdf..
Hi experts,
1.How to download reports in pdf format.
2. How to download whole Dashboard.
S1.How to download reports in pdf format.
We don't have individual report to download in PDF.Anyway we have Download to excel,powerpoint,Download Data,Webpage.
The above options are available in Download hyperlink when you enable the downlaod option.
Edit Dashboard -> properties->Report Link and check the download Dashboard.
2. How to download whole Dashboard.
This property is available in the bottom left corner of the page with printer symbol which has download Dashboard to PDF or HTML.
Edited by: hsekar on Dec 29, 2009 7:59 AM -
Including dynamically generated jpg files in a report in PDF
Hi all,
hope I'm in the right forum.
We have an issue with images we must include in a report, when the report output format is PDF.
We are using these versions for Reports etc... :
Report Builder 10.1.2.0.2
ORACLE Server Release 10.1.0.4.2
Oracle Procedure Builder 10.1.2.0.2
Oracle ORACLE PL/SQL V10.1.0.4.2 - Production
Oracle CORE 10.1.0.4.0 Production
We need to include in a report a image (jpg or png) which is provided (and created dynamically) by NWA Quality Analyst.
We use a BoilerPlate Field, and in the hyperlink property, we have something like :
http://myserver/XBAR_GRAPH.NWG?CachedFile=something,etc.><IMG SRC="http://myserver/XBAR_GRAPH.jpg?CachedFile=....
Works fine when getting the report in HTML output format.
But doesn't work when the report is in PDF output format. Seems to be a security constraint of PDF.
Question 1 : Has anybody already faced a similar issue ? And solved it ?
We tried to include a jpg file located anywhere on our server, it works fine, BUT in our case, the jpg file returned by NWA Quality Analyst is not stored anywhere (generated on the fly)
Question 2 : is there a way, in PL-SQL (in beforereport trigger) to call the URL, get the file returned and save it somewhere ? Or display it as a image ?
Thanks for any idea and help effort.
(French translation available on demand as my english is not so good ;-)Hi all,
we found a solution for our issue :
we generate the png file from the QA server using UTL_HHTP package, with a defined name.
Then we get this image in our report, in PDF format output.
May this help...
If you got question... -
How to download a Block List based ALV report to PDF file?
Hi Everyone,
I need to display a report in block list alv format using REUSE_ALV_BLOCK_LIST_DISPLAY... I have done this. But my problem comes next.
1. I need to download this report to a pdf file in the user given directory - in presentation server. How can I download this in PDF format.
2. My report has TOP_OF_LIST and END_OF_LIST events. The body of the report contains a table with some material data. There should be 1 table for each material no. There are around 50 records for each material no. So I am looping at the material no. and calling REUSE_ALV_BLOCK_LIST_APPEND.
Now my problem is that I should have only 20 records in each page. How can I determine this? How do I put a page-break?
Please anyone help me.Hi Anwesha
You can send the report output to spool using the IS_PRINT parameter of REUSE_ALV_BLOCK_LIST_DISPLAY FM. Then read the spool number generated and pass it to CONVERT_ABAPSPOOLJOB_2_PDF to get the pdf content which could be downloaded to presentation server.
The splitting of records on count could be done by calling above method with different internal table filtered as per your requirement.
Regards
Ranganath -
Custom Report in PDF output, blurred after printing in concurrent
Hi,
We have a customized report which is the output is in PDF. We tried to print it in concurrent, but the output is blurred and not clear enough. The following are the setup made.
1. Server OS -> Linux 5(OEL5)
2. Printer -> EPSON, Dot Matrix
3. Driver ->Landscape
Please help.
Thanks and Regards,
PeopsquikPlease post the details of the application release, database version and OS.
We have a customized report which is the output is in PDF. We tried to print it in concurrent, but the output is blurred and not clear enough. The following are the setup made.
1. Server OS -> Linux 5(OEL5)
2. Printer -> EPSON, Dot Matrix
3. Driver ->LandscapeWhat about the concurrent request output file itself? Or the output file that is generated on the server under $APPLCSF/$APPLOUT directory? Can you download this file and view the contents to verify if the issue with generating the report or with printing?
If the issue with printing only, can you reproduce the issue with other printers? What if you print the out file using the lp command?
Thanks,
Hussein -
Output same Deski report as PDF and XLS
Hello,
will it be possible to generate (not schedule) a Deski - Report using Java SDK ?
desired workflow:
- generate/refresh the report to hold new data (User specific, Local specific)
- output this report in Formats PDF and XLS
- store the output - reports in Users inbox
The goal is to generate the report only once and output the same twice - as pdf and as xls.
As far as i saw in scheduling a report, it is only possible to produce one output (pdf or xls), if we need both, we have to schedule twice. And therefor we will have to generate the same report twice.
I found somthing like
binaryView = (BinaryView)documentInstance.getView(OutputFormatType.XLS);
binaryView = (BinaryView)documentInstance.getView(OutputFormatType.PDF);
in RBean for Webi - reports.
Looking forward for any idea.
Thanks in advance.
Johannes
Edited by: Johannes Kammerer on Sep 15, 2009 4:55 PMIf you're on XI 3.x, then you can specify multi-format exports using Publications.
Otherwise, you'd need to export to a file using REBean SDK, then Enterprise SDK to create a new InfoObject for that artifact.
Sincerely,
Ted Ueda -
Download ALV report to PDF with Lights
Hi,
I have a requirement wherein, when i download ALV report to PDF which has Lights in the first column. My problem is these lights are not displayed instead i get the following in the PDF
PDF o/p:
XOO RED SIGNAL
OXO YELLOW SIGNAL
OOX GREEN SIGNAL
Please let me know how to get the lights in the PDF o/p
Thanks & Regards,
SandhyaHi Sandhya,
U can convert any type of display(SF,ALV) to PDF.....
User Program rstxpdft4 to convert it first the O/P need to be converted into spool.
cheers,
Naveen. -
How to get the output of the report in pdf format
how to get the output of the report in pdf format?
Thanks in advance,
madan.Refer these links
http://www.sap-img.com/bc037.htm
http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
CONVERT_ABAPSPOOLJOB_2_PDF FM convert abap spool output to PDF -
Hi everyone ,
We are using Oracle 11g.
I have a custom Oracle report in PDF output. In some cases the value is changed. For example, when i run a query in toad i get a value 0.13, then I run my report, check the XML output - the value is still 0.13....but when I check the report output that is in the PDF format, the value is changed to 0.14. Do you have any ideas why it happens? Do I need a special coad in the rtf tag?
Thank youWhat command did you type in to run your report in Unix? Did you give the full path of your rdf file. I guess that the system may not be find your rdf file correctly.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by guest2000:
Hi all,
Anybody currently running Oracle Reports in unix platform and the output is generated in pdf format & display in browser?
Can you please advise on what are all the environment variables that I have to set in order to get the report runs?
Besides, what are the specific printer setting that I have to set? as well as priviledge on directory if necessary.
My reports are created in PC with RDF format. When run in unix, can the RDF still be used or it has been to recompile? If recompile, how is this done?
I always get the following error but do not what is the cause:
REP-0110: Unable to open file 'myreport.rdf'. REP-1070: Error while opening or saving a document. REP-0110: Unable to open file 'myreport.rdf'.
Please advise.
Hope to receive your reply asap.
Great thanks in advance.<HR></BLOCKQUOTE>
null -
Hi Gurus,
My requirement is when running reports is run in 6i by default the output is shown in reports previewer. Instead of this i want to show this as a PDF output as a default what should be done to achieve this.
Please let me know.
Now, When i set the DESTYPE as FILE and DESFORMAT as PDF the output gets spooled into a directory specified by us.
How do i achieve it, Please help
Thanks in advanceOh.. i thought you will hit here at last. But finding the path of the EXE every time in the client PC is not a suitable solution. So we cant hardcode the EXE path also.
But even here, we can handle in 2 ways.
1) Putting the EXE in the PATH variable of the SYSTEM
2) Finding the EXE path by reading the REGSITRY of the client PC.
But our current standards doesnt allows us to take either of this. Because we arent allowed to use HOST commands from the front end.
Anything else we can do to achieve apart from what i have said before
Many thanks for your participation and prompt replies.
Guru -
Output of a report in PDF Format
Hi all,
I need to get the Output of a report in PDF format.
Please suggest me hwo to do this requirement.
If having please give me the sample code
Thanks and Regards
Ajaysample code for PDF conversion...
tables : vbrk. "Billing Document: Header Data
Type pool declaration
type-pools slis.
Selection screen
selection-screen begin of block b1 with frame.
select-options : p_date for vbrk-aedat.
selection-screen end of block b1.
Types declaration
types : begin of t_vbrk,
vbeln type vbrk-vbeln, "Billing Document
aedat type vbrk-aedat, "Changed on(date)
fksto type vbrk-fksto, "Billing document is cancelled
end of t_vbrk.
Internal table declaration
data : i_vbrk type table of t_vbrk,
w_vbrk type t_vbrk.
Field catalog declaration
data : i_cat type slis_t_fieldcat_alv,
w_cat like line of i_cat,
t_print type slis_print_alv.
data :top type table of slis_listheader with header line.
data : event type table of slis_alv_event with header line.
start of selection
top-of-page.
start-of-selection.
perform get_dat.
if sy-subrc = 0.
perform build_cat.
perform alv_print_info.
perform sub_create_spool_id.
perform display_data.
perform sub_send_mail.
endif.
Subroutine GET_DAT
form get_dat .
*---To fetch canelled billing documents.
select vbeln
aedat
fksto
from vbrk
into table i_vbrk
where aedat in p_date and fksto = 'X'.
endform. " GET_DAT
Subroutine DISPLAY_DATA
form display_data .
call function 'REUSE_ALV_EVENTS_GET'
importing
et_events = event[]
top-typ = 'H'.
top-info = sy-title.
append top.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = sy-repid
i_callback_top_of_page = 'NAN'
i_grid_title = 'Alok Arun (Mr.A)'
it_fieldcat = i_cat
it_events = event[]
is_print = t_print
tables
t_outtab = i_vbrk
endform. " DISPLAY_DATA
*& Subroutine BUILD_CAT
form build_cat .
w_cat-seltext_l = 'Billing Document'.
w_cat-col_pos = '1'.
w_cat-tabname = 'I_VBRK'.
w_cat-fieldname = 'VBELN'.
w_cat-ref_fieldname = 'VBELN'.
w_cat-hotspot = 'X'.
append w_cat to i_cat.
clear w_cat.
w_cat-seltext_l = 'Cancelled on'.
w_cat-col_pos = '2'.
w_cat-tabname = 'I_VBRK'.
w_cat-fieldname = 'AEDAT'.
w_cat-ref_fieldname = 'AEDAT'.
w_cat-hotspot = 'X'.
append w_cat to i_cat.
clear w_cat.
endform. " BUILD_CAT
*& Form alv_print_info
form alv_print_info .
t_print-no_print_selinfos = 'X'.
t_print-no_coverpage = 'X'.
t_print-no_print_listinfos = 'X'.
endform. " alv_print_info
*& Form sub_create_spool_id
form sub_create_spool_id .
data: lv_text(50) type c.
lv_text = sy-title.
new-page line-size sy-linsz
print on destination 'LP01'
cover text lv_text
list name 'LIST NAME SOL MANAGER'(002)
list dataset 'LIST DATASET'(003)
immediately ' '
keep in spool 'X'
new list identification 'X'
no dialog.
endform. " sub_create_spool_id
*& Form sub_send_mail
form sub_send_mail .
data: v_spono like tsp01-rqident.
v_spono = sy-spono.
data:
v_type like soodk-objtp,
i_pdflist like tline occurs 0,
t_print TYPE slis_print_alv,
jobname like tbtcjob-jobname,
jobcount like tbtcjob-jobcount,
numbytes type i,
pdfspoolid like tsp01-rqident,
jobname2 like tbtcjob-jobname,
jobcount2 like tbtcjob-jobcount,
i_compresslist like soli occurs 0.
data: pdf like tline occurs 100 with header line,
objbin like solisti1 occurs 10 with header line.
*--convert into PDF
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = v_spono
no_dialog = ' '
importing
pdf_bytecount = numbytes
pdf_spoolid = pdfspoolid
btc_jobname = jobname2
btc_jobcount = jobcount2
tables
pdf = pdf
exceptions
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11.
if sy-subrc <> 0.
endif.
*-- change the width of the pdf table --
call function 'SX_TABLE_LINE_WIDTH_CHANGE'
exporting
line_width_src = 134
line_width_dst = 255
tables
content_in = pdf
content_out = objbin
exceptions
err_line_width_src_too_long = 1
err_line_width_dst_too_long = 2
err_conv_failed = 3
others = 4.
if sy-subrc <> 0.
endif.
endform. -
Regarding downloading thw report in pdf format
Hi Experts,
when we download the report in pdf format using printer friendly icon,
my concern is that is it possible to add watermark in the downloaded report
by changing in xml files.
please suggest any solutions.Hi ,
While scheduling a report we can get the pdf watermark .Check the below link
http://oraclebizint.wordpress.com/2008/02/04/oracle-bi-ee-101332-adding-watermarks-to-delivered-pdf-documents-using-pdf-merger-api-of-bi-publisher/
Thanks,
Ananth -
Unable to display Crystal Reports 2008 PDF output on smart phones
Hi Folks,
I'm not sure if this is the proper forum, but here goes. I am just finishing a large ASP.NET web app which makes extensive use of Crystal Reports 2008 and a CrystalReportViewer control. My users routinely e-mail the reports in PDF format. This works great, except now they tell me that when the recipient of the e-mail tries to open the PDF on an iPhone or Blackberry, it will not open. The PDF's open fine on desktop computers.
Here is the code which generates the PDF and attaches it to the e-mail msg.
// export to PDF, then mail that
SmtpClient client = new SmtpClient();
MailAddress from = new MailAddress(ConfigurationManager.AppSettings["ReportMailFrom"].ToString());
MailMessage message = new MailMessage();
message.From = from;
message.SubjectEncoding = System.Text.Encoding.UTF8;
message.Subject = "E-mail BackOffice report: " + strReportName;
MemoryStream memStream = (MemoryStream)rptDoc.ExportToStream(ExportFormatType.PortableDocFormat);
Attachment data = new Attachment(memStream, MediaTypeNames.Application.Pdf);
ContentDisposition disposition = data.ContentDisposition;
disposition.CreationDate = DateTime.Now;
disposition.ModificationDate = DateTime.Now;
disposition.FileName = strReportName + ".pdf";
disposition.DispositionType = DispositionTypeNames.Attachment;
message.Attachments.Add(data);
client.Send(message);
Any ideas on what is happening here and how to make these PDF's visible to smart phones?
Thanks.
DanHi Dan,
What happens if you export from Crystal Reports designer?
I just tried if and BlackBerry tells me I am about to download a file that cannot be viewed on the phone. It doesn't say why though.
Going through the Platforms file it doesn't mention smart phones so it would indicate we don't support them in that format.
HTML worked but not pretty. You'll have to see what Blackberry does support. I found this one kbase article from them:
http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB11245&sliceId=SAL_Public&dialogID=206744335&stateId=1%200%20206742756
I'm testing more but I believe this is a blackberry limit and not CR.
Seems they do support it but very limited.
Thank you
Don
Maybe you are looking for
-
I have made yearly subscription to Chandamama junior english and Telugu magazines which are released monthly by publishers. I could download for only 2months from itunes store and now cannot download any more. No error message. When I enter my itu
-
Questionable website and security concern
I was searching google images and clicked on an image which took me to: *(do not click if you don't know what your doing please!!)* < Edited by Host > More specifically: < Edited by Host > Is this of any concern to me? It seemed like some possible cr
-
Soulce gl and target gl in fbl3n report
Dear Friends, Is it possible to show the source gl and target gl in fbl3n report, can any one solve this. Thanks HK
-
Why do my ipod touch 4th,2nd become electrified when i plug them into a normal charger
i was wondering why my ipod touch 2nd gen and 4th gen become electrified when i plug them into a normal charger and my ipod nano 5th and 6th gen do this as well
-
I am getting a 403 error trying to install Xcode 4.4 option
I have a clean install of OSX 10.7.4 that I bought Monday, sigh, and I just installed Xcode 4.4 and everything is good. When I try to install the command line tools, it asks me for my password to get admin rights and then get "Failed with HTTP status