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

Data is invisible in PDF exported by telerik report using code

4 Answers 42 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chetan Pawar
Top achievements
Rank 1
Chetan Pawar asked on 19 Jan 2010, 07:42 AM
Hello All,

I have observed that if user set color to text box object and/or background color to report. Data won't be displayed in exported report.
In my scenario report header has default color and data with blue color. When I export report in PDF, All outlines and heading get displayed, but records do not get displayed. Its a serious matter. Please let me know is there any workaround is available for this issue.

Also when I export report to rtf format then rtf file contains "Black" text color and no background color

Please provide help if any work around available.


Thank you in advanced


4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 21 Jan 2010, 02:47 PM
Hi Chetan,

If such a problem existed, then we would be swarming with support. In short you are the first to report such a problem and we would need more details or best a runnable report that we can test on. Please open a support ticket and send us a sample that replicates the issue you talk about.
As for the RTF missing background color - this is expected. As noted in the Design Considerations for RTF Rendering help article, Background Color is not supported in RTF (format specifics).

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Chetan Pawar
Top achievements
Rank 1
answered on 22 Jan 2010, 08:32 AM

Hi,

 

Empty PDF generating special case is as follows:

 

-          Applying color to text box as:

 

txtcolumnDetails.Style.Color = Color.FromName(“#aabbcc”);

 

-          Report get generated and text color is same as defined.

-          When exports report to PDF file PDF shows empty.

If

-          Color to textbox is applied with following format

-          txtcolumnDetails.Style.Color = ColorTranslator.FromHtml(“#aabbcc”);

OR

txtcolumnDetails.Style.Color = Color.FromKnownColor(KnownColor.Blue);

-          Then report gets generated and text color is same as defined. And exported report also get data withj same color specified.

 

Now I have used txtcolumnDetails.Style.Color = ColorTranslator.FromHtml(“#aabbcc”); method to set color and issue has been solved.
0
Accepted
Steve
Telerik team
answered on 22 Jan 2010, 08:59 AM
Hi Chetan,

This is not a problem with Telerik Reporting but rather the expected behavior. As described in the MSDN article Color.FromName Method, it accepts a string that is the name of a predefined color. Valid names are the same as the names of the elements of the KnownColor enumeration.
If you want to set a hex color value, you should use ColorTranslator.FromHtml() like you've pointed.

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Chetan Pawar
Top achievements
Rank 1
answered on 22 Jan 2010, 09:18 AM
Hello Steve,

Thank you for giving details.
I have understood the cause, and this is not bug.

Thanks again.

Tags
General Discussions
Asked by
Chetan Pawar
Top achievements
Rank 1
Answers by
Steve
Telerik team
Chetan Pawar
Top achievements
Rank 1
Share this question
or