HOW TO PRINT THE SCRIPT DIRECTLY
hi ,
i want to print the script directly by skiping the prini preview screen can any one help me..
regards,
siva
Hi Siva,
In the function module "<b>OPEN_FORM</b>" pass "<b>SPACE</b>" to the parameter <b>DIALOG</b>.
This would allow you to SKIP the print preview screen.
<b>Reward points for helpful answers.</b>
Best Regards,
Ram.
Similar Messages
-
How to print the script in condensed mode
Hi to all,
Pls help me.
How to print the script in condensed mode and particular window only print in the condensed mode.Hi,
Hi
It will remove the blank spaces in front of the variable
and if you use the extension NO-GAPS
It will remove all the blank spaces in the variable field.
DATA: ws_val1 type char12.
ws_val1 = ' 100 123'.
Condense ws_val1.
Write / ws_val1.
Condense ws_val1 no-gaps.
write / ws_val1.
It will give output as
100 123
100123
The CONDENSE statement deletes redundant spaces from a string:
CONDENSE c NO-GAPS.
This statement removes any leading blanks in the field c and replaces other sequences of blanks by exactly one blank. The result is a left-justified sequence of words, each separated by one blank. If the addition NO-GAPS is specified, all blanks are removed.
Please check this link for sample code.
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb33e6358411d1829f0000e829fbfe/content.htm
Regards,
Raj. -
How to print the script before realasing?
how to print the script before realasing?
Do you want to see the output of your SAPscript??and print it?? before you release.
Then goto NACE tcode and configure your script.
Example :
Goto Transaction NACE --> Select Application V1(Sales) --> Click on Output Types --> Select the output type as BA00 (as generally BA00 is the output type associated with Sales Order ) --> Double click on the Processing Routines folder on the left and it will display the Form name and the corresponding driver programs name.
Goto tcode VA03, and display the output from menu and do your printing.
Close the thread once your question is answered.
Regards,
SaiRam -
Hi,
Currently, we are using crystal report to all of our reporting applications, but since I/users have encountered some issues about CR's speed to load only a simple report, maybe it is now time for us to adopt a new reporting environment in which I think SSRS
can fill this problem.
To start with, I have here a sample code, that uses the crystal report to print the report directly without previewing:
csCashInvoiceCal csCashCal; --Crystal report name .rpt
dsCsReceipt dsCs; --created dataset
DataTable u;
DataRow s;
private System.Drawing.Printing.PrintDocument printDocument1;
private System.Windows.Forms.PrintDialog printDialog1;
ParameterValues paramValue;
ParameterDiscreteValue discreteValue;
ParameterFieldDefinition fieldDefinition;
private void btnPrint_Click(object sender, EventArgs e)
this.Cursor = Cursors.WaitCursor;
loadReceipt2();
print2();
csCashCal.Close();
this.Cursor = Cursors.Default;
private void loadReceipt2()
dsCs = new dsCsReceipt(); --created dataset
u = dsCs.Tables.Add("DtCsReceipt");
u.Columns.Add("Qty", Type.GetType("System.String"));
u.Columns.Add("UOM", Type.GetType("System.String"));
u.Columns.Add("Description", Type.GetType("System.String"));
u.Columns.Add("UnitPrice", Type.GetType("System.String"));
u.Columns.Add("Discount", Type.GetType("System.String"));
u.Columns.Add("Amount", Type.GetType("System.String"));
try
for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
s = u.NewRow(); double.TryParse(dgvDesc.Rows[i].Cells[Discount2.Name].Value.ToString(), out discount);
s["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
s["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
s["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
s["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
if (discount != 0)
s["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
else
s["Discount"] = "";
s["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
u.Rows.Add(s);
catch (Exception) { }
csCashCal = new csCashInvoiceCal();
csCashCal.SetDataSource(dsCs.Tables[1]);
//csCashCal.Refresh();
loadParameter2();
private void loadParameter2()
ParameterFieldDefinitions paramFieldDefinitions;
paramValue = new ParameterValues();
discreteValue = new ParameterDiscreteValue();
paramFieldDefinitions = csCashCal.DataDefinition.ParameterFields;
discreteValue.Value = date;
fieldDefinition = paramFieldDefinitions["Date"];
commonParam();
discreteValue.Value = txtcsno.Text;
fieldDefinition = paramFieldDefinitions["InvoiceNo"];
commonParam();
discreteValue.Value = txtNameTo.Text;
fieldDefinition = paramFieldDefinitions["CustomerName"];
commonParam();
discreteValue.Value = txtAdd.Text;
fieldDefinition = paramFieldDefinitions["CustomerAddress"];
commonParam();
------other parameters----
private void commonParam()
paramValue.Clear();
paramValue.Add(discreteValue);
fieldDefinition.ApplyCurrentValues(paramValue);
private void print2()
using (printDocument1 = new System.Drawing.Printing.PrintDocument())
using (this.printDialog1 = new PrintDialog())
//this.printDialog1.UseEXDialog = true;
this.printDialog1.Document = this.printDocument1;
DialogResult dr = this.printDialog1.ShowDialog();
if (dr == DialogResult.OK)
int nCopy = this.printDocument1.PrinterSettings.Copies;
int sPage = this.printDocument1.PrinterSettings.FromPage;
int ePage = this.printDocument1.PrinterSettings.ToPage;
string PrinterName = this.printDocument1.PrinterSettings.PrinterName;
try
csCashCal.PrintOptions.PrinterName = PrinterName;
csCashCal.PrintToPrinter(nCopy, false, sPage, ePage);
printcount++;
//saveCountPrint();
catch (Exception err)
MessageBox.Show(err.ToString());
This is only a simple sales receipt application that uses dgv and textboxes to push its data to dataset to the crystal report, a simple one but there are instances that it is very slow.
But I'm having trouble implementing this using SSRS, since I'm only new to this one, wherein I created the report using report wizard, with two button options inside the form for print preview or direct print selection. Actually, it is very easy to implement
with print preview because it uses reportviewer. My problem is that how can I print the report directly without using a reportviewer?
So here is my code so far which I don't know what's next:
private void button2_Click(object sender, EventArgs e)
this.Cursor = Cursors.WaitCursor;
loadReceipt3();
//print3();
this.Cursor = Cursors.Default;
ReportParameter[] parameter = new ReportParameter[11];
private void loadParameter3()
parameter[0] = new ReportParameter("InvoiceNo", txtcsno.Text);
parameter[1] = new ReportParameter("Date", date);
parameter[2] = new ReportParameter("CustomerTin", txtTin.Text);
parameter[3] = new ReportParameter("CustomerName", txtNameTo.Text);
parameter[4] = new ReportParameter("CustomerAddress", txtAdd.Text);
parameter[5] = new ReportParameter("Agent", agent);
parameter[6] = new ReportParameter("Discount", "Discount: ");
parameter[7] = new ReportParameter("TotalDiscount", lblDiscount.Text + "%");
parameter[8] = new ReportParameter("TotalSales", rdtotal);
parameter[9] = new ReportParameter("Tax", rdtax);
parameter[10] = new ReportParameter("TotalAmount", rdnet);
private void loadReceipt3()
DataSet dsrs = new DataSet();
DataTable dtrs = new DataTable();
DataRow drs;
dtrs.Columns.Add("Qty", Type.GetType("System.String"));
dtrs.Columns.Add("UOM", Type.GetType("System.String"));
dtrs.Columns.Add("Description", Type.GetType("System.String"));
dtrs.Columns.Add("UnitPrice", Type.GetType("System.String"));
dtrs.Columns.Add("Discount", Type.GetType("System.String"));
dtrs.Columns.Add("Amount", Type.GetType("System.String"));
try
for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
drs = dtrs.NewRow();
drs["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
drs["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
drs["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
drs["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
if (discount != 0)
drs["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
else
drs["Discount"] = "";
drs["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
dtrs.Rows.Add(s);
catch (Exception) { }
int addtlRow = 7;
if (addtlRow > (count - 1))
addtlRow = addtlRow - (count - 1);
for (int i = 0; i < addtlRow; i++)
dtrs.Rows.Add();
loadParameter3();
LocalReport localreport = new LocalReport();
localreport.SetParameters(parameter);
localreport.DataSources.Clear();
localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
localreport.Refresh();
//what's next....
So what's next after local..refresh()? Actually, I have googled a lot but I didn't found the exact solution that I'm looking for which confuses me a lot.
Anyway I'm using VS 2010 with sql server 2012 express.
You're help will be greatly appreciated.
Thank you,
HardzAfter some further studies with ReportViewer controls and with the use of this tutorial @ : http://msdn.microsoft.com/en-us/library/ms252091.aspx, which helps me a lot on how to print a report without using a report viewer, I found out what is missing
with my code above and helps solve my question.
Here's the continuation of the code above:
private void loadReceipt3()
loadParameter3();
LocalReport localreport = new LocalReport();
localreport.ReportPath = @"..\..\SsrsCashReceipt.rdlc";
localreport.SetParameters(parameter);
localreport.DataSources.Clear();
localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
Export(localreport);
print4();
private IList<Stream> m_streams;
private int m_currentPageIndex;
private void Export(LocalReport report)
string deviceInfo =
@"<DeviceInfo>
<OutputFormat>EMF</OutputFormat>
<PageWidth>8.5in</PageWidth>
<PageHeight>11in</PageHeight>
<MarginTop>0.25in</MarginTop>
<MarginLeft>0.25in</MarginLeft>
<MarginRight>0.25in</MarginRight>
<MarginBottom>0.25in</MarginBottom>
</DeviceInfo>";
Warning[] warnings;
m_streams = new List<Stream>();
report.Render("Image", deviceInfo, CreateStream,
out warnings);
foreach (Stream stream in m_streams)
stream.Position = 0;
private void print4()
if (m_streams == null || m_streams.Count == 0)
throw new Exception("Error: no stream to print.");
PrintDocument printDoc = new PrintDocument();
PrintDialog printDlg = new PrintDialog();
printDlg.Document = printDoc;
DialogResult dr = printDlg.ShowDialog();
if (dr == DialogResult.OK)
if (!printDoc.PrinterSettings.IsValid)
throw new Exception("Error: cannot find the default printer.");
else
printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
m_currentPageIndex = 0;
printDoc.Print();
Dispose();
public void Dispose()
if (m_streams != null)
foreach (Stream stream in m_streams)
stream.Close();
m_streams = null;
private Stream CreateStream(string name, string fileNameExtension, Encoding encoding, string mimeType, bool willSeek)
Stream stream = new FileStream(name + "." + fileNameExtension,
FileMode.Create);
m_streams.Add(stream);
return stream;
private void PrintPage(object sender, PrintPageEventArgs ev)
Metafile pageImage = new
Metafile(m_streams[m_currentPageIndex]);
// Adjust rectangular area with printer margins.
Rectangle adjustedRect = new Rectangle(
ev.PageBounds.Left - (int)ev.PageSettings.HardMarginX,
ev.PageBounds.Top - (int)ev.PageSettings.HardMarginY,
ev.PageBounds.Width,
ev.PageBounds.Height);
// Draw a white background for the report
ev.Graphics.FillRectangle(Brushes.White, adjustedRect);
// Draw the report content
ev.Graphics.DrawImage(pageImage, adjustedRect);
// Prepare for the next page. Make sure we haven't hit the end.
m_currentPageIndex++;
ev.HasMorePages = (m_currentPageIndex < m_streams.Count);
Thank you very much for this wonderful tutorial. :) -
pls let me know .........
Hi,
Please go through this link , hope you will get useful stuff from this.
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450
*& Form f9100_save_to_pdf
text
-->P_WS_FORMNAME text
FORM f9100_save_to_pdf using value(ws_formname).
data: i_lines TYPE tline OCCURS 0 WITH HEADER LINE.
data: ws_bin_size type i,
ws_filename type string.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = ws_bin_size
TABLES
otf = i_otf
lines = i_lines
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
IF sy-subrc <> 0.
flg_exit = 'X'.
MESSAGE i050 WITH 'Error converting to PDF format'.
EXIT.
ENDIF.
Get the download path
PERFORM get_download_path CHANGING ws_filename.
if flg_exit = 'X'.
EXIT.
endif.
Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = ws_bin_size
filename = ws_filename
filetype = 'BIN'
TABLES
data_tab = i_lines
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE i050 WITH 'Error while File download'.
flg_exit = 'X'.
EXIT.
ELSE.
MESSAGE i050 WITH 'File downloaded successfully '.
flg_exit = 'X'.
EXIT.
ENDIF.
regards,
Omkar. -
How to print the text in points wise in sap script
hi friends,
how to print the text in points wise in sap script.
ex: if suppose paragraph consists of 15 lines. then according to one sentence or one fullstop (.) it should give point 1. like that...
1. hai how ru.
2. what r u doing.
3.where r u.
like this i want numbering.. waiting for ur replys.
thanks,
kirandeclare a counter
data : cnt type char 4.
print :
cnt = cnt + 1.
&cnt& &text&
cnt = cnt + 1. and so on.
or.
if the data is in an internal table
loop at internal_table.
cnt = cnt + 1.
write form.
in script -&cnt& &text&
endloop.
Edited by: NIKHILKUMAR POOJARI on Nov 17, 2008 11:18 AM -
How to print a report directly on to a printer on the client machine
Hi,
Could anyone let me know how to print a report directly on to the clients default printer in oracle forms 10g with OAS?.
Regards,
Prasad.Hello,
<p>You can use this Java Bean</p>
Francois -
How to print the Terms and Condition page ine the sap-script
Hi experts,
i got the requirement that how to print the Terms and condition page in the script,i have the three pages, having the same main window, in the last of the main window(all three pages) i have called the hard coded text(i.e so10 text), but when i am displaying the output data get printed in the first page but i am getting the second page heading on the top of the terms and condiions page. In all the three pages i have the same main window, if i make change in any window i will affect all the other main windows. so please suggest me how i need to go.HOW TO GET GRID OF THE TEXT ON THE TOP OF THE SECOND PAGE OF THE TERMS AND CONDITONS.
like this i have called in the MAIN WINDOW
/E : LAST ( IN ALL THREE PAGES)
INCLUDE ZSD_INVOICE_TERMS TEXT OBJECT TEXT LANGUAGE EN.
IN THE TCODE SO10
NEW PAGE TERMS.
1) TERM MS AND CONDITONS TEXT.................................................
FIRST->NEXT, NEXT->NEXT,, TERMS--->TERMS.Hi,
1. Create a new page by Name : LAST
2. Identify the text element which will be the last element in the form in the debug mode.
Mostly Ex: SUM, TOTAL, LAST etc.,
3. the page linking should be
First --> Next
Next --> Next
4. In the Text element identified in the step 3.
Write the following code
/: NEW PAGE LAST
/: INCLUDE the standard text created for the terms and conditions in SO10
Check the syntax for the command but the logic will be the same.
It should resolve your problem. -
How i can print the smartform directly
hi,
my requirement is i have to print the smartform directly by skiping the dialog window.
i am using the following code but in that i have press the Print push button again .
DATA: output_options TYPE ssfcompop.
output_options-tdimmed = 'X'.
output_options-tddest = 'LOCL'.Trty something like
* Print parameters
ssfcompop-tddest = tddest.
ssfcompop-tdimmed = 'X'.
ssfcompop-tdnewid = 'X'.
ssfcompop-tddelete = 'X'.
* Control parameters
ssfctrlop-device = 'PRINTER'.
ssfctrlop-no_dialog = 'X'.
* Call driver
CALL FUNCTION fm_name
EXPORTING
control_parameters = ssfctrlop
output_options = ssfcompop
Regards -
How to print the page in custom format
Hi All,
I've a login page like
USER ID : Test box to enter data
PASSWORD: Text Box to enter data
A Button named as Print
When i click on print button i want to print the form in custom format. when i use window.print in java script it is printing text boxes and button . but i dont want to print button and text boxes. i just want to print the user id and password entered by the user with corresponding labels.
Can anyone suggest me how to print the page in the above format with out using the request object. coz i need to implemnt above with plain java script and html.
Tks in AdvanceUse CSS. Check out the 'media' attribute. http://www.w3.org/TR/REC-CSS2/media.html
-
How to print the Actual Check on 1st Page if line items are more for F110_p
Hi,
How to print the Actual Check on 1st page if the line items are more in F110_PRENUM_CHCK script. The standard script is printing at the last page of line items.
I tried using
IF &PAGE& EQ '1 '
/E 545 --> text element
ENDIF
but it is of no use.
Please let me know if anyone knows. Thanks in Advance.Hi Krishna,
I guess, there is no other possible way to acheive this without modifying the standard driver program. Why because? in you driver program you check window will be called only on the last page... but before you change your driver program give a try like shown below....
Not sure, but give a try... In the first page you will be printing some void check try to replace the code inside the text element of void check with original check and make all the check void... note: in this text element, be sure you write two conditions...
IF &PAGE& = 1.
**PRint all check values..
ELSE.
***Print void values
ENDIF.
Close the thread if your question is answered.
Regards,
Sairam -
How to print the MICR symbols in sapscript for Cheque printing
Hello All,
I am working on the cheque printing. I want to display check number with MICR symbols like in the original cheque we have at the footer level the symbols.
How to print the MICR symbols in the SAP Script. Could anybody please help me out in this issue.
ThanksHi,
In This case your Printer should support the E-13B Charecters.
Create a ParaGraph with Font family as MICR_E.
use C for ON-US SYMBOL which is printed at the beginig and end of the Check Number
ie C&CHECK_NUMBER&C
then use A for TRANSIT NUMBER and
Use D for DASH SYMBOL in your check.
then while Printing the check the original check number will be printed .
Note: Your Printer should support the E-13B charecters
Thanks.
UmaS. -
How to print the list shown in the finder
I work as a photographer. For my clients I burn the pictures on DVD / CD.
Some of my clients want a indexprint from the folder on the disk.
How can print the list wich is shown in the finder? A screenshot doesn't work because there are often more items in the folder than the screen shows.
A friend told me this isn't possible in OS X. In OS9 this function was available, but removed in OS X.... ?
Regards
Walter
G5 Dual Mac OS X (10.4.8) also Intel ImacHi Walter,
To make a list, choose all (COMMAND + a) in the window than "copy" and "paste" to TextEdit or MS Word, or directly into email.
Also, If you drag a folder or entire volume onto the Print Setup Utility it will print it's contents.
-mj
[email protected] -
How to print the output of the screen in Dialog Programming
Hi,
Could anybody help how to print the output of a screen in the dialog programming. i can select 'Hard Copy' option in the 'Custumizing of Local Layout' Icon in the standard tool bar. but that prints the whole screen with the toolbar. i want to print only the output which is displayed on the screen. Please help..
Regards,
SwathiHi Swathi,
Ok. Do One thing. Go to menu bar and select Systems -> Own pool Request -> here you get the spool number. Select it and select the option "Print Directly" in tool bar.
Thanks. -
How to print the superscript in smartform
Hi gurus,
Please tell me the procedure how to print the superscript in middle of the text displaying?
when we are displaying the smartform its converted to some special character like & .
please let me know procedure at the earliest
Regards
RajHi thanks for ur patience.
see my requirment was to print TM as superscript for HLL ,already smartstyle is there, and also a character format with superscript is also defined.
then aftet HLL how it prints as superscript.
for HLL we are using another character format and for superscript we are using the another character format.
If posiible send me the code to write in smartforms
Regards
RAj
Points are awarded for useful answers.
Maybe you are looking for
-
Can I use Leopard Server for a few things without a static IP/DNS mapping?
Caveat: I'm pretty capable at setting up and running macs, but not a crack server admin or anything like that. I don't write code and my eyes start to glaze over when you start talking about Kerbos and the like... Question: I'd like to use Leopard se
-
DVI to VGA adapter. Too short?
Hello. Please do not blame me for being ignorant, I recently had to do a project and in order to connect to the screen, I need to use a DVI to VGA adapter, which is provided when I bought my MBP. But then, isnt it too short? How do I connect it then?
-
Getting pictures off of a broken iphone
on my olf iphone 4 the screen is broken, making it not able to use, i need my pictures off of it, i tried using icloud but i did not put my pictures on icloud, and i have a passcode on m old phone, so i cannot back up my iphone to itunes, how can i g
-
Display seems like 16 bit color with slight flicker
When I turned my iMac on today, it's like the display color spectrum is on 16 bit color and it has a flicker to it. This happed all of the sudden. It's less than a year old. 21" iMac Intel Core 2 Duo NVIDIA GeForce 9400 VRAM 256MB Any ideas?
-
No imessage option on my iphone4
I have an iPhone 4 and for imessage you're supposed to go to settings and it should be under messages, right? But I can't find it anywhere. Help please!