Set width of matrix columns dynamically

Posted by: cyndichatman on 3 August 2017, 6:01 am EST

  • Posted 3 August 2017, 6:01 am EST

    Is there a way I can dynamically set the width of a matrix column? I tried to write a functon, then set the width property of the matrix column to =Code.GetColumnWidth, but I am getting an error message



    "Invalid expression. Literal expressions for this property must be of type length"
  • Replied 3 August 2017, 6:01 am EST

    Hello,

    I would like you to know that case 129382 is still open but I do not have an ETA for the same.

    Thanks,
    Manpreet Kaur
  • Replied 3 August 2017, 6:01 am EST

    Has there been any progress to this case?



    Thanks,

    Nick
  • Replied 3 August 2017, 6:01 am EST

    Unfortunately the width of a matrix column must be a constant value.  This is something inherited from the RDL standard, however I've entered case 129382.

    I do not expect the team to take up this case soon as there are likely many implications such a change could involve with regards to laying out the matrix data region.

    Could you explain how you expected to change the width of the column at report runtime?  Did you want to pass in a field value?  What if we added the ability to size the column to the width of the largest item?
  • Replied 3 August 2017, 6:01 am EST

    If you look at quickbooks, you can drag the column header for each column and change the size of each column. I was thinking of having an edit box where the user can change the width of all columns at one time. Then pass the width in as a field value.
  • Replied 3 August 2017, 6:01 am EST

    Has there been any progress on case 129382 above? We have a situation where we have a numeric column in a matrix that can contain data with several different decimal precision settings. We are setting the decimal precision shown based on another field on the record, and it could be anything from one decimal place to thirteen with a large whole number value.



    We'd really like to be able to set the column width at runtime. It would be nice if they could be set individually, but did you ever implement the functionality to size the column by the largest item as suggested above?



    -Jason
  • Replied 3 August 2017, 6:01 am EST

    Hi Nick,



    This is not something we will be implementing in DDR. It may make an appearance in ActiveReports 7, however I cannot guarantee that.



    As a work around to setting a custom width you could take those values that you are passing in at runtime and use those to edit the ReportDefinition to adjust the matrix column widths. It changes the complexity a little bit, but it is something that can be implemented today.



    We do have a feature in ActiveReports 7 that allows you to let the text auto-size itself so that it will fit in the table/matrix cell without wrapping. It is called ShrinkToFit.



    James
  • Replied 3 August 2017, 6:01 am EST

    @JamesJohnson, what exactly do you mean by "As a work around to setting a custom width you could take those values that you are passing in at runtime and use those to edit the ReportDefinition to adjust the matrix column widths"? Can you elaborate on this?

    Are you talking about in the application code? Or is this something we can do in the rdlx code section?

    Our preference would be an rdlx change that could accommodate this work around. Is this possible?

    Thanks!
    John
  • Replied 1 October 2018, 7:48 pm EST

    QuickBooks Support Expert is a US based online platform specializing in all relevant information to QuickBooks Software. QuickBooks Support provides extensive information on QuickBooks Mac, Desktop, Enterprise, Online, Point of Sale, Payroll and errors.

    A team of certified QuickBooks Pro Advisors is available around the clock to assist on various QuickBooks Software. QuickBooks Support Experts masters in giving comprehensive assistance to SME’s on affordable prices. It has vast experience in handing customers. For comprehensive and easy solutions log on to quickbookssupportexpert.com or speak to Highly professional and customer friendly staff to help on any QuickBooks related query.
Need extra support?

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

Learn More

Forum Channels