Skip to Content
avatar image
Former Member

FieldObject copying, with RAS, incomplete. Possible API error?

Hi everyone,

I'm in process of programmatically copying many reports, cause my company has some issues with older ones.

If I'm duplicating a formulafield, for my new report, everything is copied correct, except the textinterpretation condition formula. Every other reportobject is copied completly! Why is, in the formulafield paragraph segment, a conditionformula missing? But all other conditionformulas, or settings in common, border or font are duplicated correctly.
I've looked around and i can even set the textinterpretation-property but not the textinterpretation condition formula.

Setting this condition by hand is no option cause one report has at least 20 to 30 formulafields.

I found a post from 2010 where someone had a similar problem. But 3 Versions prior. Is there a solution now with CR Version 13? When not, why is the process of duplication incomplete with a formulafield?

I'm copying like the procedure mentioned here:

I would appreciate any help.


In use:
- SAP Crystal Reports for Visual Studio 2017
- Crystal Reports Version:
- I'm using the in proc RAS API

1z9az.png (10.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 15, 2017 at 05:01 PM

    You really don't need to duplicate the report. Printing does work and I've spent a lot of time doing so and testing.

    How about testing with my printer test app and see if that works for you?

    Printing Crystal Reports in .NET

    Forums is the bottom of the list of things to do. I don't have time right now to test this again.

    Printing does work as well as selecting the colour option. You need to use PrintOutputController API

    That I have tested and it does work.


    Add comment
    10|10000 characters needed characters exceeded

  • Nov 06, 2017 at 02:41 PM

    I had time to test this on friday. I have not been able to find a way to get the text so I pinged DEV for an example or how to and he was busy so possibly tomorrow....


    Update: We found some older Escalations and discovered it is not possible to get String condition formula, numbers do work.

    R&D OK'd to create a case and get this Enhancement done. They will look into seeing if it's possible and add if they can.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you for testing and keep on answering.

      "R&D OK'd to create a case and get this Enhancement done. They will look into seeing if it's possible and add if they can."
      will you update again if you get an answer, please.


  • Oct 27, 2017 at 06:09 PM

    Hi Jessica,

    Can you send the report? you need to find a FTP server, we don't have one.

    See if this returns them?

    btnReportObjects.Text = "";
    flcnt = 0;
    Errorcnt = 0;

    foreach (CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject reportObject in rptClientDoc.ReportDefController.ReportObjectController.GetAllReportObjects())
    var reportSection = rptClientDoc.ReportDefController.ReportDefinition.FindSectionByName(reportObject.SectionName);
    for (int index = 0; index < reportSection.Format.ConditionFormulas.Count; ++index)
    var formula = reportSection.Format.ConditionFormulas[(CrystalDecisions.ReportAppServer.ReportDefModel.CrSectionAreaFormatConditionFormulaTypeEnum)index];
    var NewFormula = reportSection.Format.ConditionFormulas[(CrystalDecisions.ReportAppServer.ReportDefModel.CrSectionAreaFormatConditionFormulaTypeEnum)index];

    if (formula.Text != null)
    textBox1 = "Condition Formula: " + formula.Text.ToString() + "\n";
    textBox1 += "Section " + reportSection.Name + "\n";
    btnReportObjects.Text += textBox1;
    btnReportObjects.AppendText(" 'End' \n\n");
    textBox1 = "";
    btnCount.Text = flcnt.ToString();
    catch (Exception ex)
    btnReportObjects.Text += "\nException: " + ex.ToString();
    btnErrorCount.Text = Errorcnt.ToString();


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Don,

      our original problem lies with printing reports.
      In our application we are still using the RCD api. Some customers encountered a strange behaviour with reports, where they could change any colour options but they weren’t printed out.

      For example, a customer wants an invoice to be printed in black and white, since his printer colours are nearly empty. He checks the no colour print option, but the printer prints the report still in colour. We did check where this behaviour could come from, it seems like the report is saving some printing information even if we check the “no printer” option in the report (like from the default printer). The issue doesn’t occur if we print with the CR Designer, but not all of our customers want to open them.

      Our problem is similar to this post. We do not have the workers do integrate the new .Net api so we try with fixing issues. May with the tool I am creating we gain enough knowledge to solve our problem or to upgrade to the new api … but that’s far away.

      For the last past months I researched the .Net api. With the report printoptions, or paperorientationoptions I didn’t find a solution. Like the information I was searching for is not accessible. However, with creating a new report from scratch I’m able to solve our issue.

      Pls answer my original question, you would help me a great deal.

      Thanks again.