If this is a folder, the filename will be the same as the report name, if it’s a filename, it will be that (make sure you get the extension right). The file they export to is specified in the PrintDir property. The Format member also accepts PF_RTF which will export silently in RTF format.
Rpt.SetParam "(( = -1))" ' Report parameter: 0īasically this technique will silently export to PDF files. Rpt.SetParam "PRINTBOM", "0" ' Report parameter: 8 Rpt.SetParam "PRINTKIT", "0" ' Report parameter: 7 Rpt.SetParam "SWDELMETHOD", "3" ' Report parameter: 6 Rpt.SetParam "SORTTO", "ZZZZZZZZZZZZZZZZZZZZZZ" ' Report parameter: 3 Rpt.SetParam "SORTFROM", " " ' Report parameter: 2 Rpt.SetParam "QTYDEC", "0" ' Report parameter: 5 Rpt.SetParam "PRINTED", "0" ' Report parameter: 4
RptPrintSetup.DeviceName = "HP LaserJet P3010 Series UPD PS"
Set rptPrintSetup = GetPrintSetup(" ", " ") Set rpt = ReportSelect("OEQUOT01", " ", " ")ĭim rptPrintSetup As AccpacCOMAPI.AccpacPrintSetup Then I edited the destination and format to change the print destination to PD_FILE and the format to PF_PDF. I deleted any extra code, like the error handler to make it a bit more compact. Our API does have the ability to do this in a couple of situations.īelow is a macro I recorded to print O/E Quotes. People want to set these programmatically. Often if you choose File as a print destination then we prompt you for the format and then prompt you for the file name to save to.
It appears that one of the common reasons to go to the Crystal API directly is to print to file without any manual intervention. (The newer Web portal parts use the Java interface and so were ok). For this version we had to change our internal interface to Crystal from COM to.
If you had an older version and don’t un-install it, then you can still use the older version of the Crystal runtime (since it will be still there), but that isn’t a good long term solution as people upgrade computers and go to newer operating systems like Windows 8.Ĭrystal Reports now only supports a. Hence anyone that is writing directly to the Crystal COM API will be broken by the Sage 3 release. Not only did they drop support for it, but they removed it completely from the product. This then leads to a problem because Crystal dropped support for their COM API. However it turns out that quite a few people have automated the report process by writing to the Crystal COM API directly. Then your programs are upgrade safe since we maintain compatibility of our COM API. Our intent was that people performing customizations will use our API to drive Crystal Reports. This blog post is really for people that are controlling printing reports programmatically and are more affected by the changes in the Crystal runtime and more specifically changes in the Crystal Reports API. You can drive reports from our regular forms, or you can write VBA macros that automate the reporting process. Then we have various options for printing from various web contexts like Quotes to Orders.
Plus it means that people customizing reports can take advantage of any of the new features there.įor reports you can print to preview, print to file or print directly to a printer. The intent is to move to a fully supported version of Crystal Reports, so as they adapt to things like Windows 8 and Windows 2012 Server, we know we are fully supported and can get updates for any problems that show up. With our Sage 3 release we updated our Crystal Reports runtime to the newest Crystal 2011 runtime (SP3 actually).