Update to

Posted by: Ranba790 on 13 October 2024, 7:01 am EST

    • Post Options:
    • Link

    Posted 13 October 2024, 7:01 am EST - Updated 13 October 2024, 7:06 am EST

    Hi.

    I have updated my application to use the controls 4.8 version from 4.5

    i am having an issue with this

    Friend WithEvents C1PrintDocument1 As C1.C1Preview.C1PrintDocument

    that generate this error

    ‘C1PrintDocument’ is ambiguous in the namespace ‘C1.C1Preview’.

    For some reason there is no C1.win,C1Report version 4.8. i added instead C1.PrintDocument.4.8 and C1.WIn.PrintPreview4.8

    Thanks

  • Posted 15 October 2024, 2:05 am EST

    Hello,

    Earlier, when our C1Report control was not legacy, the C1PrintDocument component was included in the C1.C1Preview namespace of the C1.Win.C1Report DLL. After C1Report became legacy and was replaced by C1FlexReport, the C1.Win.C1Report was subdivided into two assemblies, one for C1PrintDocument (C1.C1PrintDocument) and another for the legacy C1Report (C1.C1Report).

    For backward compatibility, some of the namespaces are still present in C1.C1Report dll, one of which, C1.C1Preview, contains the C1PrintDocument component. Therefore, both C1.C1Report and C1.PrintDocument DLLs contain the C1PrintDocument under the same namespace, and if you reference both DLLs in your project, it will result in an ambiguity error.

    To resolve this:

    1. If you are using the C1Report component, keep the C1.C1Report DLL and remove the C1.PrintDocument DLL.
    2. If you are not using the C1Report component, keep the C1.PrintDocument DLL and remove the C1.C1Report DLL.

    If the issue persists, please share a stripped-down sample containing the C1Controls and the corresponding C1 assemblies you are using in your project that replicates the issue.

    Regards,

    Uttkarsh.

  • Posted 15 October 2024, 7:10 am EST

    Hi

    Thanks, it worked, end up using PrintDocument and PrintPreview, i removed C1Report

    Ran

  • Posted 22 May 2025, 7:27 am EST

    Hi Uttkarsh

    I experience a similar issue when updating from assemblies 20231.596 to 20242.700. When referencing both C1.C1Report and C1.PrintDocument assemblies I get multiple errors “… is ambiguous …”.

    Unfortunately when only referencing C1.C1Report assembly, I get the following 2 errors when code is referencing the PreviewPane Property of C1PrintPreviewControl:

    • Reference required to assembly ‘C1.PrintDocument.4.8, Version=4.8.20242.700, Culture=neutral, PublicKeyToken=944ae1ea0e47ca04’ containing the type ‘ExportProvider’. Add one to your project.
    • Reference required to assembly ‘C1.PrintDocument.4.8, Version=4.8.20242.700, Culture=neutral, PublicKeyToken=944ae1ea0e47ca04’ containing the type ‘ICollectionOwner’. Add one to your project.

    Both ExportProvider and ICollectionOwner exist in C1.C1Report assembly though.

    Please advise.

  • Posted 23 May 2025, 7:23 am EST

    Hello,

    If you intend to use both assemblies in your project, then you can use Alias for one of the assemblies.

    [Ref: extern alias (C# Reference) - https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/extern-alias]

    In the attached sample, we have set the Alias for C1.C1Report to** legacy** and used the fully qualified name to instantiate an object of C1Report.

    You can set Alias for an assembly by going to its properties and setting the Aliases property.

    Sample.zip


    If you still face any issues, please update the attached sample or share a stripped-down version of your project with all ambiguity errors for further investigation.


    FYI, C1Report has been obsolete since 2018. And we plan to remove it entirely in 2025v1.

    So, if you want to use this obsolete product, you should either use the old C1.Win.C1Report version that includes C1.Win.C1Preview.C1PrintPreviewControl or use a C# project to use aliases or move to the FlexReport.

    Regards,

    Uttkarsh.

  • Posted 23 May 2025, 8:57 am EST - Updated 23 May 2025, 9:02 am EST

    Hello Uttkarsh

    I do not intend to use both assemblies, but I get an error that a Reference is required to the PrintDocument assembly.

    This issue only appeared after trying to upgrade to 20242.700.

    Is there any way to change the code so only C1.C1Report assembly is needed when using C1PreviewPane?

    Or what’s the latest version where the C1PreviewPane was not yet moved?

    Please see the supplied image:

    We are using both C1Report and FlexReport alongside, as we still have users using older reports. I’ll check internally, if these reports could be finally upgraded to FlexReport.

    Regards, Stefan

  • Posted 26 May 2025, 9:26 am EST

    Hello Stefan,

    Apologies for the inconvenience.

    We’re working on your query and will get back to you as soon as possible.

    Regards,

    Uttkarsh.

  • Posted 27 May 2025, 1:58 am EST

    Hello Stefan,

    The latest version to use C1.Win.C1Report would be 2023v3 build. If you still get any issues, please share all the lines of code along with the error you are getting so that we can look further into it.

    Furthermore, since your project is in VB.NET, it’s not possible to use both assemblies with Aliases—VB.NET does not support this feature. Unfortunately, there’s no alternative workaround in this case. We apologize for the inconvenience. You may consider downgrading your project or migrating your C1Reports to FlexReport for continued support and updates.

    Regards,

    Uttkarsh.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels