The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Crystal Reports Printer Settings
Posted: 14 May 07 4:18 PM
|
fiogf49gjkf0d Hello!
We recently upgraded to SLX 7 (Crystal X1) from 6.2.1 (and Crystal 8.5) and are having this issue.
Under the old system we used to save printer information with the Crystal Report. For example, we would set the printer to be a particular HP and the tray to be Tray 2 Legal. We would save a different report to print to the same printer but Tray 1. Users would then preview the report in SLX client and then hit Print and the report would print to the correct printer and the correct tray.
With the upgrade however, this system broke down. Now no matter which printer and what settings we set in the report everything prints to the Windows default printer on the client. I have contacted Sage and after some testing they notified me that this is by design and they're not sure how we got it working in the 6.2.1 world because it was never supposed to work that way!
So, is there something I'm missing or are they correct? Is there anything we can do? The old system worked very well for us because we could set reports that needed a specific letterhead to print to that tray and others needing the other letterhead to the other tray. Now productivity is down because everyone has to pause to make sure they select the right printer and tray. (they print these things all day long).
Thanks. |
|
|
| |
|
Re: Crystal Reports Printer Settings
Posted: 15 May 07 1:49 PM
|
fiogf49gjkf0d Are these reports that were automatically upgraded? I've heard reports that people have had to check them out, save a hard copy, then reimport specific reports to return certain functionality.
While it is an incredibly tedious task for all reports, it might be worth it to try on at least one. If you can open your hard copy, save the changes and reopen it with those changes, guess where the problem is? Certainly not your report, or the report engine.
Ultimately, the more future-proof solution is to follow Ryan's example. You may have to re-import reports in the next major version of SLX and I'm sure it'd get old after just the first time. |
|
|
|
Re: Crystal Reports Printer Settings
Posted: 15 May 07 3:59 PM
|
fiogf49gjkf0d Thanks for the replies.
I just reimported a report with the right settings and it didn't work. The report was on legal paper, Xerox printer, Tray 3. When it shows up on the client its legal paper, default printer.
I can't believe we just got lucky with 6.2 though, is Sage correct in that it was never supposed to work?
There are lots of reports that we have setup this way, we couldn't do a script for each one. We could (I imagine we could) add a button on the report screen to switch the printer to the correct one and the user could click it before running the report. That might work. We have 2 printers we use and some reports need to print to Tray 2 and some to Tray 3.
|
|
|
|
Re: Crystal Reports Printer Settings
Posted: 15 May 07 4:11 PM
|
fiogf49gjkf0d Each report has an open and a close event. You could make a single script to change the printer settings and reuse that same script for each one. You wouldn't need some special way to launch the report or anything. The script would run just be launching the report from the normal reports area.
The reason why this behavior is different in v7 than it was in v6 has to do with the way the reports were launched. In v7 all the report stuff was rebuilt in Architect. The reports are obtained via the built in SLX function for getting the RDC object for a report. This function, apparently, sets the printer detail in the report based on the default (when a report is saved, it does save the printer info with it. This is usually changed at runtime via the RDC object which is what is happening here).
So, your only hope here (as far as I can tell) would be to use a script to change the printer settings on the open of the report, then change it back to default once the report has closed (which can all happen automatically without the user doing anything.
Another route would be to modify the SLX reports area to set the printer details for the reports before they are ever launched.
-Ryan |
|
|
|
Re: Crystal Reports Printer Settings
Posted: 15 May 07 4:13 PM
|
fiogf49gjkf0d I believe the Reports screen is customizable now, so combining Ryan's method couldn't you place a button or a menu that changes the printer before the report is shown? You wouldn't have to touch each report then, and it'd be much easier to implement in client rather than in Crystal.
Regarding 6.2, it's possible it was a "feature" in Crystal that somehow got lost. I have a 6.2 VM I've yet to decomission, so I'll run some tests when I get time to see if I can duplicate what you're saying. If it works on my machine then it's likely an undocumented feature that now "functions as designed", but it's also possible some fluke made it work in just your environment for a single version of SalesLogix. |
|
|
|
Re: Crystal Reports Printer Settings
Posted: 05 Nov 08 2:36 PM
|
Hi Ryan,
The link is not good anymore. I am trying to run/print a report from SLX and set up the tray of the printer programatically. Here is my quick sub to print the report:
sub PrintCrystalReport dim rdc dim i
set rdc = Application.BasicFunctions.GetCrystalReport("Ticket:Ticket Job Style") for i = 1 to rdc.ParameterFields.Count rdc.ParameterFields.Item(i).ClearCurrentValueAndRange next
rdc.RecordSelectionFormula = "{Ticket.TicketID}='" & txtTicketID.Text & "'"
'print report without promting the user dim strDriver, strName, strPort
'Veronka's default printer strDriver = "Canon iR500-600 PCL6" strName = "a_Purchasing Canon IR5000" strPort = "IP_172.16.4.103" rdc.SelectPrinter strDriver, strName, strPort rdc.PaperSource = 1 'crPRBinUpper rdc.PrintOut false set rdc = nothing end sub
My question is how can I assign tray name to the PaperSource? How do I print more than 1 copy?
Thanks |
|
|
| |
| |
|
Re: Crystal Reports Printer Settings
Posted: 06 Nov 08 8:42 AM
|
Hi Ryan, I can specify which printer to print out the report, but I have problem setting up the correct tray. The constanst to set up the tray are hardcoded into the type library of the RDC runtime engine (Craxdrt.dll) and icludes about 10 - 12 values.
"These values are the most common settings that are found with many different printer drivers. In order to use these values successfully, the printer driver that is being used must support that particular paper tray. Please consult the printer driver's vendor for information about what it can support. …"
see the rest of the article here:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313332333233363338%7D.do
So my question is how to get and send the report to the correct tray.
Thanks, - Veronka
|
|
|
|
Re: Crystal Reports Printer Settings
Posted: 07 Nov 08 8:07 AM
|
Seting up both PaperOrientation and PaperSource will solve the problem.
... rdc.PaperOrientation = 0 ' Default rdc.PaperSource = 2 rdc.PrintOut false |
|
|
|