Printer tray selection VS2010

We have the following questions regarding windows printer default tray determining tray to print from:
<br><br>
1. When we set m_reportClass.PrintOptions.PaperSource = CrystalDecisions.Shared.PaperSource.FormSource, it defaults back to Auto (we can see that when we debug, it simply ignores the command) - why is that, and which option should we use to get the printer to use PrinterDefaultTray?
<br><br>
2. Default Printer impacts rpt. file even though "No Printer" is checked in the Page Setup dialog - so the default printer set on the developer PC opening the Page Setup of a .rpt file (not making a change, just opening) will change the file. Why is that and what change is made?
<br><br>
3. We have made a default 'dummy' printer on the developer pc which is used when opening the .rpt file. If a similar printer with the same name does not exist on the PC printing the report, we cannot control the tray that is prints from.
<br><br>
Is there a viewer that can show what has been changed inside an .rpt file to better understand what is happening to the file when it is opened in VS2010?
<br><br>
We are experiencing an issue with Crystal Reports VS2010 when trying to print reports to a specific tray. We have recently upgraded from .net 1.1 to .net 4.0 and in relation to this we also upgraded the CR version.
<br><br>
In the previous version we were able to setup windows printers with a specific default tray and when printing to this windows printer, the default tray of this windows printer was used. We have a range of printers being used in a client windows forms application, so we need to be able to continue letting the windows printer definition determine which tray to use. Preferable we would like to set PaperSource to UsePrinterDefaultTray, but that option does not seem to exist (or we have not found it yet). We have found another solution, but would like to understand why it works so we know that it is a viable solution.
<br><br>
The application is based on creating a report using the CrystalDecisions.CrystalReports.Engine.ReportClass. The example below has been shortened for readability:
<br><br>
CrystalDecisions.CrystalReports.Engine.ReportClass m_reportClass = new new EKRB007A();<br>
// create/get data for report<br>
// u2026<br>
m_reportClass.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA4;<br>
m_reportClass.FormatEngine.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA4;<br>
<br><br>
m_reportClass.SetDataSource(this.dataSet);<br><br>
<br><br>
CrystalDecisions.Shared.PageMargins pm = new CrystalDecisions.Shared.PageMargins(<br>
                                this.getA4InvoicePrinterOriginalHorizontalAlignment(), <br>
                                this.getA4InvoicePrinterOriginalVerticalAlignment(),   <br>
                                m_reportClass.PrintOptions.PageMargins.rightMargin,    <br>
                                this.getA4InvoicePrinterOriginalVerticalAlignment()     );<br>
<br>
m_reportClass.PrintOptions.ApplyPageMargins( pm );<br>
<br>
// The name of the windows printer to use is read from parameters.<br>
m_reportClass.PrintOptions.PrinterName = this.getA4InvoicePrinterCopy(); // here it will return 'InvoicePrinter'<br>
<br>
m_reportClass.PrintToPrinter(<br>
        1,<br>
        true,<br>
        1,<br>
        m_reportClass.FormatEngine.GetLastPageNumber( new CrystalDecisions.Shared.ReportPageRequestContext()));<br><br>
