Re: Crystal Reports for VS 2005 Error on Print

Tech-Archive recommends: Fix windows errors by optimizing your registry



First off I would suggest to check the actual security on each of the
directories on your web server. Usually, processes run as network services
and as such do not have required rights to write on the drive. Same goes for
the ASP process as well.

Second, I'd suggest you move to Reporting Services. Much more user friendly
and many more options plus tons of third party addons.

BR,

GAZ

"Steve McVey" <SteveMcVey@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6C449AAD-F60F-42A2-8CFA-8CAD85C03209@xxxxxxxxxxxxxxxx
I created a page in Visual Studio 2005 with a Crystal Reports web viewer
attached to a report. The report previews fine, but clicking the embedded
Print button produces an error:

"HTTP 403.1 Forbidden: Execute Access Forbidden
Internet Information Services"

"You have attempted to execute a CGI, ISAPI, or other executable program
from a directory that does not allow programs to be executed."

Impersonation is set to true in the web.config with a machine userid and
password for the web server. Seems like Crystal needs to be able to write
to
a temp directory on the server and users don't have access to this with
their
Windows domain accounts.

The Page Load event for the page with the viewer looks like:

crReportDocument.Load(Server.MapPath("Summary.rpt"));

crConnectionInfo.ServerName = "MyServer";
crConnectionInfo.DatabaseName = "DatabaseName";
crConnectionInfo.UserID = "****";
crConnectionInfo.Password = "****";

crDatabase = crReportDocument.Database;
crTables = crDatabase.Tables;

//Loop through all tables in the report and apply the
//connection information for each table.
for (int i = 0; i < crTables.Count; i++)
{
crTable = crTables [i];
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);

CrystalReportViewer1.ReportSource = crReportDocument;

If anyone could shed light on this problem for me I would be very
grateful.
All necessary permissions have been applied to the virtual directory in
IIS.

Thanks,

Steve


.


Quantcast