report with Business objects

Stimulsoft Reports.WEB discussion
Post Reply
Chasoo
Posts: 40
Joined: Wed Oct 19, 2011 1:29 am

report with Business objects

Post by Chasoo »

Can we create a report with Business object as it's data source.? if yes can we add dynamic data sources(using Linq/HQL queries) run time?

Tnx in advanced
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

report with Business objects

Post by HighAley »

Hello.
Chasoo wrote:Can we create a report with Business object as it's data source.? if yes can we add dynamic data sources(using Linq/HQL queries) run time?
You can use Business objects in Stimulsoft Reports Designer.Web, except one moment: you can't add Business object as Data Source in the Designer Dictionary. You can add it with code report.regBisunessObject() or in WinForms Designer.

Thank you.
Chasoo
Posts: 40
Joined: Wed Oct 19, 2011 1:29 am

report with Business objects

Post by Chasoo »

Hi ,

I have tried the way u have advised.

Code: Select all

            var report = new StiReport();

            var dataContext = new DataContext();

            var custQuery =
                from cust in dataContext.Customers.AsEnumerable()
                where cust.City == "London"
                select cust;

            report.RegData("Customer", custQuery);

            report.RegBusinessObject("Customer2", custQuery);


            webDesigner.Design(report);
but when i got the designer view data source is not bound.if i try to preview the report data is not there.
here i have attached the screen shot of it.

Image

tnx

chaminda
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

report with Business objects

Post by Alex K. »

Hello,

If you want to display data in the WebDesigner in prewiew, you need to implement the GetPreviewDataSet method for a designer.

Thank you.
Post Reply