How to print a width height report? Urgent!
I must print some data on pre-printed table. The table is 680w*263h. When I print, I set orientation and size, but the result becomes a 680h*263w report. Below is my code. I'm working on JDK1.4.2-08, is this a JDK bug? please help me, thanks.
DocFlavor flavor = DocFlavor.SERVICE_FORMATTED.PRINTABLE;
PrintService printService = PrintServiceLookup.lookupDefaultPrintService();
DocPrintJob job = printService.createPrintJob();
DocAttributeSet das = new HashDocAttributeSet();
das.add(OrientationRequested.PORTRAIT);
das.add(new MediaPrintableArea(0,0,680,263,MediaPrintableArea.MM));
Doc doc = new SimpleDoc(new TestPrint(), flavor, das);
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
job.print(doc, pras);
public int print(Graphics g ,PageFormat pf , int pageIndex )
if(pageIndex != 0 )return java.awt.print.Printable.NO_SUCH_PAGE;
g.drawString("Hello World1!",0,20);
pf.setOrientation(java.awt.print.PageFormat.PORTRAIT);
Paper paper = new Paper();
paper.setSize(680,263);
pf.setPaper(paper);
System.out.println(pf.getOrientation());
System.out.println(pf.getWidth());
System.out.println(pf.getHeight());
return java.awt.print.Printable.PAGE_EXISTS;
}
If orietation changes to 'LANDSCAPE', all the characters orientation becomes vertical. I just want to print a report like this:
| Hell World!__________________|
|----------------------------------------------+
Message was edited by:
pierre19458
Message was edited by:
pierre19458
Similar Messages
-
How to print Data Model in Report??
Do anyone know how to print Data Model??
Thanks your help.
- FrankHi Venkat,
Thanks alot.... i am checking the appendix k.
I want to know that if i want to customize the report as per the client requirement,
can you please let me know which template i will use if i required remittence advice as well as check print data on the layout.
The following is the list of field i required:
Vendor ID
Check Date
Check number
invoice date
invoice/ CR memo number
invoice description
invoice gross amount
invoice discount amount
invoice net amount
total gross amount
total discount amount
total net amount
logo
company name and info
bank name and info
check number
check amount spelled out
check date
check amount numeric
payee name
CEO signature
MICR check number
MICR routing number
MICR bank account number
mailing return address
mailing address
Venkat it would be great help if you please let me know the exact process to be follow for check printing report.
I worked on bi publisher report in 11i, but in 12i the process is bit different.
also if you have any template ready can you please send me on my mail id ... i forwarded you the test mail from my official id or on [email protected]
Looking forward to your kind response.
Regards
Ratnesh -
How to controll column width in report ?
Dear All,
i have created Classic Report but here Column width is too large.
i want to controll column width in report .
How can i do this..
ThanksHi Vedant,
There are two possibilities in your case.
1.width of your column heading is too large.
include break in your column heading
for ex .. column heading is employee department number then write it as *[Employee(br)Department(br)Number]* // replace ( with < and ) with > in br
2) Value is too large
Go to Report Attributes->edit your column->column formatting->css style
In CSS style put this display:block;width:100px;white-space:wrap
Hope this will helps you,
Thanks,
Jitendra -
How to Print the Attachment in Reports
Hi,
I am having a Custom form which captures information related to Items. User is attaching Picture of the Item as Attachments. I will generate the information what the User entering in this form.
Now, my question is, how to print this Item Picture attached as attachments in the report.
Regards/PrasanthYou can use a distribution file to define an attachment, have a look at http://download.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_dist.htm#i1006076
-
How to print date/time in report page footer?
Hi
I have a report which users can print as PDF.
However, I like to display current date/time in report footer.
I can see the Page Footer in section but can't figure out how to print date/time there.
Thanks for help.hi movilogo
Please try this.
Create hidden item P1_DATE
Create On load process in page 1 and put this code
begin
:P1_DATE:=TO_CHAR(SYSDATE,'DD-MON-YYYY HH:MM:SS');
end;
Open your region in Page 1 put this code in Footer area
*&P1_DATE.*
Refresh your page.
you will get the output like this.
16-SEP-2009 11:09:17
thanks
Mark Wyatt -
How to print logo in standard report
Hi,
How to print a logo in sap ordinary report
Thanks,
SreedharHi Sreedhar,
It is not possible to print logo in the ordinary report, but it can done through ALV.
Write the code in Top-of-page event in ALV.
The following is the code for inserting the logo in ALV.
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
I_LOGO = 'ENJOYSAP_LOGO'
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM.
Rewards if it is helpful...
Regards,
Omkar. -
How to export layer width, height, and position to a text document?
I am working on an automated workflow for which I need to know the exact width, height, and position in pixels of certain layers in a PSD.
I am pretty sure this is possible with applescript but does anyone know of a way to have this info included automatically in the documents metadata?
thanks,
ryanHi Gabriele - how did you add the subs to FCP? if you added them using the text tools built in then you need to try to extract those first. Neither FCP or DVDSP are good places to create subtitles, but apps like STL Edit and Belle Nuit are. These will both create subs that can be imported into DVDSP. You can also use a text file to import the subs as long as the text file is set up correctly. The precise format is listed in the manual for DVDSP and a tool like BBEdit is ideal if you want to do the subs this way. Some folk even use Excel to set up the timecodes, etc, but personally I find that too distracting, preferring to work with STL Edit when I need to add subs.
One thing is almost universally agreed upon in here - create the subs outside of DVDSP and import them in, since if you need to move, alter or otherwise change them it is a lot easier from within a text file than from within DVDSP. -
Hi,
I created a Feedback page using the apex feedback feature, not a customized page. The link to the Feedback page calls the apex.navigation.popup.url using javascript to open a popup window. Does anyone know the proper syntax for adjusting the width and height of the popup window?
I have tried the following, but the window width/height does not adjust:
javascript:apex.navigation.popup.url('f?p=&APP_ID.:102:&SESSION.:::102:P102_APPLICATION_ID,P102_PAGE_ID:&APP_ID.,&APP_PAGE_ID.',width=350,height=400);
javascript:apex.navigation.popup.url('f?p=&APP_ID.:102:&SESSION.:::102:P102_APPLICATION_ID,P102_PAGE_ID:&APP_ID.,&APP_PAGE_ID.',350,400)
Version: APEX 4.2
Thanks,
MakeishaWhy not call navigation.popup instead of navigation.popup.url then? popup.url does have the hardcoded values, but it just calls popup anyway. Nothing stops you from doing the same:
javascript:apex.navigation.popup({"url":'f?p=&APP_ID.:102:&SESSION.:::102:P102_APPLICATION_ID,P102_PAGE_ID:&APP_ID.,&APP_PAGE_ID.',"name":"winLov","width":350,"height":400});
Use "winLov" if you want to keep that same popup.url functionality of overriding the same opened window. If you do not provide name the url will open in a new window every time.
The width and height values are hardcoded in popup.url, but they are not in .popup. There are only defaults in a default object there, and will be overridden when you provide an object with these parameters to the function. -
How to print watermark in classical reports?
How to display the watermark in classical reports?
hi
go to se78 graphics -> enter
BMAP(BITMAP IMAGES)
Name MYBMP
select radio button
color ->import
filename: c:\pictures\123.bmp.
name : mybmp
description : BMP ->continur ->save.(activate it)
now go to se71->choose the prog -> layout ->right click ->create graphics.
utilities -> printing test -> output device -> LP01.
Hope this helps
if it helped, you can acknowledge the same by rewarding
regards
dinesh -
How to Print aliases in the report
Hi,
I have a scenario where i need to print the alias names for one dimension and member names for the other, Here I am trying to generate a level 0 extract with the help of report script.
when i specify the function {OUTALTNAMES} for printing the aliases for that particular dimension. it prints the aliases for all the dimensions specified in the report script. here is my report script
<ROW (Time, Employee, JobCodes, Products, Branch, Accounts)
{NOINDENTGEN}
{SUPPAGEHEADING}
//{SUPCOLHEADING}
{SUPMISSINGROWS}
{SUPCOMMAS}
//{SUPZEROROWS}
{SUPBRACKETS}
{TABDELIMIT}
{ROWREPEAT}
//{MISSINGTEXT "#MI"}
{DECIMAL VARIABLE}
<SYM
<SUPSHARE
//"STRAT_LOAD"
//{OUTMBRNAMES}
"2007 - JAN"
//{OUTMBRNAMES}
<LINK (<LEV("Employee",0) )
//{OUTMBRNAMES}
<LINK (<LEV("JobCodes",0) )
//{OUTMBRNAMES}
<LINK (<LEV("Products",0) )
{ OUTALTNAMES }
<LINK (<LEV("Branch",0) )
"Actual_Units"
"Actual_$"
"Points_Units"
"Points_$"
Above i need to print the alias name of all the branches and the member names for employees,jobcodes and products. some how the outaltnames is not working. pls advice
ThnxHi,
this is a bug. It seems that once you select {OUTALTNAMES} you can't go back to {OUTMBRNAMES}.
The workaround I have used is to incorporate using the <OUTALTSELECT "Alias table name". This allows you to select from more than 1 alias table. So where I need to use the member name, I select an alias table that has no aliases defined for that dimension.
To incorporate this workaround, define {OUTALTNAMES} at the top (or even above each dimension), then put the <OUTALTSELECT "Alias Table Name" above the dimension in the script.
Robert -
How to print a sytem profile report to a PDF?
Hi,
I know how to get to the System Profile, but when I press print, it only prints the first page.
I know I can save it as a .SX report (or whatever the file extension is).
I want to print it to a PDF.
Once I get the .SX, can I open and print that file?
BethFiles generated by System Information are XML files. They contain code, which needs to be interpreted by software to make it human-readable. Open the file with TextEdit or Xcode and you'll see what I mean.
You'd have to find a third party application that is capable of reading XML files, making them human-readable and allows you to print the interpreted version instead of the source code of the file. I'm not aware of any such software. Maybe somebody else here on the forums can tell you more. -
How to PRINT DATA in classical report when ever execute
Hi,
All ABAP experts,
I am updating PM work order in IW32 by using BADI, with addition to success or error log i need to display data in basic list and also system has to print that data automatically by using system's default printer. User can not press print button in basic list because sometimes this program will schedule in background, due to this user wants see upload results in a print out.
I dont know how to write logic to get output like this. Please can anyone share how to write logic for this issue.
Before posting this issue i search in forms but I didnt get appropriate solution.
Thanks in advance and any sort of help will appreciate highly.Hi,
Try with this piece of code
Declaration of local constants
CONSTANTS : lc_paart LIKE sy-paart VALUE 'X_65_132', " Paper Format
lc_locl TYPE sypdest VALUE 'LOCL'. " Destination
MOVE 'X' TO v_print.
Setup the Print Parmaters
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
authority = space
immediately = v_print
new_list_id = c_x
no_dialog = c_x
user = sy-uname
IMPORTING
out_parameters = v_print_parms
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc NE 0.
CLEAR : v_print_parms.
ENDIF.
The printer destination has to be set up
IF v_print_parms-pdest = space.
v_print_parms-pdest = lc_locl.
ENDIF.
Explicitly set line width, and output format so that
the PDF conversion comes out OK
v_print_parms-linsz = c_linsz.
v_print_parms-paart = lc_paart.
Regards,
nagaraj -
How to resize column width in report?
hi all,
i read somewhere here that in order to resize column width in a report, you need to go to report attributes, then edit the column you wish to resize and then go to the CSS Style and place something like "width=600px". while this works very well in Internet Explorer, it somehow has no effect in Firefox 3.0. is there a way to make it work both browsers?
thanks
allenHi,
Sorry, I misunderstood. There are several methods you could use:
1 - Use the span tags around the data itself - this would require adding the tags into the sql statement itself
2 - Use javascript to set the column widths by adding a style to the TD tags for each cell
3 - Create a new Report Template and use COL tags immediately after the TABLE tag in the Before Rows section to specify the widths of all columns
Option 3 may be the easiest?
Andy -
How to print smartform from a report
Im displaying a report, which contains several documents, whereby which ewch document is connected to a smartform.
The page displaying the report contains a button 'Print'
When clicking on the Print button, all the documents in the report should be printed.
But my program is creating a spool file of the report, which will be printed further - its not what I want
I want the program to print the smartforms of each documents on the report directly.
heres my code and I dont know what I should do to be able to print the smartforms directly
Get the function module name of the smartform.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = '/EU000/FI_PRINT_DEBIT_NOTE'
IMPORTING
fm_name = g_fm_name.
gw_options-tdnoprev = ' '.
gw_options-tddest = 'LOCL'.
gw_options-tdprinter = 'LOCL'.
gw_options-tdnewid = 'X'.
gw_options-tdimmed = 'X'.
gw_control-preview = ' '.
gw_control-no_dialog = 'X'.
write: text-006,' ', text-007, ' ', text-008.
write:/.
For all the documents
LOOP AT gi_all_data INTO gw_all_data.
write: gw_all_data-gjahr(4), ' ',gw_all_data-belnr,' ', gw_all_data-belnr.
write:/.
CASE SY-UCOMM.
WHEN 'PRINT'.
Call the smarform
CALL FUNCTION g_fm_name
EXPORTING
gw_all_data = gw_all_data
user_settings = ' '
output_options = gw_options
control_parameters = gw_control.
WHEN 'BACK'.
LEAVE SCREEN.
ENDCASE.DATA: x_control_parameters TYPE ssfctrlop,
x_output_options TYPE ssfcompop.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_prin LIKE usr01-spld.
SELECTION-SCREEN BEGIN OF LINE.
INITIALIZATION.
SELECT spld
FROM usr01
INTO p_prin UP TO 1 ROWS
WHERE bname = sy-uname.
ENDSELECT.
START-OF-SELECTION.
x_output_options-tdimmed = c_x.
x_output_options-tddest = p_prin.
x_output_options-tdnewid = c_x.
x_output_options-tdreceiver = sy-uname.
x_output_options-tdcopies = '001'.
x_control_parameters-device = 'PRINTER'.
x_control_parameters-no_dialog = c_x.
x_control_parameters-langu = sy-langu.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_SMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = f_name1
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
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 P_PRI = 'X'.
CALL FUNCTION F_NAME1
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = X_CONTROL_PARAMETERS
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = X_OUTPUT_OPTIONS
USER_SETTINGS = 'X'
wa_header = wa_zmexh51
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
tab_item = TAB_ZMEXD51
tab_item1 = TAB_ZMEXS51
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.
ELSEIF P_PRE = 'X'.
CALL FUNCTION F_NAME1
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = X_CONTROL_PARAMETERS
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = X_OUTPUT_OPTIONS
USER_SETTINGS = 'X'
wa_header = wa_zmexh51
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
tab_item = TAB_ZMEXD51
tab_item1 = TAB_ZMEXS51
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.
ENDIF.
Check the above code its just similar requirement it may helpful to you.
Thanks,
Phani. -
How to print title in WAD report
Hi,
I need to be able to print the title of a WAD report. I need this to be exported with specific font and color. I tried using the text box but, in text, I cannot give any font or size to the text. I am using the "Header" and giving the text of the title in the Print configuration, but is there any other alternate way? Any suggestions???
ThanksHi ,
Can you please try with 'Info Field'.
Thanks & Regards,
Ramnaresh.P.
Maybe you are looking for
-
How to copy and replace new Mountain Lion hard drive with old Snow Leopard drive?
So far I have not found an answer to my question, so I am hoping that this is feasible. A while ago I purchased a used 2010 Macbook Pro running Snow Leopard that did not have the installer disc. A week ago the hardware died on me, so I replaced it wi
-
Bash: Passphrase encryption program
Bash: Passphrase encryption program I wrote this a while back while playing with gpg. #!/bin/bash # Passphrase encryption program # Created by Dave Crouse 01-13-2006 # Reads input from text editor and encrypts to screen. clear echo " Passphrase Encry
-
Why can't I load any new video on my Ipad? It shows that I have used 27.2GB and have 609MB remaining even though everything listed including photos and camera only adds up to 7GB. I purchased additonal storage on Icloud and have 24GB left. I am getti
-
I am unable see iphone on i tunes. Updated itunes, restarted the iphone and computer
I am not seeing iphone on itunes. Even after updating the itunes software, restarting the iphone as well as restarting computer. USB connection also proper
-
Recovery using backup controlfile
hai, can any one explain me on what is the difference between recovering database as, recover database until cancel using backup controlfile;and recover database until cancel;regards ashik