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

Basic Question

1 Answer 69 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 1
Pierre asked on 28 Jul 2016, 07:20 AM
Hi,


I have a hierachical Grid with 25 datasource for inner grid.
A lot of them are set  visible = false if they have no data.


I must export them to pdf. But I need page footer header with different layout base on the User.
And i had hard time trying to export them using the documentation .


This is my 1rst time using the telerik report.
So i will ask so simple stupid question, to learn what i must do and where i m going with this.
So question may evolve.



1/. Is it possible to have conditional element?
I saw conditional formating but what i want to achieve seems a bit more difficult.
 - Exemple: Displaying adress as in the invoice report template
If i have Adress 1, 2, 3, 4, 5 .
If i Create text box Label and Value and stack them , How can i make them hidden if there is no value?
If instead i concatenate the adress in SQL , How do i Use my 'string.Replace("\r\n", "<br />")' ?


Is there a way to do stuff with out this WYSIWYG ?
 
 
2/. Is there a Way to have contidional table ?
I have a lot of nested grid I hide them if they are empty.
How can i do that in a report? Is the report going to save some room even if the element is hidden ?
Is there a way to bind the grid to the page in code behind ?


3/. Is there any code behind somewhere i can write some control logic ?


4/. How to achieve Condition Layout ?
An other logo , change Blue to red , an other companies name ?
Can I store all of this in DB and Get the images text or color form it ?



I know i have a lot of question. You dont have to answer them all.
You can pick one and go in deept. Or just a list of  { "yes", "no" , "NotThatWay" }.


The only thing i need to know is :
 Is this possible to achiev it with Telerik report ?
 
I will do all the research i just need to be in the right direction!
 
 Thank you for your time.
 
 Regards,
 Pierre LEBON

1 Answer, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 28 Jul 2016, 01:44 PM
Hi Pierre,

The code library project you referenced relates to RadGrid control that is part of UI for ASP.NET AJAX. In Telerik Reporting, for displaying the data in a table layout you can use Table/CrossTab/List item. It is a Data item that can also contain inner data items.

You can show/hide/apply different styles to the report items dynamically using conditional formatting rules or bindings - check this forum post for more detailed information.

To avoid empty space after some items are hidden you can follow the approach suggested in Collapse the container when hiding child report items kb article. The main idea is to set container's height in the designer to a very small value. It will automatically grow to fit its content.

In general, it is not recommended to change the report definition at run-time. In case, there is a specific need to create the reports with code, it is recommended first to test your scenario in the Designer and then review the automatically generated code in .Designer.cs(vb) file that you can use as a sample and modify according to your requirements.


Regards,
Katia
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Pierre
Top achievements
Rank 1
Answers by
Katia
Telerik team
Share this question
or