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

TextBox value missing when export to PDF or other format

3 Answers 257 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Karlkim Suwanmongkol
Top achievements
Rank 1
Karlkim Suwanmongkol asked on 10 Apr 2011, 10:21 AM
Hi Telerik,
     I have a Silverlight Report Viewer which uses NeedDataSource to generate vaule for TextBox and bind DataSource of several tables in the report. When viewing the report in Silverlight viewer, all data have been populated correctly. However, the exported PDF (or other format) won't have value in the TextBoxes, but the data in the tables are displayed correctly.

This is how I assign values to TextBox and table's DataSource.
fullName.Value = p.FullName;
educationTable.DataSource = eduList;











The first value is assigned in the Report Viewer but not in exported PDF. The second line works fine in
both Report Viewer and exported PDF.

Do you know if I might miss anything?

Thanks,
Karlkim

3 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 11 Apr 2011, 02:26 PM
Hello Karlkim,

The NeedDataSource event of the report should be used only for providing data source and nothing else. It is fired only if the report has no data source set and once set, it is cached and not invoked a second time unless it changes based on report parameters.
If you have a need to change or set a TextBox value programmatically, you should do this in the ItemDataBinding event of the report instead.

All the best,
Steve
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Karlkim Suwanmongkol
Top achievements
Rank 1
answered on 16 Apr 2011, 08:21 AM
I might not explain very clearly. The issue that I experience is that the value in the report viewer is different from the one in exported PDF. I attach screenshots showing the issue. You can see that the first TextBox value is different, but the TextBox in List does not have the issue.

I will also create a support ticket, so I can attach a sample project.

0
Steve
Telerik team
answered on 18 Apr 2011, 04:40 PM
Hello Karlkim,

My previous reply is valid for your scenario as seen from the project you've sent. Please use ItemDataBinding event instead of NeedDataSource.

Kind regards,
Steve
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Karlkim Suwanmongkol
Top achievements
Rank 1
Answers by
Steve
Telerik team
Karlkim Suwanmongkol
Top achievements
Rank 1
Share this question
or