2 weeks ago
Hello
I am currently working on a project using Crystal Reports 13 (CR13) with .NET, and I have encountered some limitations when trying to dynamically modify reports at runtime. In particular, I am looking to replicate certain functionalities that were achievable in Crystal Reports 9 (CR9) with VB6, but I am finding that the same flexibility does not appear to be available in CR13.
In CR9 with VB6, we were able to dynamically add FormulaFields, modify grouping and sorting options, and even insert new objects (such as text fields and field objects) into the report at runtime, all based on the data received. This allowed for highly customizable and dynamic reports. However, in CR13, I am struggling to achieve similar outcomes. Specifically, I would like to know:
Is it possible in CR13 to add FormulaFields dynamically at runtime, or must all formula fields be predefined in the report template?
Can I dynamically add new fields or objects (such as text objects or field objects) to a report at runtime in CR13, as was possible in CR9 using the COM-based API? If not, could you please confirm the limitations in CR13 around runtime modifications to report structures?
Is there any official documentation or guidance available that details the exact limitations and capabilities of runtime report customization in CR13 compared to earlier versions (such as CR9)?
I appreciate your assistance and look forward to your guidance on these questions.
Hi Anna,
Yes can add formulae and other CR objects in .NET.
What you look for is the *Controller using RAS
CrystalDecisions.ReportAppServer.Controllers.FormulaFieldControllerClass
Work would be get all Formula fields using ForNext()
Then Clone the collection then FormulaField.Add
Same for any other object.
To get you started download my example test app:
how-to-parameters-in-crystal-reports-for-visual-studio-net
You can see in the drop downlist box for objects how to get them and display them, modify to use the .Add() function
Go here to get the API reference Guide:
https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354091173.html
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.