This is a migrated thread and some comments may be shown as answers.

Items of the report always hidden

5 Answers 33 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
NiccoMlt
Top achievements
Rank 1
Veteran
NiccoMlt asked on 09 Feb 2021, 11:38 AM

Hello,
I'm currently converting an old proprietary reporting system to Telerik.

To convert the legacy reports, I programmatically build a Telerik Report and map each property from the legacy domain model to the Telerik one; this approach works, but I'm experiencing problems with visibility property.

In particular, I need to define blocks of report items that can be shown/hidden accordingly to an expression that depends on data from the DataSource; my approach is:

  1. define each row of the legacy report as a Telerik Reporting TextBox with CanGrow and CanShrink properties enabled, an Height of 1pica and Docking set to Top; I do not set any position for the row, because as I understood correctly, docking to top automatically stacks the items.
  2. define a Telerik Reporting Panel for each group of rows that I need to control visibility of; the properties set are the Height (which is set as the Height of all the contained TextBoxes), the Docking (which is set to Top) and the Bindings (which binds the "Visibility" path to a user-defined expression that returns a boolean); I do not set any position for the panel neither, because as I understood correctly, docking to top also skips hidden items when stacking items.
  3. add the rows to the panel, and the panels to the report section.

I actually tried both Binding (like said above) and Conditional formatting, but the panels are always hidden (even if I force my user-defined expression to return true or false). What am I doing wrong?

5 Answers, 1 is accepted

Sort by
0
NiccoMlt
Top achievements
Rank 1
Veteran
answered on 10 Feb 2021, 10:37 AM
Update: I also tried explicitly specifying a position for the TextBoxes making them not overlapping, but without result.
0
Accepted
Todor
Telerik team
answered on 12 Feb 2021, 08:25 AM

Hello NiccoMlt,

Indeed, when you use Docking the location and size of the item is auto determined based on its container - Automatic Layout (Dock and Anchor).

The scenario seems complicated and I cannot diagnose the issue without reproducing it. Feel free to open a support ticket and send us a runnable report that demonstrates the problem for local investigation.

Regards,
Todor
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
NiccoMlt
Top achievements
Rank 1
Veteran
answered on 12 Feb 2021, 03:12 PM

Hi Todor, thanks for your answer. I tried to enforce a size (by also specifying the Width of the TextBoxes along with the Height) and now it seems to show the rows!

Apparently, without an explicit the rows were generated with 0 width, and they didn't grow automatically even if both CanGrow property and the Docking were set.

Now the only problem I am experiencing is related to report sections that don't grow accordingly to content, but I think the problem is not related to this topic, isn't it?

 

0
Neli
Telerik team
answered on 17 Feb 2021, 10:25 AM

Hi NiccoMlt,

May I ask in which report sections the problem is reproducible? You can check the CanGrow and CanShrink settings of these sections. Please, consider sending us the problematic report with some sample data in CSV or JSON format, so we can inspect it locally.

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
NiccoMlt
Top achievements
Rank 1
Veteran
answered on 18 Feb 2021, 08:41 AM

Hi Neli, thank you for your answer.

I will certainly send you a sample report to check up, but it requires some work, because the converter that I implemented generates reports that heavily depend on user-defined functions, and also the data source is only built and attached at runtime, so it needs to be adapted.

Also, I saw that you also answered me here, so I think it is better to continue there. Thank you again for your help.

Tags
General Discussions
Asked by
NiccoMlt
Top achievements
Rank 1
Veteran
Answers by
NiccoMlt
Top achievements
Rank 1
Veteran
Todor
Telerik team
Neli
Telerik team
Share this question
or