Telerik Forums
Reporting Forum
1 answer
112 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
133 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
159 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
380 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
135 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
155 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
1 answer
161 views
I am trying to build a query with a parameter in it and get the following error
"Must declare the scaler variable"

I am using Visual Studio 2008 and telerik reporting Q3
could someone please tell me how to get around this problem
my query string looks like this

SELECT     ProNumber, HoldCodes, Ship, Pieces, Weight, SkidSpaces, SrprhID
FROM         RouteDetail
WHERE     (SrprhID = @Param1)

the excution of the query works fine
thanks
Pete
Steve
Telerik team
 answered on 21 Apr 2009
1 answer
101 views
Hello,
In my application report is being exported successfully in CSV format. But in Excel or any other format, the exported report only shows the title. The data being fetched from database is not displayed in exported report.

For your kind information i have read your help and found something to export reports in pdf and image format.
But the problem is that, in my application the error occurs of "Telerik.Reporting.Processing" namespace.
If i include it then it gives me error of "Telerik.Reporting.Report".

So i kindly request you to provide some suggestion.

Regards,
Ridhz
jain
Top achievements
Rank 1
 answered on 21 Apr 2009
12 answers
651 views
as i read in the forum there is currently no control that supports table view so i have to build it on my own.

i have lists of columns, rows and values and want to create a table out of this using a subreport.
some fixed data is already bound correctly and displayed in the subreport using the NeedDataSource Event in the master report.
because the columns are not fixed i can not use the usual approach in defining all columns and then create the table in the detail section. what is the best approach to get this subreport? should i completly create the report at runtime?
or create the report but add the textboxes manually at runtime?
where do i have to place my code so that i am having the datasource of the subreport and can add my fields according to it?


Steve
Telerik team
 answered on 21 Apr 2009
0 answers
79 views
Hi,
 Can u pls help me out in exporting report into CSV format.
Have got lots of prob in it.


Thanks & Regards
Stella
jain
Top achievements
Rank 1
 asked on 21 Apr 2009
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?