Skip to Content

Change mapping of DataDefinitionFields with .NET API

Hi,


I want to change the Datasource of a Report.
I am changing the driver from Btrieve to SQL-Server.

This ist possible.

But many of the Table Names and Column Names are different between Btrieve and SQL-Server. So I want to change them via the .NET API.

For the Table Names it works, but I found no way to map the DataDefinitionFields (columns).
I tried to directly manipulate the Name property of the DataDefinitionFields, but this has no setter.
Also the FieldMapping event is not raised, instead all fields that cannot be mapped automatically are removed from the report.

Is there any way to achive this with the API, or do I have to make this manually with the Designer?

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Oct 31, 2019 at 04:10 PM

    Hi Alexander,

    Short answer is no, I've tried to use MS SQL to import Btrieve tables but as you know the data structure is so much different it's not possible.

    And in the SDK there is no field mapping event so it's not possible to do what you are doing in the SDK. As you noticed the engine just removes the fields.

    Only option is to do it in CR Designer, ODBC may be the easiest connection to use since ODBC is more flexible when connecting and field names may be mapped.

    Don

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.