cancel
Showing results for 
Search instead for 
Did you mean: 

Database Logon Failed while export to pdf. Tried all the options without success.

Former Member
0 Kudos

Hi there,

This has been questioned and answered but for me nothing worked.

I've been trying to export the crystal report to pdf. It fails on Production server.

I've tried all the possible solutions.

Production Server details :-

Windows Server 2008 R2/64-bit Operating System.

IIS Version - 7

I've already tried installing SQL Native Client 10 and 11 on production server and also tried providing DB Log in details at runtime. Both didn't help.

Please help. I've been trying this since days.


My Code :-


Microsoft.Practices.EnterpriseLibrary.Data.Database db = null;

DataSet DS = null;

db = DatabaseFactory.CreateDatabase("Constring");

//Constring = <add name="Constring" connectionString="Database=MYDB;Server=ProdServer;Integrated Security=false;uid=xxx;Password=yyy" //providerName="System.Data.SqlClient" />

DbCommand dcmd = db.GetStoredProcCommand("MyProcedure");

db.AddInParameter(dcmd, "@liparameter", DbType.Int32, 145);

DS = db.ExecuteDataSet(dcmd);

ReportDocument rptDoc = new ReportDocument();

rptDoc.Load(Server.MapPath("~/Reports/Myreport.rpt"));

rptDoc.SetDataSource(DS);

rptDoc.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, PDFFolderNameChild + PDFstrFileName + ".pdf"); //Error here.

Regards

Mzee

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Can you install CR Designer on the Production server, or a QA image of it?

Search for CRLogger KBA, it will tell you how to enable CR DB logging, see if it shows you what is wrong.

Don

Answers (1)

Answers (1)

former_member186271
Participant
0 Kudos

Hi Mzee, I think it will be helpful if you provide what you have done for check so far?