Skip to Content

Error while importing crystal report


I am trying to import crystal report using SDK.

I am getting following error.

System.Runtime.InteropServices.SEHException was caught
  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;
                ReportLayoutParams oNewReportParams = oLayoutService.AddReportLayoutToMenu(oReport,MenuID);  //Error is on this line

                newReportCode = oNewReportParams.LayoutCode;

Awaiting for your reply.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jan 10, 2018 at 09:07 PM


    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?.


    Add comment
    10|10000 characters needed characters exceeded

    • 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.