Skip to Content
avatar image
Former Member

How do I create a new crystal report without Crystal Designer programmatically?

Hi,

How do I create a new crystal report without Crystal Designer programmatically?
I do know I need to use the RAS.NET SDK, cause in CR.NET this functionality is not available.
In the developer Guide from SAP Crystal Reports SDK 4.1 RAS.NET I did find the instruction to create a new report:

ISCDReportClientDocument rpt = new ReportClientDocument();
rpt.ReportAppServer = "";
rpt.New();

var path = Path.Combine($"D{Path.VolumeSeparatorChar}{Path.DirectorySeparatorChar}file", "rptTest.rpt");

rpt.SaveAs("rptTest.rpt", Path.GetDirectoryName(path), (int)CdReportClientDocumentSaveAsOptionsEnum.cdReportClientDocumentSaveAsOverwriteExisting);
rpt.Close();

My problems are:

- I dont have a name of a RAS-Server
Without a name it is obvious not possible.

- How can I create a report without this RAS-Server?
In some Froumposts i did read it is possible, but not how I can manage this.

- Are there Tutorials available on how to adjust new created reports? Like how to add Sections, Groups, ...?


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    May 05, 2017 at 10:00 AM

    Hi,

    I did find a Solution.

          // Create new Report
          var newRptRd = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
          var newRptRcd = newRptRd.ReportClientDocument;
          newRptRcd.New();
    Add comment
    10|10000 characters needed characters exceeded

  • Mar 31, 2017 at 07:31 PM

    You can use CR for VS inProc RAS. You can get it from here:

    https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

    First link to integrate into VS all others are for Redist only, do not install them on your DEV PC.

    If you want to connect to a BOE Server then you need to get the .NET SDK from SMP with your log on info for your support contract.

    CR for VS does not connect to BOE.

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 03, 2017 at 04:20 PM

    Hi Don,

    we already use a embeddet version of CR in VS.

    We did create all of our reports with the embeddet CR-Designer.
    Currently we are using a server-less RAS version, consequently we dont have a RAS or a BOE server.

    All i wanna now is:

    1. Is it possible to create a report without the help of the Designer?

    2. How can I create a new Report without a RAS/BOE server, as well?


    There must be a solution.

    Or doesn't our version offer this possibility?

    Add comment
    10|10000 characters needed characters exceeded