How to save classical report as pdf file
hi all,
i have created a classical report and now the requirement is to save that report as a pdf .
is there any FM or any other method to do so?
regards
vijay
Hi Vijay,
Here is what I did for the same requirement:
Calling for the PDF File name and path to save the file
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = 'Quote Bom PDF File'
default_file_name = l_file_name
initial_directory = l_fullpath
prompt_on_overwrite = 'X'
CHANGING
filename = l_file
path = l_path
fullpath = g_path
user_action = l_user
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF l_user = 0.
Please follow the following order for the subroutines which is creating the Spool Number, writing the*
statements on to the screen and then create the PDF file*
PERFORM get_spool_created.
PERFORM write_lines.
NEW-PAGE PRINT OFF.
g_spool_no = sy-spono.
PERFORM download_as_pdf.
Spool Number is getting created in this routine*
FORM get_spool_created .
DATA: pripar TYPE pri_params,
arcpar TYPE arc_params,
lay TYPE pri_params-paart,
lines TYPE pri_params-linct,
rows TYPE pri_params-linsz.
DATA: val(1), val1(1).
DATA: dest TYPE pri_params-pdest VALUE 'LP01'.
DATA: name TYPE pri_params-plist VALUE 'Testing'.
DATA: i_pdf TYPE STANDARD TABLE OF tline.
DATA: spono TYPE tsp01-rqident.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = dest
no_dialog = 'X'
immediately = ' '
IMPORTING
out_archive_parameters = arcpar
out_parameters = pripar
valid = val
valid_for_spool_creation = val1
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
pripar-linsz = '132'.
pripar-paart = 'X_65_132'.
pripar-prdsn = 'LP01'.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
in_archive_parameters = arcpar
in_parameters = pripar
no_dialog = 'X'
list_name = name
IMPORTING
out_archive_parameters = arcpar
out_parameters = pripar
valid = val
valid_for_spool_creation = val1
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc EQ 0.
NEW-PAGE NO-TITLE NO-HEADING PRINT ON
NEW-SECTION
PARAMETERS pripar
ARCHIVE PARAMETERS arcpar
NO DIALOG.
ELSE.
WRITE:/ 'Unable to create spool'.
EXIT.
ENDIF.
ENDFORM. " GET_SPOOL_CREATED
Write all your statements in this routine*
*& Form WRITE_LINES
text
--> p1 text
<-- p2 text
FORM write_lines .
CALL THE ROUTINE WHICH WRITES ALL LINES TO THE SCREEN
ENDFORM. " WRITE_LINES
*Download the file as PDF
*& Form DOWNLOAD_AS_PDF
text
--> p1 text
<-- p2 text
FORM download_as_pdf .
DATA:
l_no_of_bytes TYPE i,
l_pdf_spoolid LIKE tsp01-rqident,
l_jobname LIKE tbtcjob-jobname,
l_jobcount LIKE tbtcjob-jobcount,
i_pdf TYPE TABLE OF tline,
i_cpdf TYPE TABLE OF tline,
l_spono TYPE tsp01_sp0r-rqid_char,
l_fullpath TYPE string.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = g_spool_no
no_dialog = ' '
IMPORTING
pdf_bytecount = l_no_of_bytes
pdf_spoolid = l_pdf_spoolid
btc_jobname = l_jobname
btc_jobcount = l_jobcount
TABLES
pdf = i_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
OTHERS = 12.
l_spono = g_spool_no.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = l_spono.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = l_no_of_bytes
filename = g_path
filetype = 'BIN'
TABLES
data_tab = i_pdf
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6.
ENDFORM. " DOWNLOAD_AS_PDF
Thanks.
Respond if you need any more help.
Similar Messages
-
I am working with reports of 2.5 version and i got a requirement for adding an option to save the report in pdf format. Can anybody please help me on this asap
Thanks & RegardsAre u sure about the report version.
Please do upgrade while even in oracle they almost stopped for new version -Developer suite -
Hi Experts,
I have written a classical report with write statements and when i am downloading in excel the format is mismatching and now i want to convert into PDF format.
How to convert into PDF format from Classical report ?
YusufHi yusuf,
please find the below report,,
please make two include programs before executing it,
there codes are pasted below,
INCLUDE zimpr_data_declaration.
INCLUDE zimpr_performs_wrap.
REPORT zimpr_word_wrap NO STANDARD PAGE HEADING LINE-SIZE 115..
INCLUDE for DATA DECLARATION *
INCLUDE zimpr_data_declaration.
INCLUDE for all performs. *
INCLUDE zimpr_performs_wrap.
TOP-OF-PAGE--
TOP-OF-PAGE.
PERFORM f_top_page. "TOP OF THE REPORT PAGE,I.E. HEADER.
START-OF-SELECTION.
SET PF-STATUS 'SEL_SCREEN'. "PF-STATUS OF THE SELECTION SCREEN.
PERFORM f_data_retrieval. "PERFORM FOR ALL SELECT STATEMENTS.
PERFORM f_report_display. "REPORT DISPLAY,WRITE STATEMENTS.
--Define the actions to be performed for pf-status-----
AT USER-COMMAND.
wf_ok_code = sy-ucomm.
wf_save_ok = wf_ok_code.
CLEAR wf_ok_code.
CASE wf_save_ok.
WHEN 'PDF'. "WHEN PDF ICON IS CLICKED,REPORT WILL CONVERT INTO PDF.
loc_repid = sy-repid. "PROGRAM NAME
--THIS FM SETS THE PARAMETERS FOR LAYOUT OF PDF OUTPUT--
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
layout = loc_paart "LANDSCAPE LAYOUT
line_size = loc_linsz "CHARACTER WIDTH OF REPORT
no_dialog = 'X'
user = sy-uname "USERNAME
IMPORTING
out_parameters = loc_print_parms "OUTPUT PARAMETERS WILL BE COLLECTED HERE.
valid = loc_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
--FOR GENERATING THE SPOOL NUMBER--
NEW-PAGE PRINT ON NO DIALOG PARAMETERS loc_print_parms. " This allocates the spool no
"to the screen without the dialog screen.
PERFORM f_top_page.
PERFORM f_report_display.
NEW-PAGE PRINT OFF. "This marks the end of the screen for which the spool no was generated.
wf_id = sy-spono. " This assign the spool no of the screen to the variable.
--PERFORM FOR GETTING THE PDF OUTPUT--
PERFORM f_pdf_display.
--PERFORM FOR DOWLOADING FILE TO A LOCAL DISK--
PERFORM f_download_local.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
include data declaration----
*& Include ZIMPR_DATA_DECLARATION
TYPE-POOLS : shlp.
DATA : wf_ordert TYPE aufk-auart. "ORDER TYPE
DATA : wf_order TYPE aufk-aufnr. "ORDER NUMBER
DATA : wf_bdate TYPE afko-gstrp. "BASIC START DATE
DATA : wf_status(4) TYPE c ."rihea-i_astatin. "STATUS
DATA : wf_objnr TYPE jest-objnr VALUE 'OR%'. "Object number
DATA : wf_aufnr TYPE aufk-aufnr.
DATA : wf_name TYPE thead-tdname. "NAME TO PASS IN FM READ_TEXT
DATA : wf_date1(12) TYPE c. "DATE
DATA : wf_i1(3) TYPE n,wc_i1(3) TYPE n VALUE '1'. "COUNTERS FOR REPORT DISPLAY
DATA : wf_i2(3) TYPE n,wc_i2(3) TYPE n VALUE '1'.
DATA : wf_kopf TYPE tdid VALUE 'KOPF',wf_aufk TYPE tdobject VALUE 'AUFK'.
DATA : wf_save_ok TYPE sy-ucomm ,wf_ok_code TYPE sy-ucomm.
DATA: wf_id TYPE tsp01-rqident , " For storing Spool request number
wf_bytes TYPE i . " For storing the bytes of data to be converted to PDF.
DATA : wf_langu(2) TYPE c VALUE 'EN'.
DATA: wf_pripar TYPE pri_params, " Structure for Passing Print Parameters
wf_rcpar TYPE arc_params. " ImageLink structure
DATA : wf_statu TYPE dfies-fieldname VALUE 'STATUS',
wf_field TYPE help_info-dynprofld VALUE 'S_STATUS'.
&--SELECTION SCREEN--
SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-000.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: s_ordert FOR wf_ordert . "ORDER TYPE
SELECT-OPTIONS: s_order FOR wf_order OBLIGATORY. "ORDER NUMBER
SELECT-OPTIONS: s_bdate FOR wf_bdate. "BASIC START DATE
SELECT-OPTIONS: s_status FOR wf_status matchcode object zei_sys . "SYSTEM STATUS
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN END OF BLOCK b_1.
*--INTERNAL TABLES--
TYPES : BEGIN OF ty_aufk,
aufnr TYPE aufk-aufnr, "OREDR NUMBER
auart TYPE aufk-auart, "ORDER TYPE
objnr TYPE aufk-objnr, "OBJECT NUMBER
ktext type aufk-ktext, "SHORT TEXT
gstrp TYPE afko-gstrp, "BASIC START DATE
END OF ty_aufk.
TYPES : BEGIN OF ty_tj02t,
objnr TYPE aufk-objnr, "OBJECT NUMBER
txt04 TYPE tj02t-txt04, "STATUS
istat TYPE tj02t-istat, "Object status
spras TYPE tj02t-spras, "LANGUAGE KEY
END OF ty_tj02t.
TYPES : BEGIN OF ty_temp,
objnr TYPE aufk-objnr,
status(300) TYPE c,
END OF ty_temp.
TYPES : BEGIN OF ty_wrap,
line(54) TYPE c, "LONG TEXT
END OF ty_wrap.
TYPES : BEGIN OF ty_wrap2,
line(25) TYPE c, "STATUS
END OF ty_wrap2.
TYPES : BEGIN OF ty_f4,
txt04 TYPE tj02t-txt04,
txt30 TYPE tj02t-txt30,
END OF ty_f4.
types : begin of ty_sta,
istat type tj02t-istat,
objnr type jest-objnr,
end of ty_sta.
data : int_sta type table of ty_sta with header line.
DATA : int_f4 TYPE TABLE OF ty_f4 WITH HEADER LINE.
DATA: int_pdf TYPE TABLE OF tline WITH HEADER LINE. "TABLE FOR PDF CONVERSION
DATA: int_wrap TYPE TABLE OF ty_wrap WITH HEADER LINE. "TABLE FOR LONGTEXT
DATA: int_wrap2 TYPE TABLE OF ty_wrap2 WITH HEADER LINE. "TABLE FOR STATUS
DATA: int_temp TYPE TABLE OF ty_temp WITH HEADER LINE. "Table for concatenation of system status.
DATA: int_aufk TYPE TABLE OF ty_aufk WITH HEADER LINE.
DATA: int_tj02t TYPE TABLE OF ty_tj02t WITH HEADER LINE.
DATA: int_tline TYPE STANDARD TABLE OF tline WITH HEADER LINE. "TABLE FOR READ_TEXT.
DATA : int_fld TYPE TABLE OF dfies ,wa_fld LIKE LINE OF int_fld. " Field Type for FM for F4 help
DATA :int_return TYPE TABLE OF ddshretval WITH HEADER LINE .
DATA:
loc_print_parms LIKE pri_params, "PRINT PARAMETERS
loc_valid(1) TYPE c,
loc_file type SDOK_CHTRD,
loc_bytecount TYPE i, "NUMBER OF BYTES TRANSFERRED
loc_length TYPE i, "LINE-LENGTH
loc_rqident LIKE tsp01-rqident, "SPOOL NUMBER
loc_rq2name(12) TYPE c.
DATA: loc_filename LIKE rlgrap-filename. "FILENAME
DATA:loc_repid LIKE sy-repid, " Report to execute
loc_linsz LIKE sy-linsz VALUE 115, " Line size
loc_paart LIKE sy-paart VALUE 'X_65_132'. " Paper Format
Include ZIMPR_PERFORMS_WRAP----
*& Include ZIMPR_PERFORMS_WRAP
*& Form f_top_page
top-of the page
--> p1 text
<-- p2 text
FORM f_top_page .
*--HEADER--
FORMAT COLOR 1 .
WRITE : text-010.
FORMAT COLOR 1 OFF.
WRITE : / text-011,sy-datum NO-GAP.
WRITE : / text-012,sy-uzeit NO-GAP,90 text-013,101 sy-uname.
ULINE .
FORMAT COLOR 1 INTENSIFIED OFF .
WRITE : 1 sy-vline, "HEADINGS
2 text-014 NO-GAP,
7 sy-vline,
8 text-015 NO-GAP,
20 sy-vline,
21 text-016 NO-GAP,
76 sy-vline,
77 text-017 NO-GAP,
88 sy-vline,
89 text-018 NO-GAP,
115 sy-vline.
WRITE : /1 sy-vline,
2 text-019 NO-GAP,7 sy-vline,
20 sy-vline,76 sy-vline,77 text-020 NO-GAP,88 sy-vline,115 sy-vline.
ULINE.
FORMAT COLOR 1 OFF.
ENDFORM. " f_top_page
*& Form f_data_retrieval
select statements
--> p1 text
<-- p2 text
FORM f_data_retrieval .
SELECTING ORDER TYPE,ORDER NO.,OBJECT NO. AND BASIC START DATE
SELECT p~aufnr
p~auart
p~objnr
p~ktext
r~gstrp
FROM ( aufk AS p INNER JOIN afko AS r ON raufnr = paufnr )
INTO TABLE int_aufk
WHERE p~aufnr IN s_order AND
p~auart IN s_ordert AND
r~gstrp IN s_bdate AND
p~objnr LIKE wf_objnr.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
SORT int_aufk BY aufnr.
DELETE ADJACENT DUPLICATES FROM int_aufk.
SELECT q~istat
p~objnr
FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
INTO TABLE int_sta
FOR ALL ENTRIES IN int_aufk
WHERE p~objnr = int_aufk-objnr
AND q~txt04 IN s_status and
q~spras = wf_langu and
p~inact = ''.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
SORT int_sta BY objnr.
DELETE ADJACENT DUPLICATES FROM int_sta.
*--SELECTING OBJECT NO.,STATUS AND LANGUAGE--
IF int_sta[] IS NOT INITIAL.
SELECT p~objnr
q~txt04
q~istat
q~spras
FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
INTO TABLE int_tj02t
FOR ALL ENTRIES IN int_sta
WHERE p~inact = '' AND
p~objnr = int_sta-objnr AND
q~spras = wf_langu AND
q~txt04 IN s_status AND
p~objnr LIKE wf_objnr.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
ENDIF.
ENDFORM. " f_data_retrieval
*& Form f_report_display
report display
--> p1 text
<-- p2 text
FORM f_report_display .
LOOP AT int_tj02t. "concatenating the status into a internal table
AT NEW objnr.
CLEAR int_temp-status.
ENDAT.
CONCATENATE int_temp-status int_tj02t-txt04 INTO int_temp-status SEPARATED BY space.
AT END OF objnr.
int_temp-objnr = int_tj02t-objnr. "key field.
APPEND int_temp.
CLEAR int_temp.
ENDAT.
CLEAR int_tj02t.
ENDLOOP.
LOOP AT int_aufk.
CONCATENATE sy-mandt int_aufk-aufnr INTO wf_name . "concatenating client number and order number
*--THIS FM CAPTURES THE LONG TEXT AND STORES IT IN INTERNAL TABLE--
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = wf_kopf "TEXT ID
language = sy-langu "LANGUAGE
name = wf_name "TEXT NAME
object = wf_aufk "TEXT OBJECT
TABLES
lines = int_tline "LINES OF LONG TEXT.
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
int_tline-tdline = int_aufk-ktext.
APPEND int_tline.
CLEAR :int_tline.
ENDIF.
LOOP AT int_tline.
*--THIS FM WRAPS THE LONG TEXT INTO 54 CHARACTERS EACH--
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
textline = int_tline-tdline "LONG TEXT LINE
outputlen = 54 "OUTPUT LENGTH
TABLES
out_lines = int_wrap "INTERNAL TABLE
EXCEPTIONS
outputlen_too_large = 1
OTHERS = 2.
IF sy-subrc <> 0.
CLEAR :int_tline.
ENDIF.
ENDLOOP.
*-- THIS FM WRAPS THE STATUS INTO 25 CHARACTERS EACH--
READ TABLE int_temp WITH KEY objnr = int_aufk-objnr.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
textline = int_temp-status
outputlen = 25
TABLES
out_lines = int_wrap2
EXCEPTIONS
outputlen_too_large = 1
OTHERS = 2.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
IF NOT int_wrap2[] IS INITIAL.
ULINE AT (115).
ENDIF.
DESCRIBE TABLE int_wrap LINES wf_i2. "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP
DESCRIBE TABLE int_wrap2 LINES wf_i1. "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP2
WHILE ( wc_i1 LE wf_i1 OR wc_i2 LE wf_i2 ).
IF ( wc_i2 LE wf_i2 ).
READ TABLE int_wrap INDEX wc_i2 . "READING THE INTERNAL TABLE INT_WRAP WITH INDEX
wc_i2 = wc_i2 + 1.
ENDIF.
IF ( wc_i1 LE wf_i1 ).
READ TABLE int_wrap2 INDEX wc_i1 . "READING THE INTERNAL TABLE INT_WRAP2 WITH INDEX
wc_i1 = wc_i1 + 1.
ENDIF.
*--THIS FM CONVERTS THE DATE FROM SYSTEM FORMAT TO OUTPUT FORMAT--
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
input = int_aufk-gstrp
IMPORTING
output = wf_date1.
IF NOT int_wrap2[] IS INITIAL .
*--REPORT DISPLAY--
WRITE : /1 sy-vline, 2 int_aufk-auart COLOR = 4 INTENSIFIED OFF NO-GAP ,
7 sy-vline ,8 int_aufk-aufnr COLOR = 4 INTENSIFIED OFF NO-GAP,
20 sy-vline,21 int_wrap-line,
76 sy-vline ,77 wf_date1 ,
88 sy-vline ,89 int_wrap2-line,
115 sy-vline.
*--CLEARING THE VARIABLES--
wf_date1 = ''.
CLEAR: int_aufk,int_temp,int_wrap2-line,int_wrap-line.
ENDIF.
ENDWHILE.
wc_i1 = 1.
wc_i2 = 1.
CLEAR :int_wrap,int_wrap2.
REFRESH : int_wrap,int_wrap2,int_tline.
ENDLOOP.
ULINE AT (115).
ENDFORM. " f_report_display
*& Form F_PDF_DISPLAY
pdf conversion
--> p1 text
<-- p2 text
FORM f_pdf_display .
*--THIS FM CONVERTS THE SPOOL REQUEST INTO PDF REPORT--
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = wf_id "SPOOL NUMBER
no_dialog = space
pdf_destination = 'X'
IMPORTING
pdf_bytecount = loc_bytecount "NUMBER OF BYTES TRANSFERRED
TABLES
pdf = int_pdf "TABLE FOR PDF REPORT
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
OTHERS = 12.
ENDFORM. " F_PDF_DISPLAY
*& Form f_download_local
download to local system
--> p1 text
<-- p2 text
FORM f_download_local .
---------------------THIS FM DOWNLOADS THE PDF REPORT INTO LOCAL MACHINE
data loc_ret TYPE iwerrormsg.
CALL FUNCTION 'IW_C_GET_SAPWORKDIR'
IMPORTING
SAPWORKDIR = loc_file
ERROR_MSG = loc_ret
loc_filename = loc_file.
if loc_ret is initial.
concatenate loc_filename '\work order header long text_ ' sy-timlo '.pdf' into loc_filename.
endif.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
bin_filesize = loc_bytecount "NO. OF BYTES
filename = loc_filename "DEFAULT FILE NAME
filetype = 'BIN'
IMPORTING
act_filename = loc_filename
TABLES
data_tab = int_pdf.
ENDFORM. " f_download_local
if you have any doubts,,
please revert
Regards,
Talwinder -
Can is there a way to configure the print settings (i.e. paper size, orientation, etc.) and save this setting as part of the pdf file? I would like the users of pdf files to be able to open the file and simply print, without having to manually configure the print settings.
Not sure if this will help. I got this information from the built-in help under Acrobat 9.
Advanced
Lists PDF settings, print dialog presets, and reading options for the document.In the PDF settings for Acrobat, you can set a base Uniform Resource Locator (URL) for web links in the document. Specifying a base URL makes it easy for you to manage web links to other websites. If the URL to the other site changes, you can simply edit the base URL and not have to edit each individual web link that refers to that site. The base URL is not used if a link contains a complete URL address.
You can also associate a catalog index file (PDX) with the PDF. When the PDF is searched with the Search PDF window, all of the PDFs that are indexed by the specified PDX file are also searched.
You can include prepress information, such as trapping, for the document. You can define print presets for a document, which prepopulate the Print dialog box with document-specific values. You can also set reading options that determine how the PDF is read by a screen reader or other assistive device.
Create print presets
A PDF can contain a set of print presets, a group of document-specific values that is used to set basic print options. By creating a print preset for a document, you can avoid manually setting certain options in the Print dialog box each time you print the document. It’s best to define print settings for a PDF at the time that you create it, but print presets provide a means to add basic print settings to a PDF at any time.
Choose File > Properties, and click the Advanced tab.
In the Print Dialog Presets section, set options and click OK.
The next time you open the Print dialog box, the values will be set to the print preset values. These settings are also used when you print individual documents in a PDF Portfolio.
Note: To retain a print preset for a PDF, you must save the PDF after creating the print preset.
Print Dialog Presets
Page Scaling
Prepopulates the Page Scaling option in the Print dialog box with the option you choose:
Default
Uses the application default setting, which is Shrink To Printable Area.
None
Prevents automatic scaling to fit the printable area. This setting is useful for preserving the scale of page content in engineering documents, or for ensuring that documents print at a particular point size to be legal.
DuplexMode
For best results, the selected printer should support duplex printing if you select a duplex option.
Simplex
Prints on one side of the paper.
Duplex Flip Long Edge
Prints on both sides of the paper; the paper flips along the long edge.
Duplex Flip Short Edge
Prints on both sides of the paper; the paper flips along the short edge.
Paper Source By Page Size
Selects the option by the same name in the Print dialog box. Uses the PDF page size to determine the output tray rather than the page setup option. This option is useful for printing PDFs that contain multiple page sizes on printers that have different-sized output trays.
Print Page Range
Prepopulates the Pages box in the Print Range section of the Print dialog box with the page ranges you enter here. This setting is useful in a workflow where documents include both instruction pages and legal pages. For example, if pages 1–2 represent instructions for filling out a form, and pages 3–5 represent the form, you can set up your print job to print multiple copies of only the form.
Number Of Copies
Prepopulates the Copies box in the Print dialog box. Choose a number from 2 to 5, or choose Default to use the application default, which is one copy. This limitation prevents multiple unwanted copies from being printed.
Thanks. -
How to save unsaved changes to pdf file?
Hi,
I have a plugin for signature creation and verification created using acrobat sdk 9 and testing in acrobat x. When user initiates a signature creation process, in SigGetSigProperties() callback, i need to save any unsaved changes in the pdf file before i proceed with the signature creation process. To achieve this i added this code to SigGetSigProperties() callback:
// Save unsaved changes to file.
AVDoc avDoc = AVAppGetActiveDoc();
if( avDoc )
PDDoc pdDoc = AVDocGetPDDoc(avDoc);
// save unsaved changes
PDDocSave(pdDoc, PDSaveIncremental, NULL, NULL, NULL/*AVAppGetDocProgressMonitor(NULL)*/, NULL);
But this code generates this error:
Creation of this signature could not be completed.
Unknown error
supported information: CDSHandler-657
and
Creation of this signature could not be completed.
Error at File: ..\sources\DSHandler.cpp , Line: __LINE__
What am i doing wrong here? is this the right approach and is there a better way to achieve this?
thanks and regards,Hi,
Actually, i need to save the pdf just before signing starts. saving at idle handler will not fullfil our requirements. how can i achieve this?
And keeping in mind the above requirement, when i think about adding a button or menu item, as u suggested, the only thing that comes in my mind is that, i disable the signature creation button and add my own button for signature. When its presses i save the pdf and internally call the acrobat's default signature button to start the signing process. But firstly i dont know if its possible. and secondly, there still remains the scenario where the user clicks an empty field to start the signing process.
what should i do? -
Save a report 6i PDF file onto the database server
Hello Experts,
I have a requirement, whereby I need to generate a PDF report and then send that report via Email. The problem I have is my email procedure is looking for the file which is in the directory on the server where the database is stored, While the PDF is generated on the local machine. Im using reports 6i.
I know in reports 10g the file is generated on the report server itself but Im afraid same is not the case with reports 6i.
The other problem is the local machine does not have the access to the directories on the server. I tried to change the directory path in the database to look at the C:\ but it doesn't work, it says invalid directory, I think the PDF report file needs to be on the server where the database is installed. Is there a way I can pick the PDF file from the local machine instead of the server where the database is installed?
Im not too sure what is the way forward, All I need is to generate a PDF file and mail it.
The procedure that I'm using to send the email attachment is :-
CREATE OR REPLACE PROCEDURE email_attachment(
xfilename VARCHAR2,
xloc VARCHAR2) IS
conn utl_smtp.connection;
BEGIN
conn := Send_Mail.begin_mail(
sender => '[email protected]',
recipients => '[email protected]',
subject => 'Attachment Test',
mime_type => Send_Mail.MULTIPART_MIME_TYPE);
Send_Mail.attach_text(
conn => conn,
DATA => '<b>This is a test Email.<b>',
mime_type => 'text/html');
send_mail.attach_base64_fromfile(
conn => conn,
filename => xfilename,--'test.pdf',
floc => xloc,--'File directory',
mime_type => 'application/octet',
inline => TRUE);
Send_Mail.end_attachment( conn => conn );
Send_Mail.end_mail( conn => conn );
Thanks any help would be appreciated.Hi,
in the forms 6i email with attachment can be sent only through database folder/file. From the client it can not be.
Here is one alternate solution.
1. Share the folder from db server which is used for email directory and keep changeable for everyone.
2. After generate the report like RUN_PRODUCT keep the below command.
HOST('XCOPY CLIENT_PATH\FILE_NAME SERVER_PATH');
3. This command will transfer file from client to db server. After this execute your procedure which is sending email.
Hope it will work.
-Ammad
Edited by: Ammad Ahmed on Mar 23, 2010 1:43 PM -
How to save excel report as CSV file with ActiveX
Hi,
I'm trying to save my excel test report as a CSV file using ActiveX and I'm having difficulty getting started. I can't find an invoke node method that enables CSV file conversion.
Can anyone shed light on this? See attached screenshot.
Thanks
As long as you are using the Report Generation Toolkit, there is no need to use ActiveX for the purpose of saving the Excel file -- Save Report will do that for you. You can then export (as text) all of the Excel data and use the Write Spreadsheet File to make the .CSV file. Here is how I would rewrite the final bits of your code --
I cleaned up the wires around Excel Easy Table a bit. You'll see I made a VI Icon for Replace Filename, which does (I think) a nicer job of self-documenting than showing its Label. To make the filename, add the correct extension (.xlsx for Excel, .csv for CSV), use Build Path to combine Folder and Filename, and wire to Save Report.
The next two functions add the Extract Everything and Write to Spreadsheet, using a Comma as a separator, which makes a CSV copy for you.
Bob Schor -
Save output report as .pdf file in a folder
Hi,
I have to create a report which has output in .pdf format, and then save that .pdf in a particular folder, which is already there.. Can anybody help ?thanks a lot..
one more ques on request priorities:
Can we set the priority in Oracle Reports ? Say, for example, we have scheduled weekly reports ( around 40 - 50 reports) that runs 1st of every month at 9AM. While these reports are still running , we want to run an adhoc report , which canbe for last one week. Can we set the priority such that adhoc report is executed first ? Or is it something like they both will run parallel in different sessions ?
I have posted this as a separate thread, but not getting replies.. -
" Displaying the Report in PDF file Format "
Hai Friend's,
I have Developed a Report in Web-Intelligence .My Report is having 50 Collums and 600 Rows. The Report is too big Report. when the Save the Report in PDF File format, The PDF file Format Report is Consisting of 10 Pages, The Report Output is not coming in One Page. But my user want the Report all the Field's :: Collumms,Rows in one Page.can Anybody let me know the solution.Hi Ashok,
You can change the page size and orientation in the web.xml in the following folder.
Web Intelligence default Page size Modification u2013 Follow these steps:
1. Open the defaultconfig.xml file found in the following directory:
servername\Program Files\Business Objects\Tomcat\webapps\businessobjects\enterprise115\desktoplaunch\webiApplet\AppletConfig
2. Look for the following code near the top of the page:
<KEY VALUE="page*default">
<FORMAT NAME="A4" ORIENTATION="portrait" />
</KEY>
3. Change this to:
<KEY VALUE="page*default">
<FORMAT NAME="LETTER" ORIENTATION="portrait" />
</KEY>
4. Save the file.
All the Best,
Madhu... -
How to save an image as PDF?
Hi,
I need help o how to save an Image as PDF file?? is this possible?Under Getting Started in the welcome window click Create PDF
Open your image
File>Save As...PDF
But I am finding that there are limitations on how big the image can be. I am trying to save a 20mb jpeg to pdf in acrobat and having issues. Good luck! -
I am Required to Save before opening a PDF file in FF 10.0.1. How can I get FF to open a PDF as the default?
Check your add-ons:
Cmd+Shift+A
Make sure the Adobe Acrobat NPAPI Plug-in is set to Always Activate. -
How to save the report file in network drive
Hi experts,
Can any one of you pls tell me how can save the report file in network drive.
My requirement:
by running a report i wll get daily data into a list.SO, i want to keep this in a common drive (network drive:Z) where every one can acces the txt file.
I want the code in SAP to design this.
Awaiting for an early reply.Is the Z drive in the application or presentation server ?
make sure the server has write access to the required folder
for presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'c:\test_xls.xls'
filetype = 'ASC'
write_field_separator = 'X'
TABLES
data_tab = itab.
for the application server, use
data: outfile(120).
OPEN DATASET outfile FOR APPENDING IN TEXT MODE ENCODING DEFAULT. -
How to export a Graph or Chart from a BW report to PDF file
Hi All,
I am new for BI7. i have one clarification
"How the system shall provide the users the ability to export a Graph or Chart from a BW report to PDF file in WAD"
Thanks In Advance
RaviYou have to use this command and assign your web items to this command to get graphs and charts
http://help.sap.com/saphelp_nw70/helpdata/en/44/85de4943af5919e10000000a1553f7/frameset.htm -
Save webi report as pdf programmatically
Does anyone has any SDK code sample or can point me to the location of code sample on how to save a webi report as PDF file programmatically? Also, is the ReportEngineSDK is sufficient for this task or I need some other SDK?
We are running XIr2 SP1 on Windows Server 2003, with Tomcat as web container.
Any help will be very much appreciated.Hi,
I think Using ReportEngine SDK you would not be able to save the webi report in PDF format.However it could be possible if you schedule a webi report to PDF format to unmanaged disk.
You can refer the following tutorials given in developer library's BusinessObjects Enterprise SDKs. You can either use .NET or Java SDKs.
How to schedule a report to a destination (FTP, SMTP, Disk, Printer, Inbox)
How to schedule and view Web Intelligence documents
Here is the link for developer library:
http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm
Thanks,
Swati -
No link after exporting Crystal report as pdf file
Hello,
If my Crystal Report contain link to the .avi file saved on the local hard disk and if I export the Report as .pdf file, pdf file does not contain that link. Why?
The overall scenario is like-
My application fires a query on SQL Server database and result of that query is stored in a Dataset. This dataset is set as a datasource to the Crystal report. Now some, records (returned by the query) have .avi files(i.e. Event Videos which are stored on the local hard disk) associated with them. I have stored these .avi files in a specific path on local Hard disk say "C:/EventVideos/*.avi" . I used a special format in these avi files name. (like - "EventVideo_1.avi" (This is for 1st event), "EventVideo_5.avi" (This is for 5th event)etc. to identify which avi is for which event. All events do not have avi files associated with them)
Now, I take one object in crystal report. Using it's Format editor created a formula for hyperlink as -
"file:///c:/EventVideos/EventVideo_" + {DataTable1.EventID} + ".avi" .
EventID is the field of dataset which has ID's (like 0, 1, 2, 3, 4 etc) of all resulted events. It is of a String data type.
Now when I export, my report as .xls, .rtf, .doc, I can open the avi files. When I bring cursor on this object, cursor get change to Hand and after click on it avi file start to play.
But if I export it as .pdf, it does not contain the link for avi files. When I bring cursor on this object, it does not change to Hand, and after click on it nothing happens. No video play.
I stick to this problem.
Appreciate your help.
Thanks in advance.Taken from CR Help File:
"PDF format is a page-based format. The exported documents are intended for printing and redistribution. PDF format will export both layout and formatting in a manner that is consistent with how the report looks on the Preview tab. PDF format embeds the TrueType fonts that appear in the document. (Non-TrueType fonts are not supported.) This export format does not support Microsoft font-linking technologyu2014which is used to provide support for some extended character sets such as Chinese HKCS. Therefore, the fonts used in the report must contain all of the required glyphs. These URI types are supported for hyperlinks: "http:", "https:" and "mailto:".
Therefore your hyperlink is not working as u are using File type when cr only supports http https and mailto uri types
Maybe you are looking for
-
Login failed when i login to a SQL server in a different domain
Hi Experts, I have a this issue. When i try to connect to a SQL server located in another domain (Domain A) with a management studio of the same version in another domain (Domain B) It is not allowing me. I am getting the below error. Error content d
-
No service at all-Can anybody help???
Approximately two weeks ago I moved from SKY to BT infinity. Since then I have no services what so ever. I ring in daily and talk to a new operative. Each one is very pleasant and assures me they have the solution and they will ring back the followin
-
Logon failure due to an internal error
Hi, We have installed XI 3.1 SP3 (plus fixpacks) on a server and I am trying to access Web Intelligence on the client machine. I get the error "Logon failure due to an internal error." Any ideas what the problem may be? I can login into Web Intellige
-
Later this afternoon my phone suddenly turned off and when I turned it back on it said that activation was required. It asked for my apple ID and password and after attempting to sign in it says that there is problems with the activation and that I s
-
Dear CIN expert. I gone through lot's of threads but not found solution. User wan to transfer credit in previous month with t code J2I8 (RG23C II). Is it possible to change the date any how. Kindly suggest if any workaround for the same. Regards Subh