How to split a report in many PDF
Post Author: metoo
CA Forum: Other
I have a BO report that has two groups: year and location. This report has to be exported to different PDF files which correspond to the data of one of the groupsyear. For example, one pdf file has only data for 2004, another one for 2005, and so on. The VB code that I am using is below, labeled "Working Code" and works fine. Now, I want to create pdf files by location. So, I made a copy of the code and change some names and values and now it generates the different PDF files but it dumps the whole report in each file (all the locations) instead of just showing the data that correspond to the specific locationsee code below labeled "Not Working Code". Any suggestions on how to fix this? Does it have to do with what is in ""? "Location" is the name of the dimmension, should I be delcaring something else somewhere else?
"Working Code"
Sub creates_yearsPDF() ExportToPDF "2004" ExportToPDF "2005" ExportToPDF "2006" ExportToPDF "2007" MsgBox "Exporting Year Report to PDF files has been completed."
End Sub
Private Sub ExportToPDF(strFName As String)
Application.Variables.Item("Year").Value = strFName
ThisDocument.ActiveReport.ForceCompute ThisDocument.ActiveReport.ExportAsPDF "c:\PDF file for " & strFName
End Sub
"Not Working Code"
Sub creates_locationsPDF() ExportToPDFL "North" ExportToPDFL "South" ExportToPDFL "East" ExportToPDFL "West" MsgBox "Exporting Locations Report to PDF files has been completed."
End Sub
Private Sub ExportToPDFL(strFName As String)
Application.Variables.Item("Location").Value = strFName
ThisDocument.ActiveReport.ForceCompute ThisDocument.ActiveReport.ExportAsPDF "c:\PDF file for " & strFName
End Sub
This thread might be helpful (but not my contributions I fear ;-)
Re: SQL query report columns
Similar Messages
-
How to generate a report direct in PDF with oracle developer 6i
hi all
Please help me about this issue.
THAT How to generate a report directly in PDF using oracle developer 6i.
Regards
Yousuf Ahmed SiddiquiHi,
You can create the Report directly in PDF by setting some of the Report Parameters
i.e. DESTYPE, DESNAME AND DESFORMAT as follows before calling the Report.
DECLARE
PL_ID PARAMLIST;
PL_NAME VARCHAR2(10) := 'param_list';
BEGIN
PL_ID := GET_PARAMETER_LIST (PL_NAME);
IF NOT ID_NULL (PL_ID) THEN
Destroy_Parameter_List(PL_ID);
END IF;
PL_ID := Create_Parameter_List(PL_NAME);
Add_Parameter (PL_ID, 'DESTYPE', TEXT_PARAMETER, 'FILE');
Add_Parameter (PL_ID, 'DESNAME', TEXT_PARAMETER, 'c:\test.pdf');
Add_Parameter (PL_ID, 'DESFORMAT', TEXT_PARAMETER, 'PDF');
RUN_PRODUCT (REPORTS, 'REPORT_NAME', ASYNCHRONOUS, RUNTIME, FILESYSTEM, PL_ID, NULL);
END;Hope this helps.
Best Regards
Arif Khadas
Edited by: Arif Khadas on Apr 22, 2010 9:24 AM -
How to omit the report column in pdf-print?
Hi, experts!
I have a column with html code (a link to another web-page). The html draws a button with redirection to a specific link. In the properties of that column I set an "html" format, so the code executes and the desired button appears... but! When I print this report (using printer friendly option PDF) it shows me the html code of the button, but not the button itself. So the question is:
a) how to omit specific column from a PDF?
OR
b) how to push OBI showing the button (not the html code)?
thnx 2 all in advance!Hi,try reading and understanding the third-last one from
http://obiee101.blogspot.com/search/label/PDF
...It is a start...
i hope i helped
http://greekoraclebi.blogspot.com/
/////////////////////////////////////// -
How to split the report into different versions view 1 agent delivery
Hello
I have a scenario where I need to send a dashboard to multiple users. The user information are stored in the table like the following:
USER Day Car Pay Type Cost Email
USER1
-10
-2
Honda
Customer Pay
500
[email protected]
USER2
-4
-1
AUDI
Customer Pay + Warranty
1000
[email protected]
USER2
-4
-1
PORSCHE
Customer Pay + Warranty
1000
[email protected]
Now I have a dashboard call Car, on this dashboard I have prompts like Date, Car, Pay Type, Cost, pretty much the same name as the columns in the above table. I have also set up session variables to pick up users based on the log in.
Now for user2, he is getting 1 email, which is the dashboard with both Audi and Porsche on there. Instead, he wants to 2 attachments, 1 for Audi and 1 more Porsche. Is there a way to achieve this using 1 agent?
Please let me know how to split the result sets based on user records in the table
Thank youHello,
Thank You very much for the useful hint.
Regards
Aloha -
How to split a report in several parts, displayed next to each other ?
Hi all,
I searched the forum, read the manuals, but couldn't find a way to do the following:
I have a page, containing several regions. The bottommost region contains a narrow (2 small columns) report, with several tens of rows. This forces the user to always scroll the page vertically to get a complete overview.
What I'd like to do is to split the display in sets of eg. 10 rows and display these sets horizontally next to each other. Something like this:
xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx
Is this at all possible ? And if so, can you hint me how ?
Thanks a lot in advance,
MarkThis thread might be helpful (but not my contributions I fear ;-)
Re: SQL query report columns -
How to download the report output into PDF format
Hi friedns
from the report output when user clicks download button
it has to download to PDF format
how to do this
thanks in advance
venuhi venu,
check this sample code
Save Report Output to a PDF File
This report takes another report as input, and captures the output of that report. The output is then converted to
PDF and saved to a local file. This shows how to use some of the PDF function modules, as well as an easy way to
create PDF files.
Source Code Listing
report zabap_2_pdf.
*-- Enhancements: only allow to be run with variant. Then called
*-- program will be transparent to users
*-- TABLES
tables:
tsp01.
*-- STRUCTURES
data:
mstr_print_parms like pri_params,
mc_valid(1) type c,
mi_bytecount type i,
mi_length type i,
mi_rqident like tsp01-rqident.
*-- INTERNAL TABLES
data:
mtab_pdf like tline occurs 0 with header line,
mc_filename like rlgrap-filename.
*-- SELECTION SCREEN
parameters:
p_repid like sy-repid, " Report to execute
p_linsz like sy-linsz default 132, " Line size
p_paart like sy-paart default 'X_65_132'. " Paper Format
start-of-selection.
concatenate 'c:\'
p_repid
'.pdf'
into mc_filename.
*-- Setup the Print Parmaters
call function 'GET_PRINT_PARAMETERS'
exporting
authority= space
copies = '1'
cover_page = space
data_set = space
department = space
destination = space
expiration = '1'
immediately = space
in_archive_parameters = space
in_parameters = space
layout = space
mode = space
new_list_id = 'X'
no_dialog= 'X'
user = sy-uname
importing
out_parameters = mstr_print_parms
valid = mc_valid
exceptions
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
*-- Make sure that a printer destination has been set up
*-- If this is not done the PDF function module ABENDS
if mstr_print_parms-pdest = space.
mstr_print_parms-pdest = 'LOCL'.
endif.
*-- Explicitly set line width, and output format so that
*-- the PDF conversion comes out OK
mstr_print_parms-linsz = p_linsz.
mstr_print_parms-paart = p_paart.
submit (p_repid) to sap-spool without spool dynpro
spool parameters mstr_print_parms
via selection-screen
and return.
*-- Find out what the spool number is that was just created
perform get_spool_number using sy-repid
sy-uname
changing mi_rqident.
*-- Convert Spool to PDF
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid= mi_rqident
no_dialog = space
dst_device = mstr_print_parms-pdest
importing
pdf_bytecount = mi_bytecount
tables
pdf = mtab_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.
call function 'DOWNLOAD'
exporting
bin_filesize = mi_bytecount
filename = mc_filename
filetype = 'BIN'
importing
act_filename = mc_filename
tables
data_tab = mtab_pdf.
FORM get_spool_number *
Get the most recent spool created by user/report *
--> F_REPID *
--> F_UNAME *
--> F_RQIDENT *
form get_spool_number using f_repid
f_uname
changing f_rqident.
data:
lc_rq2name like tsp01-rq2name.
concatenate f_repid+0(8)
f_uname+0(3)
into lc_rq2name separated by '_'.
select * from tsp01 where rq2name = lc_rq2name
order by rqcretime descending.
f_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear f_rqident.
endif.
endform." get_spool_number
Regards,
Naveen -
How to split one request into many to reduce response time
Hi,
In a request I may get more than 20-30 materials for which, pricing info need to be returned. Its increasing the load on SAP and XI is not waiting for a long time to get the price. Please let me know a work around for this otherthan BPM.
Or is there any mechanism by which I can split the XML into multiple XMLs and process multi small requests.
Thanks
SeshuHi Seshu -
Timeouts can be tricky in synchronous cases with all the various components of XI. In your case, you've implied that the RFC receiver adapter is being used to talk to SAP and it's taking a long time for SAP to process this request and send back a response. Are you getting a '...MessageExpiredException'? If so, the parameter 'xiadapter.inbound.timeout.default' in the 'SAP XI Adapter: XI' J2EE service would be relevant (see Note 791379 for details). The 'syncMessageDeliveryTimeoutMsec' parameter of the 'SAP XI Adapter: RFC' J2EE service is only relevant if you're using the RFC sender adapter.
Other timeout settings may come into play. <a href="http://service.sap.com/~sapidb/011000358700005909032005E/XI30XI70_TroubleGuide.pdf">The XI Troubleshooting guide</a> has some good information on this.
Also, if this scenario is required to be synchronous, there's no way to split the request without using BPM as synchronous requests cannot be sent to multiple receivers.
Regards,
Jin -
Newbie How to do a FlattenPages of many PDF in a Batch?
I'm using Acrobat Pro 10. I have a PDF with a fillable form.
Example, 2 users fill out the PDF( with Adobe Reader) and Upload it to server.
I want the server to run a routine( batch process) to take those
2 PDF's and make it Flatten.
I will eventually want to combine those 2 PDF into ONE PDF,
where I can search on a word.
How can this be done or is there a better way?
TIA
SH_42It can be done with Acrobat, but Acrobat cannot be used on a server to run automated processes. This is a licensing restriction, but Acrobat is also technically unsuitable. It wasn't designed and engineered for such use. You will have to look for products that have been designed specifically for server use.
-
SQL help, how to split one row into many rows
Hi,
I got a question on SQL. One table, structure like this: (2 columns)
A 123,456,789
B 012,345
C 678,901,234
How to get the final result like below:
A 123,
A 456,
A 789
B 012,
B 345,
C 678,
C 901,
C 234
Do I have to use PL/SQL? Appreciate any thought you have on it!i doubt the second column string operation can be acheived within single query to break it into rows.
but here is the pl/sql to do it.
SQL> create table test_data(col1 varchar2(5), col2 varchar2(30))
2 /
Table created.
SQL> insert into test_data values('A','123,456,789')
2 /
1 row created.
SQL> insert into test_data values('B','012,345')
2 /
1 row created.
SQL> insert into test_data values('C','678,901,234')
2 /
1 row created.
SQL>
SQL> set serveroutput on
SQL>
SQL> declare
2 pos number:=0;
3 str test_data.col2%type;
4 begin
5 for i in (select col1, col2 from test_data)
6 loop
7 str := i.col2||',';
8 loop
9 pos := instr(str, ',');
10 dbms_output.put_line(i.col1||' '||substr(str, 1, pos-1));
11 str := substr(str, pos+1);
12 exit when str is null;
13 end loop;
14 end loop;
15 end;
16 /
A 123
A 456
A 789
B 012
B 345
C 678
C 901
C 234
PL/SQL procedure successfully completed. -
Word splits document into lots of PDFs
I've got a 24 page Word document that I'm trying to print to PDF format. I keep getting messages saying page borders are outside the printable area, but when I click continue, lots of PDFs are created, some with 2 pages, another with 9 etc.
How can I export the word document as a single PDF?
Thanks in advanceI realise this is a slightly different question, but it's very related. I also have had preview split my documents into many pdfs, and I'm sure it's because of the section breaks.
However, I need to keep the section breaks in my Word document becuase some of the pages are in Landscape layout, while others are in Portrait.
Is there a way to combine the pdf's that were formed? Or "stitch" the documents together?
Thanks for the help! -
Remove encryption or protection for many PDFs in Action Wizard?
Hello,
I can remove encryption manually for each PDF file, but I have hundreds of files so it is impossible to do it manually.
From what I know, in Action Wizard, I can only add encryption for many files, there seems to be no 'encryption remove' function in Action Wizard for me to apply to many files.
So, my question is, how do I remove encryption for many PDF files at once without having to so manually?
Thank you.Sir, what you said makes perfect sense but it may work only in case the files are protected with a password.
This case seems different.
I remove the protection manually by choosing Protection --> Encrypt --> Remove.
No password whatsoever.
After that, I am able to Edit Object, Edit Document Text, Add or Edit Text Box.
To make sure I followed your steps correctly, this is how I did it:
http://img141.imageshack.us/img141/3079/screenshot20110315at616.png -
How to split table in the report so it shows on the next page?
Hi,
How to split table in the report so it shows on the next page? Im trying to fit long (many columns) table into my report page. It is too long however. I want it to wrap and show the rest on the next page. What I get now is table cut at the page end and rest is not visible.Yes, this might be that the amount of data will cause table to grow and exceed 1, 2, 3.. pages. In that case I would probably want to have, lets say , one half of columns on 1st page then the other on the 2nd page and then repeatedly the same sequence down across all pages. Is there a way to achieve this?
-
R12 - How to customize the seeded Purchase Order PDF report
Hi,
We need to customize the layout AND the data of the seeded Purchase Order pdf report that is generated in PO Summary form when user picks drop-down menu Inquire->View Document. I know how to set up the Document Type with a customized layout but I do not know how to update the XML data that feeds the layout.
Thanks, MikeMike,
Please review the following documents.
Note: 374165.1 - How To Customize The PDF Output For Printed Purchase Order Report (Portrait) ?
Note: 406094.1 - How To Diagnose Issues Within Oracle Purchasing PDF File Creation for Printing
Regards,
Hussein -
How to generate a report in pdf from a stored proc
Hi, i need guidance on how to generate a report in pdf from an oracle stored proc.
The environment is oracle 10gas + 10gdb.
On a specific event, a PL/SQL stored procedure is called to do some processing and at the end of the processing to generate report which has to be sent to the printer (and optionally previewed by the user).
Can anyone assist me with this?Hi ,
One 'simple' way is by using the DBMS_SCHEDULER db package and the procedure CREATE_JOB(....) using as job_type the value 'EXECUTABLE'...
Read for further info in 'PL/SQL Packages and Types Reference'.
If you have access to OEM ... you can configure this there using wizard.....
Other way is to use the External Procedure call capabiblity of Oracle DB Server...:
http://www.oracle.com/pls/db102/ranked?word=external+procedure+call&remark=federated_search
My greetings,
Sim -
How to get a report in pdf format.
Hi Experts,
Could any one let me know that, how to get the report in PDF format.
Once a report is generated it should be displayed in pdf format or downloaded in pdf format.
Thanks in Advance,
Regards,
Irfan HussainHi,
Check out this code:
REPORT zspooltopdf.
PARAMETER: p_email1 LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_sender LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_delspl AS CHECKBOX.
*DATA DECLARATION
DATA: gd_recsize TYPE i.
* Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
* Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
* Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
* Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
*START-OF-SELECTION.
START-OF-SELECTION.
* Write statement to represent report output. Spool request is created
* if write statement is executed in background. This could also be an
* ALV grid which would be converted to PDF without any extra effort
WRITE 'Hello World'.
new-page.
commit work.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
*** Alternative way could be to submit another program and store spool
*** id into memory, will be stored in sy-spono.
*submit ZSPOOLTOPDF2
* to sap-spool
* spool parameters %_print
* archive parameters %_print
* without spool dynpro
* and return.
* Get spool id from program called above
* IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
PERFORM convert_spool_to_pdf.
if p_delspl EQ 'X'.
PERFORM delete_spool.
endif.
IF sy-sysid = c_dev.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool',
'request to be created.'.
ENDIF.
* FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
* FORM get_job_details *
FORM get_job_details.
* Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
* FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
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.
CHECK sy-subrc = 0.
* Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
* FORM delete_spool *
FORM delete_spool.
DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
ld_spool_nr = gd_spool_nr.
CHECK p_delspl <> c_no.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = ld_spool_nr.
ENDFORM.
Regards,
Gayathri
Maybe you are looking for
-
Captivate 7 not recognizing animated GIF's?
I've used photoshop CS6 to create an animated GIF from a video clip. using timeline I have a file saved in .GIF format and it is clearly an animation. When I insert > animation CV7 Tells me "file is not an animated GIF file". It is starting to become
-
Hope someone can help......The ipod works (as far as playing tunes) Video screen is blank......Any Info as to how and if it can be repaired???????
-
HT204150 I have lost contacts in my icloud!! How do i get them back?
I have lost contacts in my icloud!! How do i get them back?
-
Transfer amount fields to app. server using fieldsymbol
Hi,, I am facing a strange problem while using fieldsymbols .Here is my requirement. I have a custom table records ( which also contains amount fields ) in fieldsymbol , which i need to transfer to application server . But when i am trying to transfe
-
Dlsw problem : stuck in WAIT_CAP
Hi all we had a great problem with some snasw/dlsw routers. About all dlsw peers remained in WAIT_CAP state( except few resources where dlsw connection ok ) while no ip issues were present between central routers and dlsw remote routers.... The appn