cancel
Showing results for 
Search instead for 
Did you mean: 

Method not found: CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag

Former Member
0 Kudos

Hi,

I am trying to export dynamically to pdf and excel. this coding was working fine before update pack 12. after updating pack 12, it gives error "Method not found", even roll back pack 12 and update pack 10, it gives same error. I have tried all the possibilities to resolve, but to fail. kindly help me to resolve it. i am adding code for reference.

Madhavarao

using CrystalDecisions.Shared;

using CrystalDecisions.CrystalReports.Engine;

using CrystalDecisions.Web;

string reportPath = "c:\\RptReports\\COA_QC_new.rpt";

ReportDocument reportDocument = new ReportDocument();

reportDocument.Load(reportPath);

ParameterFieldDefinitions pfdDefinitions = reportDocument.DataDefinition.ParameterFields;

ParameterValues pvValues = new ParameterValues();

ParameterDiscreteValue pdvDiscreteValue = new ParameterDiscreteValue();

pdvDiscreteValue.Value = txtQC.Text;

pvValues.Add(pdvDiscreteValue);

ParameterFieldDefinition prdDefinition = pfdDefinitions["qono"];

prdDefinition.ApplyCurrentValues(pvValues);

CrystalDecisions.CrystalReports.Engine.Tables CrTables = reportDocument.Database.Tables;

TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();

TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();

CrystalDecisions.Shared.ConnectionInfo crConnectionInfo = new CrystalDecisions.Shared.ConnectionInfo();

crConnectionInfo.UserID = "uml";

crConnectionInfo.Password = "uml";

foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)

{

      crtableLogoninfo = CrTable.LogOnInfo;

      crtableLogoninfo.ConnectionInfo = crConnectionInfo;

      CrTable.ApplyLogOnInfo(crtableLogoninfo);

}

reportDocument.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, "c:\\temp\\" + Session["filename"].ToString() + ".pdf");

I have also tried with this code, but gives same error.

reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "c:\\temp\\" + Session["filename"].ToString() + ".pdf");

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello,

Try viewing the report in the WEB Viewer and use it's export button and see what happens. It could be the DB is failing to log on now or your permissions on c:\temp has changed.

By the way, you should not use c:\temp any more. Microsoft changed the default folder for \temp files and I have personally run into other software issues when that folder existed.

Try renaming it to c:\temp1 and set the permissions for IIS on that new folder and see what happens.

Don

Former Member
0 Kudos

Dear Mr.Don,

I have changed the folder name and tried it. same error. it is nothing to do with folder permission or db log on issue. it gives error that "Method not found" means it is not available in the library. it worked fine before update pack 10 and 12

0 Kudos

And what happens when you export from the Viewer?

Former Member
0 Kudos

Hi Don,

it work fine in viewer. i have uninstall CRfor VS and pack 12 and reinstall CR for VS with pack 5. it is working fine. i feel there is some problem with pack10.

0 Kudos

If it works from the viewer then something in your code needs to be updated. It could be some new Enhancement in the API's may require you to recompile your application.

SP 13 was just release, give that a try.

Also, in this line of your code try try hard coding the report file name:

"c:\\temp\\" + Session["filename"].ToString() + ".pdf");

To:

"c:\\temp\\Test.pdf"); // " + Session["filename"].ToString() + ".pdf");

May be something with the Session GUID causing the problem. You need to debug this yourself.

Don

Answers (0)