Page 1 of 1

Object data not showing in preview page

Posted: Mon Mar 12, 2018 10:38 pm
by lturk
Hi,
I implemented the report but when I click the preview, no data showing.
The same code is working in designer and viewer.
My code is below.
I am waiting your help.
Thank you.

Code: Select all

public async Task<ActionResult> PreviewReportAsync()
{
StiReport report = StiMvcDesigner.GetActionReportObject();
var advancedReportData = GetData();
report.BusinessObjectsStore.Clear();
report.RegBusinessObject("Students", advancedReportData.StudentsData.ToList());
report.RegBusinessObject("Staff", advancedReportData.StaffDetailResultData.ToList());
report.Dictionary.SynchronizeBusinessObjects();
return StiMvcDesigner.PreviewReportResult(report);
}

Re: Object data not showing in preview page

Posted: Wed Mar 14, 2018 12:57 pm
by Alex K.
Hello,

Please send us a sample project which reproduces the issue for analysis.

Thank you.

Re: Object data not showing in preview page

Posted: Fri Mar 16, 2018 10:48 am
by lturk
Hi Alex,
Please find the attached requested files.

Thank you.

Re: Object data not showing in preview page

Posted: Tue Mar 20, 2018 6:43 am
by Alex K.
Hello,

We have found the problem in the preview report when uses business objects and fix it.
Please try to check the following code and let us know about the result:

Code: Select all

public async Task<ActionResult> PreviewReportAsync()
{
    StiReport report = StiMvcDesigner.GetActionReportObject();
    ....
    ....

    //return StiMvcDesigner.PreviewReportResult(report);
    return StiMvcDesigner.DesignerEventResult(report);
}
Thank you.

Re: Object data not showing in preview page

Posted: Tue Mar 20, 2018 8:54 am
by lturk
Hi Alex,
Thank you for helping but it doesn't work.
I tried the below code with business objects and without business objects.

Code: Select all

  public async Task<ActionResult> PreviewReportAsync()
        {
            StiReport report = StiMvcDesigner.GetActionReportObject();
            return StiMvcDesigner.DesignerEventResult(report);
       }

Re: Object data not showing in preview page

Posted: Tue Mar 20, 2018 1:30 pm
by Alex K.
Hello,

Without business objects this code works, we checked our Demo reports and registered Demo data in the specified action, the report preview worked correctly.

Thank you.

Re: Object data not showing in preview page

Posted: Tue Mar 20, 2018 5:23 pm
by lturk
Hi,
Unfortunately, It's not working.
I tried a lot of times.

Re: Object data not showing in preview page

Posted: Thu Mar 22, 2018 11:00 am
by lturk
Alex K. wrote:Hello,

Without business objects this code works, we checked our Demo reports and registered Demo data in the specified action, the report preview worked correctly.

Thank you.
You can find my code in attachment.

Re: Object data not showing in preview page

Posted: Sat Mar 24, 2018 3:26 pm
by Alex K.
Hello,

We again analyzed your code, and could not reproduce the problem on our test cases. Please send us a full project on which we can reproduce and analyze the problem. We can not reproduce it with only a couple of project files.

Thank you.