Sunday, March 18, 2012

I've the same problem with Crystal .NET Runtime for VS 2010 SP1.
I do as it is written in developer's guide:
1) Set PrintMode to ActiveX;
2) Change web.config:
  <configSections>
    <sectionGroup name="businessObjects">
      <sectionGroup name="crystalReports">
        <section name="printControl" type="System.Configuration.NameValueSectionHandler" />
      </sectionGroup>
    </sectionGroup>
  </configSections>
  <businessObjects>
    <crystalReports>
      <printControl>
        <add key="url" value="http://localhost/MyWebApp/PrintControl.cab" />
      </printControl>
    </crystalReports>
  </businessObjects>

เพิ่มเติม


ASP.NET - Crystal Reports: PrintControl.Cab ActiveX problem

Crystal Reports: PrintControl.Cab ActiveX problem Problem: I have a crystal report (some version) with asp.net (usually v2.0), I am using the ActiveX to print the report; I get an error with following symptoms. -Upon print button click it shows the pop-up window and stop without continue the printing. -It shows the small print window and vanishes away - nothing happens! -Print works on some client machines and does not work on some machines. Workaround: Specify the version number of the print control in the web site's web.config file; so, the first time it would download and rest of times it would reuse the print control. 
เพิ่มเติม
เวลา implement ในserver IIS ให้ติดตั้ง crystal report runtime ตัวล่าสุด เพื่อให้สามารถใช้งาน cr ได้แล้วconfig ใน web.config
<add key="url" value="http://localhost/MyWebApp/PrintControl.cab" /> เพื่อชี้ไปยัง file ที่อยู่ใน server ในกรณีที่ต้องการให้ load PrintControl ในserverของเราเอง หรือ point ไปยังserver ของ zap ก็ได้
In your web.config file, add the following section with the given url.
  1. <businessobjects>  
  2. <crystalreports>  
  3. <printcontrol>  
  4. <add key="url" value="http://support.businessobjects.com/CRforVS2005/PrintControl.cab#1,2,0,1078">  
  5. </add>  
  6. </printcontrol>  
  7. </crystalreports>  
  8. </businessobjects>  
The print control is ActiveX and it requires to be downloaded and installed on the client browser. On the systems that still do not print, requires a check if they have enough privileges to install the ActiveX control? Or that they have any printer installed. If they don't then an error is always expected. Please see this resource shared by Business Objects for more detailed reference. And also, you may download the PrintControl.CAB file explicitly from this location. UpdateAdding/Configuring a Crystal Report Viewer in web.config. Update 2011-MAY-11: You can also try adding the link to "Trusted Sites"; the link from where you are pulling the reports. Internet Explorer -> Tools ->Internet Options ->Security Tab ->Trusted Sites Security Zone -> Click Sites and add the url.

No comments:

Post a Comment