Telerik Forums
Reporting Forum
11 answers
647 views

I created a report that contains a cell as an indicator (conditional formatting --> new rules --> If .... --> Background --< imagedata). When y try to export the report to excel format. The cell is emplty ?!! (it work when i export the report to pdf).

Any solution ?

Regards,

Diego
Top achievements
Rank 1
 answered on 01 Aug 2016
3 answers
2.6K+ views

Having read a number of posts here it does not appear that you can hide columns or rows dynamically.  Is there any plans on add this capability?

I have tried

performSubReportTable.Body.Rows[2] = new TableBodyRow(Telerik.Reporting.Drawing.Unit.Inch(0.001));

but neither the Rows or when I change to columns they do not resize.

I have a report that has a few sub-reports and these sub-reports have tables in them.  Depending on what account is being printed I want to dynamically show and hide specific columns and rows.  As of now it appears my only option is to either create multiple table with each possible combination of rows an columns and then hide and show the appropriate table  or create multiple sub-reports with each possible combination of rows an columns and then dynamically hide and show the proper sub- report.  It would be much nicer if I could create one sub-report with one table and then conditionally hide and show rows and columns, much like how SQL reporting works.

Frank
Top achievements
Rank 1
 answered on 29 Jul 2016
3 answers
185 views

I recently updated the Telerik.ReportViewer control from 9.0.something to 9.2.15.1126.  Since this update I have started noticing that the report-resolver is called multiple times (more than the previous version before) as now our database procedures (that fetch the data for the report) are being hit multiple times - ONLY for the first time a report is run.  Subsequent calls only call the data fetch once as before.

I was already aware that the Resolve method is called multiple times, and to stop it getting the data multiple times, I access the view model and check the ReportObject to ensure it is null before going to get the data - (resetting this to null every time user request to run the report).  So the first line in my resolver is:

If (viewModel.ReportObject == null)

{

  viewModel.ReportObject = FETCHDATA()

}

This would stop the data being fetched multiple times.  However, since updating to the 9.2.15.1126, the resolver seems to be hit twice instantly, the code has not had chance to set the ReportObject before resolver is called again....  What has changed?  And how do I stop this now?  Its putting heavy loads on databases unnecessarily and degrading overall performance of the server.

Could someone shed a light on this situation?

Katia
Telerik team
 answered on 29 Jul 2016
1 answer
1.0K+ views

My ObjectDataSource data is flattened as follows (simplified)

Year 1, Item 1, Attribute String {empty}
Year 2, Item 1, Attribute String {empty}
Year 3, Item 1, Attribute String {Some data I want to express as a detail record}

Year 1, Item 2, Attribute String {Some data to display for this detail record}
Year 2, Item 2, Attribute String {empty}
Year 3, Item 2, Attribute String {Some more data to display for this detail record}

Year 1, Item 3, Attribute String {empty}
Year 2, Item 3, Attribute String {empty}
Year 3, Item 3, Attribute String {empty}

I am grouping the data by item name (Item 1, Item 2, Item 3 in this example) and am displaying the item name in the group header. I would like to suppress group headers for items that do not contain any rows with an attribute string (similar to Item 3 in this example.)

I am able to suppress detail rows with empty attribute strings using conditional formatting Field.[Attribute String] = {blank}, Visibility = false.

However, I have not discovered how to suppress the group header.  Filtering the group header on Field.[Attribute String] <> {blank}, seems to only test the first detail row (returning only Item 2 in this example.)

Can anyone think of a way to suppress the group header for only Item 3 for the example data above?

Thanks in advance for any assistance you can offer.

Stef
Telerik team
 answered on 29 Jul 2016
1 answer
536 views

I have a Telerik Reporting Table in a report.  I am trying to dynamically set the width of first column but it never changes in the report.  Is there some sort of update or refresh method that I need to use?

 

report.calcTable.Body.Columns[0].Width = new Unit(100);

Stef
Telerik team
 answered on 29 Jul 2016
2 answers
76 views

I am now trying to hide hole table dynamicaly but I am having an odd issue

This will not work, none of the table show

var performSubReportTable = performSubReport.Items.Find("table1", true)[0] as Table;
var performSubReportTable2 = performSubReport.Items.Find("table2", true)[0] as Table;
 
if (show1 == 1)
{
    performSubReportTable2.DataSource = performanceDataSet;
    performSubReportTable.Visible = false;
}
else
{
    performSubReportTable.DataSource = performanceDataSet;
    performSubReportTable2.Visible = false;
}

 

This works for the true but the false the none of the table show

var performSubReportTable = new Table();
if (show1 == 1)
{
    performSubReportTable  = performSubReport.Items.Find("table1", true)[0] as Table;
}
else
{
    performSubReportTable = performSubReport.Items.Find("table2", true)[0] as Table;
}
performSubReportTable.DataSource = performanceDataSet;
performSubReportTable.Visible = true;

 

but this does work

var performSubReportTable = performSubReport.Items.Find("table1", true)[0] as Table;
var performSubReportTable2 = performSubReport.Items.Find("table2", true)[0] as Table;
performSubReportTable.DataSource = performanceDataSet;
performSubReportTable2.DataSource = performanceDataSet;
if (show1 == 1)
    performSubReportTable.Visible = false;
else
    performSubReportTable2.Visible = false;

I would prefer if the second method since it is cleaner, but I am not sure why the first two ways wont work. 

Then big difference is the first and the third I set the tables to be visible on the report.  The second method I set the table visibility to false on the report.

Stef
Telerik team
 answered on 29 Jul 2016
1 answer
119 views
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
Katia
Telerik team
 answered on 28 Jul 2016
1 answer
470 views
I have a report that is one page long. When I go to print preview or print it, a second page is printed with just the page header on it (no details).
Stef
Telerik team
 answered on 28 Jul 2016
1 answer
115 views
What level of accessibility does the HTML 5 viewer or the legacy web form report viewer strive to achieve? I had a quick look at the Help for reports but cannot seem to find anything.
Stef
Telerik team
 answered on 28 Jul 2016
1 answer
91 views

is it posible to disable automatic autosize in visualstudio editor?

i mean resizing of parent control if add new control which size is larger the parent control?

Stef
Telerik team
 answered on 28 Jul 2016
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?