Skip to Content
0

Error while importing crystal report

Jan 09 at 01:01 PM

98

avatar image
Former Member

Hi,

I am trying to import crystal report using SDK.

I am getting following error.

System.Runtime.InteropServices.SEHException was caught
  HResult=-2147467259
  Message=External component has thrown an exception.

Code is below.

ReportLayoutsService oLayoutService = (ReportLayoutsService)oCompany.GetCompanyService().GetBusinessService(SAPbobsCOM.ServiceTypes.ReportLayoutsService);
ReportLayout oReport = (ReportLayout)oLayoutService.GetDataInterface(ReportLayoutsServiceDataInterfaces.rlsdiReportLayout);

            oReport.Name = ReportName;
            oReport.TypeCode = "RCRI";
            oReport.Author = oCompany.UserName;
            oReport.Category = ReportLayoutCategoryEnum.rlcCrystal;

            string newReportCode;
            try
            {
                ReportLayoutParams oNewReportParams = oLayoutService.AddReportLayoutToMenu(oReport,MenuID);  //Error is on this line

                newReportCode = oNewReportParams.LayoutCode;
            }

Awaiting for your reply.

Thanks.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Jan 10 at 09:07 PM
0

Hola!.

A mi también me esta sucediendo lo mismo, lo curioso es que es a partir de la versión 9.2 PL 08. Esta mismo proceso lo venia ejecutando en la versión 9.2 PL07 y no presentaba problemas.

Que versión utilizas tu?.

Saludos,

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Jorge,

I am using SAP B1 9.3 PL00.

It was working when I was using 9.2 version but after upgrading to 9.3 PL00 same code is giving error.

0
Former Member

Hi saurabh.

I wanted to tell you that I solved the problem.

What I did was incorporate an initial function in which I consulted first if the report was already registered in the database. If it exists, I delete it first before uploading the report again.

In my case, I want the current format to be the one I upload, so I have no problem removing it and uploading it again.

Tell me if this solution works for you.

regards

0