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

Reporting with a web service returning a dataset

4 Answers 147 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris @ Intrinsic
Top achievements
Rank 1
Chris @ Intrinsic asked on 01 Jun 2011, 07:20 PM
Please post some code to programmatically set a datasource or objectdatasource or whatever it may be for a telerik report.  I can only use a webservice (NOT WCF) that returns a dataset, so I am assuming that I need to set the datasource of the report object programmatically?  I can't see where to do this.  What about report_needdatasource() ?  I can't find any examples, or documentation.  The only documentation just says that you can use different datasources, but not how to use them.

Thanks.

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 02 Jun 2011, 07:26 AM
Hi Chris,

Not sure what documentation you're looking at, but this topic is thoroughly covered. For your specific case you can either use the report NeedDataSource event or the ObjectDataSource component. More information on both is covered in the respective articles:

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
0
Chris @ Intrinsic
Top achievements
Rank 1
answered on 02 Jun 2011, 08:15 PM
I already figured this out, shortly after posting this, but thanks.  However, now there is another serious issue.  How can I actually design my report without a permanent data connection?  Doesn't the report designer depend on a permanent data connection for this?  I had to temporarily add a permanent data connection to get the designer to work, but I shouldn't have to do this.  Since, my post clearly states I am using webservices, there is no permanent data connection.  You only get the webreferences to the webservice.  And, I am not using WCF, since that seems like there would be a lot of overhead just to get a simple webservice running.



0
Chris @ Intrinsic
Top achievements
Rank 1
answered on 02 Jun 2011, 09:01 PM
Also, once I'm in the report designer, now how do I restart the report wizard?
0
Steve
Telerik team
answered on 06 Jun 2011, 01:28 PM
Hello Chris,

As we've explained in one of your other threads, the only way for the report designer to show you any data source related information (incl. data source schema) is to have a valid data source available at design time. As far as the Visual Studio designer is concerned a valid data source means:
  • a data source object that is instantiated and initialized in the InitializeComponent() method of the designed object class -- this is the only part of the class that VS designer respects;
  • the data source object should be be operational at design time; this means that VS (through the report designer) should be able to use this object and even instantiate it correctly. The tricky part here is that these objects become part of the VS application (devenv.exe) and not your application
We see that you already got past this part in your other thread. As for your other question - the Report Wizard can be manually invoked from the Telerik Reporting Menu. Note that it is available only when you're in the context of the report designer.
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
Chris @ Intrinsic
Top achievements
Rank 1
Answers by
Steve
Telerik team
Chris @ Intrinsic
Top achievements
Rank 1
Share this question
or