Printing from TrueDBGrid

Posted by: connellyj on 26 March 2018, 3:11 pm EST

    • Post Options:
    • Link

    Posted 26 March 2018, 3:11 pm EST - Updated 4 October 2022, 1:25 am EST

    I am currently using Visual Studio 2017 with WinForms (4.0.20181.296). In the past (VS2015 Winforms(4.0.20172.271)) I was able to print from a TrueDBGrid using the .printpreview method. Now I get

    I have no .2 files in my project. I also cannot find a C1.C1Preview.2 or C1.Win.C1Preview.2 in the WinForms /bin.

    This worked in the past with no additional files. Please advise.

  • Posted 27 March 2018, 12:57 am EST

    Hello,

    Please add the “C1.C1Report.4” and “C1.Win.C1Report.4” dll’s in your application to use the ‘PrintPreview’ method. These are the necessary dll’s to use some feature of C1TrueDBGrid. It’s very strange that your project runs successfully without having these dll’s in past.

    Hope it helps.

    Thanks,

    Mohit

  • Posted 27 March 2018, 1:41 pm EST

    I have added both as references in my project but it is not copying the C1.Win.C1Report.4.dll to the bin folder. I added it as a file to the overall project in my solution. Now both files are there but the print window does not open. it locks up the form with the grid.

  • Posted 28 March 2018, 12:34 am EST

    Hello,

    I am unable to replicate the issue. Could you please share the stripped down the application to replicate the issue at my end.

    Also, make sure that version of dll’s of C1 should be same in your application.

    Sorry for the inconvenience caused.

    Thanks,

    Mohit

  • Posted 28 March 2018, 8:38 am EST

    Attached is a subset of my solution. I did notice the version listed in the .vbproj is different from the file I selected for C1.Win.C1Report.4.dll. But the file in the bin folder is the latest version.

    The project opens a sqlite database and loads a grid. When I select the Print menu item the project locks up. I am using Visual Studio 2017 on Windows 10 with ComponentOne (4.0.20181.296) and SQLite 1.0.108.0.

    TDBGridPrint.zip[img]https://gccontent.blob.core.windows.net/forum-uploads/file-170f2f58-e00d-4039-a79d-1d2e8ecc9b89.JPG[/img]

  • Posted 29 March 2018, 12:51 am EST - Updated 4 October 2022, 1:26 am EST

    Hello,

    Issue is not reproducible at my end with your application. It works fine. Please refer the attached image. It seems to some installation problem on your system. Are you using “C1Live” to update the C1Studio. Could you please replace the all C1 dlls present in “C:\Program Files (x86)\ComponentOne\ASP.NET Web Forms Edition\bin\v4” folder with latest dlls present in “C:\Program Files (x86)\ComponentOne\WinForms Edition\bin\v4.0”

    Hope it helps.

    Thanks,

    Mohit

  • Posted 29 March 2018, 11:05 am EST

    That worked! Thank you very much

  • Posted 19 February 2019, 12:34 pm EST

    Hello Mohit,

    I run into the same error after migrating my project from C1Report to FlexReport (big task!) after the announcement that C1Report was made obsolete. I removed those dll’s from my solution and now I have to include them again!

    I considere this a bug. This functionality should work after the migration or be replace for another one.

    Thanks.

  • Posted 20 February 2019, 12:39 am EST

    Hello,

    “C1.C1Report.4” and “C1.Win.C1Report.4” dlls are not required while working with C1FlexReport. There might be a possibility that an instance of C1Report remains in your application and to justify the same, the dlls are required. Please check the same.

    If that’s not the case, kindly share a screenshot of the exact error, References in Solution Explorer and details of the controls used in your application.

    Regards,

    Esha

  • Posted 26 March 2019, 1:26 pm EST

    Hi all, “C1.C1Report.4” and “C1.Win.C1Report.4” dlls are required if you need to use TrueDBGrid printing. TrueDBGrid uses these assemblies via reflection, so it might be not obvious.

Need extra support?

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

Learn More

Forum Channels