Migrate C1Report to C1FlexReport with Graph

Posted by: rafael.mercado on 4 March 2019, 10:43 am EST

    • Post Options:
    • Link

    Posted 4 March 2019, 10:43 am EST

    Hi,

    I’m trying to migrate a report with a graph pointing to a custom control (); how these graphs can be migrated to flex report library?

    When rendering, the graph is not loading, but the rest of the report works fine.

    https://imgur.com/a/UYdb4Jj

    Report definition attached.

    report_to_update2.zip

  • Posted 5 March 2019, 4:20 am EST

    Hello,

    Thanks for sharing your report. However, as I do not have your data source, I used a sample C1Report at my end, converted it to FlexReport and observed that the chart gets migrated properly, without any issues. Kindly refer the same and set the related properties for your report’s ChartField, while the report is bound. In case the issue persists, share the dummy data along with your FlexReport.

    Further, in a FlexReport obtained from your report, I added unbound data for the ChartField and observed the chart while previewing the report, without any issues. I have attached the same as well.

    Regards,

    Esha

    Reports.zip

  • Posted 6 March 2019, 12:49 pm EST

    Hi Esha, I noticed that our reports are using the onPrint event in order to change the query that the chart is using to generate the graph, do you have any example of this behavior using flexReports?

    field22.recordsource=mydata

    I saw the .recordsource is not a chart property any more and I made the change to datasource but it does not work yet.

  • Posted 6 March 2019, 5:36 pm EST

    Hi Esha, another error we are facing and we are not sure how to fix is the "Could not group data, possible one of grouping expression contains an error, exception: Unable to cast object of type C1.Win.FlexReport.Group to type System.IComparable.

    We see the error in the flex designer app and when generating the report via c# code.

    The report works fine with the old c1report designer app.

  • Posted 6 March 2019, 5:36 pm EST

    report_error_grouping.zip

    Report design attached.

  • Posted 7 March 2019, 7:09 am EST

    Hello,

    As you know that RecordSource cannot be set at chart level, you can still set the DataSource property of the field in the Header.OnPrint property:

    Field1.DataSource="DataSource1"
    
    

    I have attached the modified report for your reference. However, as per proper report layouts, I would suggest you to set the DataSource of the Field in GlobalScripts property of the report.

    As I do not have your data, I can presume that the issue occurs because of some invalid comparison in the grouping scenario. Please try modifying the code under “Customer ID Footer.OnPrint” and “CustID2_Header.OnPrint” properties at your end to see if the issue is resolved in Flexreport. Note that there are some differences among the two reports because of which the issue might only be occuring in FlexReport. However, I cannot comment on it further without replicating the issue at my end. For this, you can either modify the attached report or share your dummy data.

    In case you wish to provide data privately, you can create a ticket on SupportOne: https://supportone.componentone.com

    Regards,

    Esha

    ChartInGroupHeader_mod.zip

Need extra support?

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

Learn More

Forum Channels