TextBox value missing when export to PDF or other format

4 posts, 1 answers
  1. Karlkim Suwanmongkol
    Karlkim Suwanmongkol avatar
    41 posts
    Member since:
    Aug 2012

    Posted 10 Apr 2011 Link to this post

    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

  2. Answer
    Steve
    Admin
    Steve avatar
    10941 posts

    Posted 11 Apr 2011 Link to this post

    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
  3. DevCraft banner
  4. Karlkim Suwanmongkol
    Karlkim Suwanmongkol avatar
    41 posts
    Member since:
    Aug 2012

    Posted 16 Apr 2011 Link to this post

    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.

  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 18 Apr 2011 Link to this post

    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
Back to Top