The printer has the 'No Printer' set in the Page Setup dialog as we have different printers with different number of trays, so we need to be able to specify the printer at runtime (according to the VS2010 CR documentation, there should be two dialogs - Print Setup and Page Setup, but in VS2010, we can only find the Page Setup, and it includes some of the options from the old Print Setup dialog).
<br><br>
Developer A, has two printers: printer 'Generic Text' set to default and printer 'InvoicePrinter' (the one to print from as read from the paramter in the above code). The 'Generic Text' is a generic text printer with no trays and the 'InvoicePrinter' is an OKI printer with two trays.<br><br>
Developer B, has printer 'InvoicePrinter' set as default.<br><br>
Developer C, has two printers: printer 'SalesList' set to default and printer 'InvoicePrinter'<br><br>
Developer A sets up printer 'InvoicePrinter' to print in tray 1 (and 'Generic Text' is default printer). Then opens the .rpt file and compiles. If a print is made on the developer PC, it prints to the correct tray. We can change 'InvoicePrinter' to tray 2 and again it prints correctly. However, if the same .dll is deployed on Developer B's PC, and a print is made, it always uses the same tray even though the windows printer is changed (it actually uses the 'InvoicePrinter', but it ignores the tray it is configured to use). The same is the case for Developer C's PC.
<br><br>
We have tried to set m_reportClass.PrintOptions.PaperSource = CrystalDecisions.Shared.PaperSource.FormSource and m_reportClass.PrintOptions.PaperSource = CrystalDecisions.Shared.PaperSource.Auto, but it has no impact.
<br><br>
If Developer B adds a printer called 'Generic Text' (even though it is not to be used) AND sets this printer to be the default printer, then it works exactly as on Developer A's PC - meaning that the windows printer tray definition of 'InvoicePrinter' is used correctly.
<br><br>
Our solution rigth now is to install a 'dummy' printer on all developer PCs and on all client PCs. This printer must be set as default printer on developer PCs so when the Page Setup of any .rpt file is opened (yes, just opening it changes the file), the new file generated will be based on the 'Generic Text' printer. We will then change the default printer on client PCs just before printing to the 'Generic Text' printer and set it back to their 'normal' default afterwards.
<br><br>
In my dev team we all agree that this is not the optimal solutions, so any suggestions will be well received.
Edited by: Visual Reporting ApS on Oct 17, 2011 12:08 PM

