本文介绍了业务对象/ Crystal报表服务器计划到磁盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 大家好, 我正在尝试安排从ASP应用程序报告文件,以便同时将报告打印到打印机。下面的代码会产生与我在CMC中执行此操作时相同的计划报告。只有在CMC应用程序中才有效,当我尝试代码时,报告保持活动状态,并且不会写入文件或将副本打印到打印机。这可能是什么问题? 这是我的代码: string query =选择SI_DEST_SCHEDULEOPTIONS,SI_PROGID来自CI_SYSTEMOBJECTS +其中SI_PARENTID = 29 AND SI_NAME ='CrystalEnterprise.DiskUnmanaged'; InfoObjects fileInfoObjects = infoStore.Query(query); InfoObject infoObject = fileInfoObjects [1]; DestinationPlugin destinationPlugin =(DestinationPlugin)infoObject; DiskUnmanaged diskUnmanaged =(DiskUnmanaged)destinationPlugin; DestinationOptions destinationOptions = diskUnmanaged.ScheduleOptions; DiskUnmanagedOptions diskUnmanagedOptions = new DiskUnmanagedOptions(destinationOptions); diskUnmanagedOptions.DestinationFiles.Add(@c:/PrintedReports/test.rpt); schedulingInfo.Destination.SetFromPlugin(diskUnmanaged); query =选择SI_ID,SI_NAME FROM CI_INFOOBJECTS+其中SI_ID =+ report.ID.ToString(); InfoObjects infoObjects = infoStore.Query(query); infoObject = report; ReportPrinterOptions reportPrinterOptions = report.ReportPrinterOptions; reportPrinterOptions.Enabled = true; reportPrinterOptions.AlwaysPrintToPDF = true; reportPrinterOptions.Copies = 1; reportPrinterOptions.PrinterName = printerDataTransfer.PrinterName; infoObjects = report.ParentInfoObjects; infoStore.Schedule(infoObjects); 解决方案 Hi all,I'm trying to schedule a report from an ASP application to file in order to simultaniously print the report to printer. The code below results to the very same scheduled report as when I do this in the CMC. Only in the CMC application this works and when I try the code the report stays "Active" and does not write a file or print a copy to the printer. What could be the problem here?This is my code:string query = "Select SI_DEST_SCHEDULEOPTIONS, SI_PROGID From CI_SYSTEMOBJECTS " + "Where SI_PARENTID = 29 AND SI_NAME = 'CrystalEnterprise.DiskUnmanaged'";InfoObjects fileInfoObjects = infoStore.Query(query);InfoObject infoObject = fileInfoObjects[1];DestinationPlugin destinationPlugin = (DestinationPlugin)infoObject;DiskUnmanaged diskUnmanaged = (DiskUnmanaged)destinationPlugin;DestinationOptions destinationOptions = diskUnmanaged.ScheduleOptions;DiskUnmanagedOptions diskUnmanagedOptions = new DiskUnmanagedOptions(destinationOptions);diskUnmanagedOptions.DestinationFiles.Add(@"c:/PrintedReports/test.rpt");schedulingInfo.Destination.SetFromPlugin(diskUnmanaged);query = "Select SI_ID, SI_NAME FROM CI_INFOOBJECTS " + "Where SI_ID=" + report.ID.ToString();InfoObjects infoObjects = infoStore.Query(query);infoObject = report;ReportPrinterOptions reportPrinterOptions = report.ReportPrinterOptions;reportPrinterOptions.Enabled = true;reportPrinterOptions.AlwaysPrintToPDF = true;reportPrinterOptions.Copies = 1;reportPrinterOptions.PrinterName = printerDataTransfer.PrinterName;infoObjects = report.ParentInfoObjects;infoStore.Schedule(infoObjects); 解决方案 这篇关于业务对象/ Crystal报表服务器计划到磁盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-24 14:08