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

Empty Report Page When Dynamically Creating the Report

1 Answer 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
john
Top achievements
Rank 1
john asked on 31 Oct 2018, 04:45 PM

Hello.

I am trying to dynamically create a report, without any designer, just c# code. I am using instance report source with a report document, to which i add items on the fly, based on a custom report definition containing the user required report format (columns, rows, sorting, etc). 

No matter what i do, the final report gets rendered on pdf with an empty page. The problem is that with the same report items, i am getting results when using visual studio designer. I am referring to teleric report examples in C# (ListBoundReport). I have modified the designers class report items to just include a singe section with a table having one column and row. The output in the designer preview is an empty table having only visible borders.

I have copied the report items from the above example in my reporting library implementation. The difference is that the items are constructed in a custom builder class instead of the report item constructor as in your example. The outcome is a pdf with no visible table. 

I can post the builder class that creates the report items, but it has a lot of custom information that will get you confused. Instead, i will post the modified code from the designer file in your example. I can attach my builder class code, as well, if needed.

Please let me know what i am doing wrong because i have created a whole infrastructure in the idea of creating on the fly reports based on some user configuration.

1 Answer, 1 is accepted

Sort by
0
john
Top achievements
Rank 1
answered on 01 Nov 2018, 01:32 PM
I solved the problem. It turned out that it had to do with the way i was serializing the report result (document bytes) to the web page.
Tags
General Discussions
Asked by
john
Top achievements
Rank 1
Answers by
john
Top achievements
Rank 1
Share this question
or