Use the InProc RAS SDK, not CR SDK. More functional, same licensing.
See the following forum threads:
|Re: Using printReportOptions.BinName, Tray Printing
Re: Printer Tray Selection
Re: Custom Paper Size & Orientation Problem
Re: 8.5 x 5.5 paper size in VS2010 with Basic Crystal report
Re: How to print a report in landscape?
And don't forget to do more searching. Also, sample InProc RAS apps are [here|https://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples].
An intro to InProc Ras:
[How to Use The RAS SDK .NET With In-Process RAS Server|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10b840c0-623f-2b10-03b5-9d1913866b32]
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Similar Messages

  • Regarding Printer Tray Selection while running BI Publisher Report.

    Hi All,
    Below is my requirement.
    When ever user tries to run the report, based on the customer code the printer tray has to be passed to printer so that the report gets printed by selecting the paper from the same tray. Each printer tray will have different paper color.
    Let me know how can I achieve this? Its very urgent..
    Thanks
    Babu

    hi,
    Just now i identified that its not deleting the report but its reverting back the report to its previous version. Let me explain it you in details:
    suppose i created a report with following query source as Oracle Database:
    select territory_code from fnd_territories_tl
    where LANGUAGE = USERENV ('Lang')
    now if i modify the query in the same report to following query:
    <dataTemplate name="dunningLetter" description="Dunning Letter Report" dataSourceRef="IPOVIS" defaultPackage="xx_shpckt_init" Version="1.0">
    <parameters>
    <parameter name="p_order_number" dataType="character"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[select order_number from oe_order_headers where order_number = :p_order_number
      ]]>
    </sqlStatement>
    </dataQuery>
    <dataTrigger name="beforeReport" source="xx_shpckt_init.beforeReportTrigger"/>
    </dataTemplate>
    and then if i run the report again, the report will still show the result of previous query!! and then if i go back to data model then it will show the previous query there!! not sure why is it doing this way?? Also sometimes, when i create a new report and then view the result then it will revert its previous stage i.e report without Data model, LOVs and parameters!! That is the reason i thought its deleting the report while running report.
    Please suggest why is it acting this way? Appreciate your help and time.
    Thanks,
    Regards,
    AS

  • Printer tray selection in smartforms

    Hi All,
    I have a requirement that for a particluar printer the smartform should be printed using a particular tray (for ex. Tray4). How can this be achieved?
    Regards..

    Refer these threads,
    Print to different output tray in SAPscript/Print Workbench
    Automatic tray selection for printing
    Regards,
    Joan

  • Check  printing Tray selection

    Hi,
    I have a requirement in which i have to print checks after printing some invoice details. The customer requirement is that checks are to be different/special paper kept in a different tray. So the logic requires that all the details be printed on normal page in default tray, while the checks should be printed from paper in different tray.
    Is there a was to perform Tray selection using XMLPub APIs ?
    Thanks in advance
    neeraj

    Hi,
    Were u successful in tray selection. I have the same requirement.
    Thanks in advance.My id is [email protected]
    Gaurav

  • Printer Tray Selection in xml-Source

    I want to print my AdobeForm only at the Tray1. When there is another Paper in the primary Tray the printer have to print the AdobeForm in Tray1 not in the primary Tray.
    Who can tell me whats the source Code. PrinterProtocoll is PCL5e.
    Thx

    Refer these threads,
    Print to different output tray in SAPscript/Print Workbench
    Automatic tray selection for printing
    Regards,
    Joan

  • Printer Tray Selection

    I'm trying to print a SAPScript form to 2 different trays on 1 printer.  I have 2 different Output Devices defined and am using Windows printing (Method U) for both.  These output devices are pointed to 2 different shares on a Windows print server - one for Tray 1 and one for Tray 2.  Printing from Windows via these shares works fine, but when I print from SAP to the different Windows shares, it goes to the same Tray every time?? 
    Does SAP override the Windows queue and ignore the specific tray assignment?  Do I need to use SAPScript level Tray handling?
    Thanks for your help,
    Jeff Martens

    Hari,
    I tried setting the Tray in SPAD, however this works for everything but SAPScript per an SAP note.  I'm going to try specifying the tray in the "printer initialization" in the format type for my print.
    Thanks
    Jeff

  • Printer Tray Selection Through Smartform

    Hi All,
    My requirement:
              There are two headings one should be printed in A4 Portrait and the other heading to be printed in the A5 landscape format inbetween each printed paper a color paper is to be inserted from tray 3 consider the other two size papers are kept on the separate trays...
    Kindly help....
    Thanks in advance.

    For ASCII text reports, the printer options can be enabled with embedded PCL escape commands within the Apps driver (Note 152285.1 should be helpful).
    For Bitmap reports, it can be done by editing PPD file (located under $ORACLE_HOME/guicommon6/tk60/admin/PPD)

  • Smartform Printing Tray issue

    Hi,
    I have an issue for printing multiple tray. My req is first page nneds to print from TRAY 02 and the second page from Tray 03.
    I configured in the smartform PAGE01 - Output options- Resource name - TRY02 and
                                              PAGE02 - Output options- Resource name - TRY03
    But both the pages printing for the same tray. like tray02.
    Aprat from the resource declaration anything need to do for this?
    Please guide me any one.
    Thanks in advance.
    Vijay.

    Hello,
    Is it a frontend printing? Which device type is used?
    In recent SAPGUI patches, it is possible to map the tray ids via the
    Frontend Options Editor/ tab 'Printer Tray Selection'.
    (see KBA 1704243 about how to access the Frontend Options Editor)
    Please test the following:
    Select the printer model and in "Paper Trays", select "Tray 1",
    in the field "SAP ID" enter the value: 1
    and,
    select "Tray 2", in the field "SAP ID" enter the value: 2
    Do the same for Tray 3, 4...
    After this, please restart SAPGUI and test the printing.
    Regards,
    Wen Peng

  • How do I check that a printer tray exists before using srw.set_printer_tray

    Due to printer firmware issues I cannot know in advance whether the printer's tray number has a space in front of it.
    Ex: '2' vs. ' 2'
    I have introduced this code to production, but if the tray value passed in does not exist, then an error is thrown when setting the printer tray.
    If I cannot determine this in advance, then I would like the code not to fail and simply skip the assignment. The printer tray selection is only a convenience to the end user. This is important becasue I have hundreds of printers to which a report may be printed.
    function BetweenPage return boolean is
    begin
    IF :PLABLE_TRAY IS NOT NULL AND :PLABLE_TRAY <> '' THEN
         srw.set_printer_tray(:PLABLE_TRAY);
    return (TRUE);
    END IF;
    return (TRUE);
    end;
    Thx in advance,
    Gary

    high-Q wrote:
    It's an autonomous test station with various measurement instruments. I'm closing the bus after reciving the string from each instrument.
    Again, that makes no sense.  Part of the command over the bus is the address.  So if you know all of your instruments' addresses, you just supply that when you iteract with that instrument.  There is no reason to constantly open and close your bus.
    The problem with checking to see if data is available is that you have to send a querry to the instrument.  You are the master of the bus.  Nobody else can send data without you letting them.  So you have to keep you bus open and send querries to check to see if the oscilloscope is ready to send data.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Publisher 11g and Printer Tray Control

    Using 11g, is there a way to control printer tray selection in a RTF or even a PDF template? From my reading of older posts (2008) on this topic, this feature was not supported in earlier versions. I hoping the latest version is able to support tray selection, even it's hacked solution. Any help is appreciated. Thanks

    1) In SPAD under the device types tab, enter your device type and hit display.
    2) click on Print Controls and scroll down you will see TRY01, TRY02, TRY03 and TRYMN.
    3) click on the edit icon and change the control character sequence that was provide for you. we
    are using 1B266C3548, Hope this helps!

  • Wrong automatic paper tray selection in HP LaserJet M3035 printer.

    Hello,
    I have a printer (this one http://h10010.www1.hp.com/wwpc/us/en/sm/WF06b/18972-18972-3328064-12004-3328083-2512333-2512337-3435... ) shared in Active Directory by several users (running Windows XP machines). The thing is that no matter how many times I try to set the source paper tray to a specific one, it seems it doesnt apply/store the changes, and it comes back to Auto tray selection  (and it always selects tray #1, which is the one im trying to avoid), causing an issue which needs to be solved by hand.
    Thanks a lot in advance.

    1. Go into your SETUP MENU on your printer.
    2. Choose PREFERENCES
    3. Choose DEFAULT TRAY.
    Try it and let me know what happens, thanks.
    **Click the KUDOS star on the left to say 'Thanks'**
    Please mark a reply "ACCEPTED AS SOLUTION" if it solved your problem, so others can find it.

  • Does the Officejet 8600 Pro Premium N911n printer perform auto tray selection?

    I have an Officejet 8600 Pro Pemium N911n printer,  CN577A with two trays. My Operating Sysem is Win8,64bit,there are no error messages, no system changes.
    The HP Officejet Pro 8600 e-All-in One series User Guide states that By default, the printer draws media from Tray1.If Tray1 is empty, the printer draws media from Tray2(if it is installed and loaded with media. I have Tray lock disabled ,Tay1 the default Tray and Automatic Tray Selection enabled.Prior to making these selections,I contacted HP support via email to report that this option was not working. I received a response that there is no method that will automatically select a tray when one tray is empty. The User 's manual states otherwise..This option might not work but it is part of this series of printers. I have both trays loaded and I will determine if it works after Tray1 is empty. Does anyone have one of these printers and the auto Tray function works? Thanks.
    This question was solved.
    View Solution.

    Hello wardell1,
    Please take a look at this document and let me know if the troubleshooting steps help resolve your issue.
    Good luck!
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • Smart form dynamic tray selection on printing

    Hi Experts,
    I have a requirement in smart form that need to output the a particular invoice to a particular tray a printer. For e.g. tray 2.
    I have added TRY02 to the resource name of the pages in the smartform, but still the invoice is being printed to the default tray of the printer.
    I have done a test to that printer by printing the SAPCRIPT-TRAYTEST from SO10, and the output is being printed correctly i.e. to the different trays. So I guess the printer has been configured correctly.
    Is there any additional configurations that need to be done for smart forms for the tray selection works correctly? And, is it correct the way I implemented the functionality in the smart form?
    Can someone help please?
    Thanks in advance
    Regards,
    Zaheed

    Hi Experts,
    I have a requirement in smart form that need to output the a particular invoice to a particular tray a printer. For e.g. tray 2.
    I have added TRY02 to the resource name of the pages in the smartform, but still the invoice is being printed to the default tray of the printer.
    I have done a test to that printer by printing the SAPCRIPT-TRAYTEST from SO10, and the output is being printed correctly i.e. to the different trays. So I guess the printer has been configured correctly.
    Is there any additional configurations that need to be done for smart forms for the tray selection works correctly? And, is it correct the way I implemented the functionality in the smart form?
    Can someone help please?
    Thanks in advance
    Regards,
    Zaheed

  • Tray selection of printer doesn't work with printing order confirmation

    Hello,
    When we try to print output for the order confirmation document (BA00 and custom ZBA0) on a different paper tray (e.g. tray 2 for printer avbekyo-01_tray2 in SAP R/3) then the ouput is printed to tray 1 in stead. We have defined two different printers in SAP for the tray selection. We tested the ouput on different printers, besides the avbekyo-01 and went wrong on the others also. When we print out an invoice (ZRD0) to the printer on the second tray, the invoice is printed correctly from the second tray. With an ABAP developer we debugged the print process, but no code leads to the fact that the output for the order confirmation should be printed to the first tray, while the second tray was selected in the output record. In the code still the second tray is processed, but printed on the first. The only difference we can find is that the order confirmation is SAPScript and the invoice is a Smartform. Does anyone know a solution?.
    Kind regards

    Unfortunately the setting doesn't resolve the problem. We also have activated the settings of Tray2 in the option Tray Info.
    Edited by: Chantal Polman FUNC ACCOUNT on Jun 4, 2008 2:32 PM

  • PRINTER TRAY CONTROL/SELECTION WITH SAPSCRIPT USING ZTROYMIC DEVICE TYPE

    We are printing checks using SAPscript in which we specify TRY02 for the overflow/invoice detail pages of  a check and TRY03 for the check itself, this is in order to use check stock only for actual checks and plain paper for the invoice detail pages.  As indicated above the device type to which we are printing is ZTROYMIC.  The device type was downloaded from note 94233, and is printing the MICR characters successfully however there was no Control Character Sequence provided for TRY03 in SPAD print controls.  The tray selection is not working correctly, I was given the following escape sequence, escape character & l 5 H, for TRY03 by TROY but not sure how to implement this in SPAD.  Should we pose this question directly to SAP?  Is tray selection supported for this device type?  If not how can we direct pages to correct tray otherwise?
    Your help is much appreciated,
    Doug
    Edited by: Lisa Platt on Dec 3, 2008 11:02 PM

    1) In SPAD under the device types tab, enter your device type and hit display.
    2) click on Print Controls and scroll down you will see TRY01, TRY02, TRY03 and TRYMN.
    3) click on the edit icon and change the control character sequence that was provide for you. we
    are using 1B266C3548, Hope this helps!

