Run reports direct to printer
Hello all:
In developer 6i i created a form with two buttons , one to run reports on the screen (P_RunReport('report_name','SCREEN'); )the other is to run reports directly to the printer (P_RunReport('report_name','printer');),
Now when i convert this form in developer 10g both buttons run reports on the screen,So how can i direct reports to printer within the same form?.
Thanks alot.
I believe you'll be using Set_report_object somewhere in your code.
Shall you check exactly which value is going into that?
If you are sure that the value is going in is "SCREEN' or 'PRINTER', could you debug into the reports trace file?
That might help you.
Warm Regards,
Raja.
Similar Messages
-
Form 6i printing report directly to printer
Hi Professionals,
I am in badly need of help to print my barcode report directly to printer from form, currently it is working fine if i make it preview first and then user has to select network printer to print, but user is not accepting that manual step, and therefore we are unable to launch our material management module.
MY CURRENT CODE WHICH WORKING FINE WITH PREVIEW..................
add_parameter(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'PREVIEW');
add_parameter(PL_ID, 'MAXIMIZE', TEXT_PARAMETER, 'YES');
add_parameter(pl_id,'paramform',TEXT_PARAMETER,'NO');
add_parameter(pl_id,'STR',TEXT_PARAMETER,:IM_STR_ISSUE_MASTER.STR_CODE);
add_parameter(pl_id,'BAT',TEXT_PARAMETER,:IM_STR_ISSUE_DETAILS.BAT_ID);
add_parameter(pl_id,'DIV',TEXT_PARAMETER,:IM_STR_ISSUE_DETAILS.GRP_CODE);
add_parameter(pl_id,'GRP',TEXT_PARAMETER,:IM_STR_ISSUE_DETAILS.SUB_GRP_CODE);
add_parameter(pl_id,'ITM',TEXT_PARAMETER,:IM_STR_ISSUE_DETAILS.ITEM_CODE);
add_parameter(pl_id,'COPIES',TEXT_PARAMETER,:IM_STR_ISSUE_DETAILS.QTY);
RUN_PRODUCT(REPORTS,'F:\IMS\REPORTS\STOCK_IN_BARCODE.rep',SYNCHRONOUS,RUNTIME,FILESYSTEM,PL_ID);
IF I CHANGE IT TO THE FOLLOWING FOR DIRECT PRINTING IT IS NOT WORKING
ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'PRINTER');
ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, 'SOLABEL');
I appreciate any efforts to resolve this issue.
Thanks
Ahon
Edited by: [email protected] on Oct 4, 2009 11:20 PMGuide to Implement local printing on client in 10gas/9ias
To archive this goal we have used orarrp(Oracle Reports Remote Printing Utility), which can be downloaded from the OTN website http://otn.oracle.com/sample/products/reports/index.html.
Steps:
1.Add the required ORARRP mime types to the Oracle HTTP Server configuration.
(Note: This will be the Oracle HTTP Server belonging to the Oracle Application Server 10g/9ias middle (BI & Forms) tier)
Do this manually by editing the httpd.conf
or
via the Oracle Application Server 10g AS Console e.g.
Navigate to the Middle Tier Components Page
Click on HTTP_Server -> Administration -> MIME Types
NOTE: MIME types added in httpd.conf are as per requirement mode in which report has to be run e.g. pdf, rt(rtf) and html etc. syntax for manual entry in httpd.conf is given below.
AddType application/x-orarrp-text rrpt
AddType application/x-orarrp-ps rrpp
AddType application/x-orarrp-pdf rrpa
AddType application/x-orarrp-rt rrpr
AddType application/x-orarrp-ini rrpi
AddType application/x-orarrp-html rrph
2. Create an aliasmatch in forms.conf pointing to a physical directory \tmp- for example, directory will be c:\tmp
Do this by manually editing the forms.conf
or
via the Oracle Application Server 10g AS Console e.g.
Navigate to the Middle Tier Components Page
Click on HTTP_Server -> Administration -> Advanced Server Properties -> forms.conf
Add a line like :
# Virtual path for physical directory of temp
AliasMatch ^/tmp/(..*) "C:\tmp/$1"
** IMPORTANT NOTE **
The advantages of making the changes via EM / AS console, rather than editing the files manually, are:
- the EM / AS console will put the mime type entries in the correct place
- the EM / AS console automatically issues a 'dcmctl updateconfig' which synchronizes the file changes with the Infrastructure Metadata Repository
- the EM / AS console will do the required restart of the HTTP Server component
(Only the HTTP Server needs to be stopped and restarted – Oracle AS 10g components can remain up and running)
If the changes are made manually then the following commands must be issued after the changes to httpd.conf and forms.conf have been made.
Run these command at run prompt
DRIVE:\oracle\FRHome_1\dcm\bin\dcmctl.bat updateconfig -ct ohs -v -d
(to synchronize the changes with the Metadata Repository)
DRIVE:\oracle\FRHome_1\dcm\bin\dcmctl.bat stop -ct ohs -v -d
DRIVE:\oracle\FRHome_1\dcm\bin\dcmctl.bat start -ct ohs -v -d
where DRIVE: is the drive where \oracle\frhome_1\ is installed.
3. Copy and run orarrp.exe on client machine in program files\orarrp\ folder.
4. Set value of options '”choose_printer=no” in orarrp.ini created at above folder.
5. Add following lines in your code of run_report procedure.
In declare section
vc_file varchar2(225);
In begin block add
/* Generate a pseudo unique filename */
vcfile:=:global.user_code||to_char(sysdate,'YYYYMMDDHHMISS');
vcfile:=vcfile||'.rrpr';
/* In this example - output will be rtf so adding .rrpr extension */
set_report_object_property(repid, report_filename,store_var);
set_report_object_property(repid, report_server, :global.r_server);
set_report_object_property(repid, report_execution_mode, batch);
set_report_object_property(repid, report_comm_mode, SYNCHRONOUS);
set_report_object_property(repid, report_destype, file);
set_report_object_property(repid, report_desformat,'rtf');
set_report_object_property(repid,REPORT_DESNAME,'C:\tmp\'||vcFile);
---- path can be made dynamic by making a database entry in makess.path_entry for tmp folder and
---using proc_path procedure from path lib.
:GLOBAL.PrintOutPut := vcFile;
In Run report section make following change:
vc_reportserverjob := RUN_REPORT_OBJECT(repid,pi_id);
report_job_id:=substr(vc_reportserverjob,length(:global.r_server+2,length(vc_reportserverjob));
v_rep_status:=report_object_status(vc_reportserverjob);
if v_rep_status='FINISHED' then
web.show_document('/tmp/'||:global.printoutput,'_blank');
else
message ('error when running report'||v_rep_status);
end if;
Edited by: amitphynyl on Oct 5, 2009 1:36 AM -
Error - Printing a report directly to printer
Hi,
i'm using oracle forms 9i and i'm trying to print a report directly to printer. I using the code above:
SET_REPORT_OBJECT_PROPERTY(ReportId,REPORT_DESFORMAT,'PDF');
SET_REPORT_OBJECT_PROPERTY(ReportId,REPORT_SERVER,GetReportTnsName);
IF ReportDesType = 'CACHE' THEN
SET_REPORT_OBJECT_PROPERTY(ReportId,REPORT_DESTYPE,CACHE);
ReportServerJob:=RUN_REPORT_OBJECT(ReportId, PList);
rep_status := report_object_status(ReportServerJob);
IF rep_status=âFINISHEDâ THEN
JobId := substr(ReportServerJob,length(GetReportTnsName)+2,length(ReportServerJob));
WEB.SHOW_DOCUMENT ('/reports/rwservlet/getjobid'||JobId||'?server='||GetReportTnsName,'_blank');
ELSE
message ('Errorâ);
END IF;
-- logic for sending report directly to printer
ELSIF ReportDesType = 'PRINTER' then
SET_REPORT_OBJECT_PROPERTY(ReportId,REPORT_DESTYPE,PRINTER);
SET_REPORT_OBJECT_PROPERTY(ReportId,REPORT_DESNAME,:parameter.p_print);
ReportServerJob:=RUN_REPORT_OBJECT(ReportId, PList);
rep_status := report_object_status(ReportServerJob);
IF rep_status=âFINISHEDâ THEN
message ('Report sent to printer successfully');
ELSE
--handle errors
message ('Errorâ);
END IF;
end if ;
i get this error :
REP-50157: Erro no envio do ficheiro para a impressora lp65. Sair com o código de erro 64
NEED HELP !!
Regards,The printer has to be known on the server where the Reports service runs.
Also, the user who runs the Reports service has to have access to that printer. If you are running on Windows, Reports Service runs as Local system by default. Change that to a real (domain) user, who has access to the printer. -
Can not print report directly to printer.
Hi,
We are using Crystal Report Server for reporting in our project.
The version we are using is Crystal Report Server XI R2 and Crystal Report Server XI R2 SP 2.
Please kindly advice us on the following issues we faced:
- Can not print report directly to printer.
The print button on the Crystal Report Viewer prints the report to pdf and user have to click "Print" again in the pdf file. This is unusual and not convenient. As we have hundreds of reports to print, is there a way we can print the reporrt directly to printer?
- "Set to Null"
In the default interface of the Crystal Report View, there's is this "set to null" check box that we can not remove. Is there a way to do without it?
Thank you,
Kenny TewMorning Kenny,
The printer settings are in server management console. Additionally see what settings you have setup for the printer for the report in the server. If it is setup to use End User printer then check your End user machine settings and make sure the printer is setup as a default printer on his/her machine.
Please let us know how you get along with the issue.
As far as "Set to Null" I am not sure where it is set up. A screenshot of it might help understanding it better?
Many thanks
Regards
Jehanzeb
Edited by: Jehanzeb Navid on Oct 6, 2008 11:07 AM
Is this issue on all computers or only one computer?
I have just tested this on my colleague machine and it asks for default printer and not pdf however on mine I setup for pdf. -
Print report directly to printer
I am using Crystal Reports XI R2 to generate reports in Powerbuilder. I want to know whether it is possible to print the report directly to a printer without displaying it in the Crystal Report viewer?
Thanks,
AmolI have a very similar problem, not being able to print a report directly to the printer.
But I am calling Crystal Reports v8.5 from VB6. I have tried the suggested code:
report.PrintOut(prompt user, numberofCopy, collated, startpage, endpage)
but get a "type mismatch" compiler error with "PrintOut" highlighted when compiling, eventhough the inline help shows this method and matching arguments.
I wonder if I have the correct DLL referenced.
This report runs fine thru the preview window, but since this is a series of reports about 100 pages, don't really want the user to have to specify print dozens of times.
Thanks,
Gene -
Print report directly to printer without acknowledgement
I'm running reports 9i.
I can successfully print a report directly to a printer but how do I stop a window poping up displaying the "Oracle Reports Job Status"
ThanksI have a very similar problem, not being able to print a report directly to the printer.
But I am calling Crystal Reports v8.5 from VB6. I have tried the suggested code:
report.PrintOut(prompt user, numberofCopy, collated, startpage, endpage)
but get a "type mismatch" compiler error with "PrintOut" highlighted when compiling, eventhough the inline help shows this method and matching arguments.
I wonder if I have the correct DLL referenced.
This report runs fine thru the preview window, but since this is a series of reports about 100 pages, don't really want the user to have to specify print dozens of times.
Thanks,
Gene -
Print report directly to printer using RUN_PRODUCT in Forms6i
Hi all,
I would like to have information regarding print any .rdf directly to printer from form 6i using RUN_PRODUCT.
I got help from Form Builder Help option and tried following coding in form
DECLARE
PL_ID PARAMLIST;
printername VARCHAR2(50);
BEGIN
PL_ID := GET_PARAMETER_LIST('WEIGHMENT');
IF NOT ID_NULL(PL_ID) THEN
DESTROY_PARAMETER_LIST(PL_ID);
END IF;
PL_ID := CREATE_PARAMETER_LIST('WEIGHMENT');
printername := '"'||'I.T Printer'||'"';
Add_Parameter(pl_id, 'DESTYPE', TEXT_PARAMETER, PRINTER);
Add_Parameter(pl_id, 'DESNAME', TEXT_PARAMETER, printername);
Add_Parameter(pl_id, 'P_EQ_NBR', TEXT_PARAMETER, :weighment.eq_nbr);
Add_Parameter(pl_id, 'P_WT_GKEY', TEXT_PARAMETER, :weighment.gkey);
Run_Product(REPORTS, 'c:\wegt001r', ASYNCHRONOUS, RUNTIME, FILESYSTEM, PL_ID, NULL);
EXCEPTION
WHEN OTHERS THEN
MESSAGE(SQLERRM);
END;
END IF;
But report did not printed and following message received in Reports Background Engine
Error submitting report [Thu May 07 18:49:23 2009] ...
REP-0159: Syntax error on command line.
Pls help.
Thanks,
HassanHi Heidi
I have already tried printername := 'I.T Printer'; but result is same.
This is also my default printer and I tried to add / remove the following coding
Add_Parameter(pl_id, 'DESNAME', TEXT_PARAMETER, PRINTER);
but in both cased I received the same error.
I also tried to print thru HOST command as follows
the_username := Get_Application_Property(USERNAME);
the_password := Get_Application_Property(PASSWORD);
the_connect := Get_Application_Property(CONNECT_STRING);
the_command := 'rwrun60 report=c:\wegt001r.rdf userid= '||the_username||'/'||the_password||'@'||the_connect||' DESTYPE=Printer BACKGROUND=NO BATCH=YES ERRFILE=c:\reports\error.log LOGFILE=c:\reports\joblog.log p_eq_nbr='''||'TESTMKI'''||' p_wt_gkey=118306';
Host( the_command );
Host command displays correctly but no printing.
I then change my command as follows
the_command := 'rwrun60 report=c:\wegt001r.rdf userid=test/test@test DESTYPE=Printer BACKGROUND=NO BATCH=YES ERRFILE=c:\reports\error.log LOGFILE=c:\reports\joblog.log p_eq_nbr='''||'TESTMKI'''||' p_wt_gkey=118306'; and now report prints on printer.
But I cannot hard coded the username, password and connect.
Thanks,
Hassan
Edited by: Hassan Raza Khan Lodhi on May 7, 2009 6:55 PM -
Print RDLC Report Directly to Printer with SubReports!
I am currently printing a report directly to the default printer using the code from this link.
http://msdn.AddHandler
ReportViewer1.LocalReport.SubreportProcessing, AddressOf SubreportProcessingEventHandler
and this code:
Public Sub SubreportProcessingEventHandler(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
Dim zrpt = e.ReportPath
Select Case zrpt
Case "WOPartsSubReport"
Dim ds1 As New WOPartsSubReportDataSet
Dim da1 As New WOPartsSubReportDataSetTableAdapters.wopartsTableAdapter
da1.Fill(ds1.woparts)
e.DataSources.Add(New ReportDataSource("DataSet1", ds1.Tables("woparts")))
Case "WOLaborSubReport"
Dim ds2 As New WOLaborSubReportDataSet
Dim da2 As New WOLaborSubReportDataSetTableAdapters.wolaborTableAdapter
da2.Fill(ds2.wolabor)
e.DataSources.Add(New ReportDataSource("DataSet1", ds2.Tables("wolabor")))
Case "WOLockoutSubReport"
Dim ds As New WOLockOutSubReportDataSet
Dim da As New WOLockOutSubReportDataSetTableAdapters.wolockTableAdapter
da.Fill(ds.wolock)
e.DataSources.Add(New ReportDataSource("DataSet1", ds.Tables("wolock")))
End Select
End Sub
But now that I am NOT using a reportviewer how can I still get the subreports to work and still print directly to the printer? Where would I put the code to do that?
Thanks,
StacyHi Stacy,
Sorry for the delay.
It’s Christian that I have involved to help on this issue. Maybe the issue requires a more in-depth level of support. Alternatively, you could contact Microsoft Customer Support Services (CSS) via telephone so that a dedicated Support Professional can assist
you in a more efficient manner. Please understand that contacting phone support will be a charged call, but it will be free if this is a product issue. To obtain the phone numbers for specific technology request please take a look at the web site listed below:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;PHONENUMBERS
Another option would be creating a thread on our Connect site:
http://connect.microsoft.com/sql.
Regards,
Mike Yin
If you have any feedback on our support, please click
here
Mike Yin
TechNet Community Support -
How to print a report directly on printer
Hi,
anyone, plz help me in finding out, why my report i.e. i m sending directly to printer is getting printed like html codes?
Plz help asap.
Br,
Divya Alokplease check out the following link.
Print report directly
just mention the printer name i hope it helps u.
sarah
Edited by: QGIRCO on Apr 1, 2010 3:01 AM -
Sample for printing report directly to printer
Hi Guys
Does anyone have a report which can print directly to the printer when the radio button option is selected .
I want to print the ALV in excel format.
Printer >>>>.
Screeb >>>>>
Regards
P.EslamHi
I tried with this FM but giving short dump error can anyone explain why pls see the below program for testing.
REPORT Z_ESLP_ZTCODE .
"LINE-SIZE 600 .
TABLES : AGR_TCODES,
AGR_USERS,
TSTCT.
type-pools: slis. "ALV Declarations
CONSTANTS MARK VALUE 'X'.
*Data Declaration
LIFNR, NAME1, STRAS, ORT01, REGIO, PSTLZ, PFACH, LAND1
TYPES: BEGIN OF T_DISP,
AGR_TCODES TYPE AGR_TCODES-TCODE , " Transaction code A
AGR_NAME TYPE AGR_TCODES-AGR_NAME, " Role Name B
AGR_UNAME TYPE AGR_USERS-UNAME, " Short User Name B
TTEXT TYPE TSTCT-TTEXT, " Description Name C
TEXTC TYPE USER_ADDR-NAME_TEXTC, " Long User Name
SPRSL TYPE TSTCT-SPRSL , " Language c
END OF t_disp.
DATA: it_disp TYPE STANDARD TABLE OF t_disp INITIAL SIZE 0,
wa_disp TYPE t_disp.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
DATA:L_PARAMS TYPE PRI_PARAMS,
L_VALID TYPE C.
DATA: w_file TYPE rlgrap-filename VALUE 'it_value'.
SELECTION PARAMETER CRITERIA
SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME.
SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: P_TCODE FOR AGR_TCODES-TCODE , "OBLIGATORY, "no-extension no intervals,
U_NAME FOR AGR_USERS-UNAME,
R_NAME FOR AGR_USERS-AGR_NAME .
SELECTION-SCREEN END OF BLOCK BLK1.
SELECTION-SCREEN BEGIN OF BLOCK BLK2 WITH FRAME TITLE TEXT-002.
SELECTION-SCREEN END OF BLOCK BLK2.
SELECTION-SCREEN END OF BLOCK BLK.
SELECTION-SCREEN BEGIN OF BLOCK radio WITH FRAME.
PARAMETERS :scr RADIOBUTTON GROUP rbg1 ,
pr RADIOBUTTON GROUP rbg1 .
SELECTION-SCREEN END OF BLOCK radio.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
fieldcatalog-fieldname = 'AGR_UNAME'.
fieldcatalog-seltext_m = 'User'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'TEXTC'.
fieldcatalog-seltext_m = 'Name'.
fieldcatalog-outputlen = 50.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AGR_NAME'.
fieldcatalog-seltext_m = 'Role Name'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AGR_TCODES'.
fieldcatalog-seltext_m = 'Trans Code'.
fieldcatalog-col_pos = 3.
fieldcatalog-outputlen = 15.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'TTEXT'.
fieldcatalog-seltext_m = 'DESCRIPTION'.
fieldcatalog-outputlen = 40.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
endform. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
is_variant = z_template
tables
t_outtab = it_disp
exceptions
program_error = 1
others = 2.
if sy-subrc EQ 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form lfa1 table and populate itab it_lfa1
form data_retrieval.
CASE MARK.
WHEN scr.
SELECT AGR_TCODESTCODE AGR_TCODESAGR_NAME AGR_USERSUNAME TSTCTTTEXT USER_ADDR~NAME_TEXTC
INTO TABLE IT_DISP
FROM AGR_TCODES
INNER JOIN AGR_USERS
ON AGR_TCODESAGR_NAME = AGR_USERSAGR_NAME
INNER JOIN USER_ADDR
ON AGR_USERSUNAME = USER_ADDRBNAME
INNER JOIN TSTCT
ON AGR_TCODESTCODE = TSTCTTCODE
where
agr_tcodes~tcode in p_tcode
and
agr_users~uname in u_name
and
agr_tcodes~agr_name in r_name
and
TSTCT~SPRSL EQ 'E'.
WHEN pr.
CALL FUNCTION 'FTBU_START_EXCEL'
EXPORTING
data_name = w_file
data_path_flag = 'T'
*---Start Excel and not Wait
wait = ' '
TABLES
data_tab = it_disp
EXCEPTIONS
no_batch = 1
excel_not_installed = 2
wrong_version = 3
internal_error = 4
invalid_type = 5
cancelled = 6
download_error = 7
OTHERS = 8.
NEW-PAGE PRINT ON PARAMETERS L_PARAMS NO DIALOG.
write : 'print'.
NEW-PAGE PRINT ON.
ENDCASE.
endform. " DATA_RETRIEVAL
Form TOP-OF-PAGE *
ALV Report Header *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = 'Transaction codes by User and Role Name ' .
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_disp lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Transaction Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform.
*& Form BUILD_EVENTS
Build events table
form build_events.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_events[].
read table gt_events with key name = slis_ev_end_of_page
into ls_event.
if sy-subrc = 0.
move 'END_OF_PAGE' to ls_event-form.
append ls_event to gt_events.
endif.
read table gt_events with key name = slis_ev_end_of_list
into ls_event.
if sy-subrc = 0.
move 'END_OF_LIST' to ls_event-form.
append ls_event to gt_events.
endif.
endform. " BUILD_EVENTS
*& Form BUILD_PRINT_PARAMS
Setup print parameters
form build_print_params.
gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
gd_prntparams-no_coverpage = 'X'.
endform. " BUILD_PRINT_PARAMS
*& Form END_OF_PAGE
form END_OF_PAGE.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
write: sy-uline(50).
skip.
write:/40 'Page:', sy-pagno .
endform.
*& Form END_OF_LIST
form END_OF_LIST.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
skip.
write:/40 'Page:', sy-pagno .
endform. -
Cannot send report directly to printer
Hi,
we are installing new canon printers (irc2380's) and we are having difficulty getting the reports to the printer.
If i send the output of the report as a file to the application server(solaris) and then print using an lp command then the report prints fine, however if we try to send the output directly to the printer, the report server thinks it has been successfull but nothing appears on the printer.
We are using run_report_object, have tried looking at the ppd files but cannot get any to work, canon do not seem to have any specific for unix.
Any help would be appreciated.
ThanksHello,
If the Reports Version is >= 9.0.2 , an output file has been generated in the Reports Server cache ($ORACLE_HOME/reports/cache by default)
and this file is sent to the printer with the script rwlpr.sh (in $ORACLE_HOME/bin)
Check the content of the file generated in the Reports cache, test to send it "manually' to the printer
Regards -
How to run reports directly from R/3 tables
We are about to implement BW but the client wants to run temporary reports directly off R/3 tables. How can this be accomplished? Do we just use business content or r there other ways?
ThanksI created a join of 3 tables using SQVI in BI 7.0. Nobody else but me can see this query join. Is there a way to save this to somwhere public, so others can access this view? Maybe "Save As"??
If possible, please provide steps to do this.
Thank in advance! -
Error in Printing Crystal Report Directly to Printer using SDK Code
Hello ,
I am trying to print a crystal report created in SAP Crystal Reports 2008 through SDk Code using one parameter
as (Document Number).But While running the Code the Report is not getting printed and also the system is
not able to fetch the correct data in the report using the supplied parameter .
I am using Visual Studio 2005 Crystal Report dll s in my code :-
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports
Imports System
Imports System.Data.SqlClient
Imports System.IO
For Clarification i am pasting my code below :-
Dim oRpt As ReportDocument
oRpt = New ReportDocument
oRpt.Load(Path)
With crConnectionInfo
.ServerName = Server
.DatabaseName = Database
.UserID = User
.Password = Password
End With
CrTables = oRpt.Database.Tables
For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next
oRpt.ParameterFields("Document Number").CurrentValues.AddValue(Parameter)
If Printer <> "" Then
oRpt.PrintOptions.PrinterName = Printer
End If
oRpt.PrintToPrinter(Copies, False, 0, 1)
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
Please suggest me what i have to do in my code to print the report with correct data in report.
Thanks & Regards,
Amitk
-
Printing report directly on printer or pnly displaying based on a parameter
Hi All,
I am running a report from Form Builder - 10g and intend to either preview a report or print it based on a parameter.
Have searched through this forum and got to use - CLIENT_WIN_API_ENVIRONMENT.Read_Registry in order to find the default printer at the client side.
This is my code -
PROCEDURE RUN_REPORT_DN (cID_PRINT_TYPE NATURAL,cListName varchar2)
IS
pl_id paramlist;
v_rep_id report_object;
v_rep_job_id varchar2(100);
v_rep_status varchar2(100);
v_server varchar2(100) := hpm_admin.getcontrolvalue('REPORT_SERVER');
vjob_id VARCHAR2(100);
V_PRINTER varchar2(100);
p_printer_name varchar2(100);
BEGIN
-- check whether the paralist name is ok, if not set it right ...
pl_id := get_parameter_list(cListName);
-- pl_id := GET_REPORT_RUNMODE( cID_PRINT_TYPE,cListName );
V_PRINTER := CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY('HKEY_CURRENT_USER\software\Microsoft\Windows NT\CurrentVersion\Windows','Device',TRUE);
p_printer_name := (substr(V_PRINTER, 1, instr(V_PRINTER, ',' , 1)-1 ));
-- run the report ...
if not id_null(pl_id) then
v_rep_id := find_report_object('REPORT126');
if cID_PRINT_TYPE = 0 then ---- parameter to decide preview or print
set_report_object_property(v_rep_id,REPORT_DESTYPE,cache);
set_report_object_property(v_rep_id,REPORT_COMM_MODE,ASYNCHRONOUS);
Else
set_report_object_property(v_rep_id,REPORT_DESTYPE,PRINTER);
set_report_object_property(v_rep_id,REPORT_DESNAME,p_printer_name); set_report_object_property(v_rep_id,REPORT_COMM_MODE,SYNCHRONOUS);
end if;
set_report_object_property(v_rep_id,REPORT_DESFORMAT,'PDF');
set_report_object_property(v_rep_id,REPORT_SERVER,v_server);
v_rep_job_id := RUN_REPORT_OBJECT(v_rep_id,pl_id);
message('v_rep_job_id - '||v_rep_job_id);pause;
vjob_id := substr(v_rep_job_id, length(v_server)+2 , length(v_rep_job_id));
message('vjob_id - '||vjob_id);pause;
v_rep_status := REPORT_OBJECT_STATUS(v_rep_job_id);
if v_rep_status in ('FINISHED', 'RUNNING','OPENING_REPORT','ENQUEUED') then
web.show_document ('/reports/rwservlet/getjobid'||vjob_id ||'?server='|| v_server,'_blank');
else
message ('Report failed with error message '||v_rep_status,acknowledge);
end if;
end if;
END;
But I am getting the error - CLIENT_WIN_API_ENVIRONMENT.Read_Registry must be declared.
Wat setup/syntax is missing.
Can someone advise plz...Welcome to Oracle Forums!
Please acquaint yourself with the forum FAQ and etiquette if you have not already done so.
The use of CLIENT_XYZ API requires WEBUTIL to be configured. Have you done that?
Cheers. -
Printing PDF report directly to printer, not using orarrp utility
The orarrp utility works only with Windows machines and it
requires installation on both the client machines and servers to
support. We need a more general solution.
Adobe has a java application/applet/javabean (and support
classes) to view PDF, and it is easy to write a java driver
which can be used in place of the orarrp utility. However,
Adobe's Java Viewer is extremely slow, does not produce quality
output, and is explicitly not supported by Adobe.
My question then relates to Reports. When the Report server
returns a PDF in the Previewer, I'm expecting the JINITIATOR,
used by Forms, is also used to support the Report frame and
functionality, including eventual printing. If this is the case,
is there not a set of classes, downloaded with Jinitiator, which
support the fonts, and printing of PDF to locally attached
printers?
And if so, shouldn't we, in Java, be able to make use of these
classes and their APIs to print PDF files directly to locally
attached printers without the need for Previewing first?within a forms trigger:
1. generate the report
2. copy from iAS to local
like: webutil_file_transfer.url_to_client()
3. print.exe /d:printer filename (for windows OS)
Maybe you are looking for
-
Web pages are not being saved to Reader for offline access
When I find a web page that I wish to keep for offline access I have tapped the Share button and then Save to reader. I have carried this out for approx a dozen pages and when I access the Reader (specs graphic) none of the pages are listed. Is there
-
Upgrade from InDesign CS to CS3
Hi, I have InDesign CS in my Mac mini and just ordered the upgrade to CS3. I talked to the guy and he said the upgrade would work with the CS I already have. When the installation is complete it says that the serial number I've entered is for an upgr
-
Unable to generate jra recorder file from java command line.
Following the instructions at http://e-docs.bea.com/wljrockit/docs142/userguide/jra.html#1056021 I'm using the following command line to launch my application: java -cp bin -Xnoclassgc -Djrockit.lockprofiling -XXjra MyClass I'm getting a file lprofil
-
hi im having a bit of trouble stopping a loop captor.loopPacket(10, new PacketPrinter());i have no idea how to stop this kinda loop
-
Trying to install 11G on Ubuntu AMD64. All goes well except a single linker error of target all_no_orcl of makefile ../rdbms/lib/ins_rdbms.mk gcc -m32 -o /db/orcl11/db/rdbms/lib/extproc32 -L/db/orcl11/db/rdbms/lib32/ -L/db/orcl11/db/lib32/ -L/db/orcl