Telerik Forums
Reporting Forum
2 answers
354 views
Simple question: How do I set the datasource of a report at runtime. I want to only display one record. (There is also a subreport in the report). This is a Windows forms app, so it would be displayed in the Windows forms viewer.


Sekar
Top achievements
Rank 1
 answered on 22 Apr 2009
1 answer
99 views
I have one report, while designing, that gives me an error when I click on the "..." button in the Value property of a control.  The error is:

"Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

Could there be something wrong with my report to cause this error?  I am not sure how to find out what it thinks is wrong.

Steve
Telerik team
 answered on 22 Apr 2009
1 answer
99 views
When the angle is set to 90/270 in the Telerik.Reporting.Textbox control then the TextAlign = Center doesn't work.
Steve
Telerik team
 answered on 22 Apr 2009
2 answers
138 views
I wrote a few times and got some explanations back, I understand parts of them, I have watched the Telerik reporting webinar, and he did talk about passing parameters, but using the UI part for filtering, I do not want that part.

I am using the Q3 reporting tools.
this is what I need, I have a web page that display's a report in a grid, when the user clicks on a button I would like to send that ID to a report to display in a report viewer, so the user can have many options for dealing with the report.

please explain to me, how I set up the report viewer, how I Pass the parameter(s) to the report class so I can call my business class to create my collection to be on the report.

or guide me to documation that explains this or a video, would be great.

thanks, I am just getting so fustrated with this.

Pete
Pete Haberstroh
Top achievements
Rank 1
 answered on 22 Apr 2009
1 answer
147 views
Hi,

I have a report with some HtmlTextBox'es that I hide if they contain no data. This works fine in the ReportViewer and when exporting to Excel and RTF but when exporting to PDF I just get a blank page.

This is the code I use for hiding the textbox and the corresponding label:

internal static void HideEmptyHtmlTextBox(HtmlTextBox htmlTextBox, Telerik.Reporting.TextBox labelTextBox)  
{  
    if (htmlTextBox.Value == null || ((string)htmlTextBox.Value).Trim() == "")  
    {  
        htmlTextBox.Visible = false;  
    }  
 
    if (!htmlTextBox.Visible && labelTextBox != null)  
    {  
        Telerik.Reporting.Processing.ReportItemBase itemBase = ((Telerik.Reporting.Processing.ReportItemBase)htmlTextBox.Parent);  
        Telerik.Reporting.Processing.TextBox label = (Telerik.Reporting.Processing.TextBox)itemBase.Items[labelTextBox.Name];  
        label.Visible = false;  
    }  
}  
 

If I use a normal TextBox instead it all works fine!

Another problem is that "bold" and "italic" text isn't shown as bold and italic in the pdf just as normal unformatted text?!

What's wrong and how do I solve this?

Thanks,
Brian
Steve
Telerik team
 answered on 22 Apr 2009
2 answers
163 views
Hi,
I am new to telerik products so excuse me if this is a simple / faq question.

I am building my reports using my own custom strongly typed collections, etc. This works great.

This custom collection class is located in another project, thus it's a project reference. ( I followed the documentation suggestion of using a special report project which i totally agreed).

My only problem is that in the preview is not working giving the following error: Could not load file or assembly [BoLayer.dll ] which off course is my own dll.

How can I fix this? (don't tell me to add the dll to GAC because that's not an option). Is there a way to add a config file to include this dll reference so the previewer is aware of it?

Could it be because my DLL is not strongly named? (no assemblyinfo.cs)

What I think happens (if anybody cares. :) )
I think that the preview mode uses it's own ApplicationDomain and the dlls loaded into that domain are not included the current project references (which i think it should) or it's only using GAC.

Thanks in advance.
Christian
Top achievements
Rank 1
 answered on 21 Apr 2009
2 answers
190 views
I have watched Q1 video and searched all through the Product Per Sales Demo but can not seem to find any solution.

In my cross tab datasource I am selecting three fields (a, b, c from 3 joined tables). In my cross tab I want field A to be the rows header, field B to be the column header and field C to be the data. Which is fine except not all rows have a match for every column. So for each cell where there is not a match I get Object Reference error. How do I handle this, where there is no data for the intersection of the row and header?

-chabian
prismcarlson
Top achievements
Rank 1
 answered on 21 Apr 2009
1 answer
425 views
Hi there
    I have a situation in my report. I have Charts in the report header and also has detail section that shows the tabular report. And i want to turn the chart on or off, so i created a parameter to do that. Also the chart is set with a conditional formatting to set the Layout to false if the report parameter (Show Chart) is false.
Now comes the spacing issue that initially the report header have some fixed width to accomadate Chart and report tabular headings. And while turning the chart off and previewing it, it does the job by applying the conditional format and hides the chart image but the space accomadated by the chart is still there. I checked out the source code and looks like the emitted table rows for chart has one row used for showing the chart image and other rows for styling purpose. One of that style is set to have a fixed (300px) height and thats why i have long whitespace in the header.
I also tried to set some conditional formatting in the report header (on the paramter set to false) to reduce the height / margin so that dynamically report header changes its height, but the current reporting version doesn't have any support for that.

Question 1? How do i deal with dynamically changing the height of report header on Preview click
Question 2? Is there anyway to apply a custom css class on conditional formatting or in general to any report section
Comments? It will be good if we have Margins (allowing negative values), Height and Width available in the Style window
 
Hrisi
Telerik team
 answered on 21 Apr 2009
1 answer
155 views

Hi... 

   Sir with ur tips i have benifited a lot..

 Now i have doubt in set datasource as global for several reports., 

For example .,  Now i am using more that 40 reports in my project .. for that reports i have create the datasource using 

sqldataadapter from the tool box and passing parameters from the web forms., If i need to change the database means

at that time i need to change the datasource separately for all reports... 

Next i need help for same doubt in the style sheet also... i need to design all reports separately .. but for standard report 

i use external stylesheet but it is not working for me....

Yours 

S.Suriya 

Steve
Telerik team
 answered on 21 Apr 2009
2 answers
243 views
I have a bar chart in a report, and I'm trying to color some of the bars (red) if they are below a certain value.  The two options I am aware of for this are:

1) When NeedsDataSource is fired, populate my own ChartSeries as I iterate through a SqlDataReader.  This allows me to set the FillStyle.MainColor for each ChartSeriesItem I add, and I can set it to Red if I want.  HOWEVER, the short-coming here is that I see no way to control the XAxis labels for each data point, and I want them to display the associated date with each data point (they end up just being 1, 2, 3, 4, etc.).

2) In the NeedsDataSource event, set the DataSource to a DataView.  This also allows me to set the XAxis.DataLabelsColumn property so that I can appropriately label my XAxis.  HOWEVER, if I try to change the color of the bar in the ItemDataBound event by iterating through the series items and setting the color, it doesn't work.  The color never changes.  The color appears to be set the moment it is added to the chart, and is unalterable after that point.

Any solution to this dilemma?

Regards,
Scott

UPDATE: Okay, I have a solution.  It certainly doesn't seem elegant, but it works, but I would still like to know if there is a more direct route.  Seems like #2 above would be easiest, and just access the chart items once they've been added to change their color, but that doesn't seem to work.

The solution I came up with after reading this: http://blogs.telerik.com/blogs/08-06-20/formatting_radchart_labels.aspx

I set the XAxis.AutoScale to false, then manually add each of my ChartAxisItems and set the TextBlock.Text property to the text I want.  This certainly doesn't seem intuitive.

Is there a better way?
Scott
Top achievements
Rank 1
 answered on 21 Apr 2009
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?