Maybe you are looking for

  • To insert a new row in a table control without affecting the other rows

    Halo experts, I have a Table control TCTRL in a program . The lt_tab contains two cols A and B In change mode of the transaction Col A is in display mode and Col B is in change mode When i press the + button to insert a new blank entry .I need a blan

  • How long does it normally take to download a 2.8gb film to a brand new ipod touch ?

    How long does it normally take to download a 2.8gb film to a new ipod touch ? - I'm using a wireless internet connection with a strong signal (speed 300mbps), but looks like it could take hours - that cant be right ?.  So far just 700mb have been dow

  • Missing package information on MyBT accounts

    Missing package information on MyBT accounts and after lots of phone call no one can fix it. which department do i need to talk to. and can i have a name of some one it that department so I can look them up in the Directory if not a name a EIN will d

  • Export problem & audio garbled if using "Fade in" effect

    Hi everyone, I'm using iMovie HD 6, and I'm not sure why this is happening. I have a 30-second clip that I added credits to over the first few seconds. I then go to export (Share>Quicktime) and it creates an mp4 file, but when I try to open it I get

  • Variable where clause

    Hi, anyone can help me on this: I need to have a PLSQL cursor that has a variable where clause eg select * from employee where salary > 100 VS select * from employee where salary < 100 Is there anyway I can put a variable in the where clause?