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

exporting multiple reports into one file?

8 Answers 475 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Amy
Top achievements
Rank 1
Amy asked on 15 Apr 2009, 08:18 PM
I am currently using the RadControl for ASP.NET for grids, charts, sliders, etc.  We did not purchase the Telerik reporting.  Before I try to fight to purchase it, I want to ask a question:  with Telerik reporting, can I export mutiple reports to one pdf file?  For example, I would have an application that allows you to run 3 or 4 different reports.  If the person chooses to run 3 of them, can they then choose to send all of the chosen reports to one pdf file?  If they can, could they also include the charts that would appear on the same page?

8 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 16 Apr 2009, 07:00 AM
Hi Amy,

Thank you for your interest in Telerik Reporting and up to your questions:
  • yes you can combine two or more reports into a single exported document with the help of our newly introduced ReportBook feature. You can find more info on how to use it in this help article.
  • if you mean including the asp.net chart control in the reports - this is not possible. External controls cannot be hosted by the Reporting product. If you need to show charts in the report, you can use the chart report item, which uses the same engine.
Hope this helps.
Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Amy
Top achievements
Rank 1
answered on 20 Apr 2009, 05:48 PM
Thanks, that information was very helpful.  Now, another issue:  I cannot seem to use an existing data source for reports.  And when I gave up on that and was going to create a new data source, I discovered that I can't use stored procedures from SQL!!!!  At least I couldn't find a way to do that.  Is that true? 
0
Steve
Telerik team
answered on 21 Apr 2009, 09:41 AM
Hello Amy,

Using existing datasources for a report is possible - please elaborate on how you're trying to wire things up, so that we can provide assistance.
As for using stored procedures, Telerik Reporting does not provide its own data layer but depends on the existing .NET objects (DataSet, Data Table, DataView, ADO.NET, lists - for more information on report data binding, please, refer to this help topic). Because of that, the Telerik Reporting Data Source Wizard cannot be used to connect to parameterized data source such as stored procedure or a Select command with parameters out of the box.
 
What can be done is to manually execute it, feed the returned result set in a DataSet and then pass this DataSet to the Telerik Reporting DataSource. Another approach using our report parameters and NeedDataSource event is shown in this KB article.

For more information how to use ADO.NET to call a parameterized stored procedure, please refer to this KB article.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Amy
Top achievements
Rank 1
answered on 22 Apr 2009, 01:39 PM
Very helpful.  But unfortunately not working yet.  I followed the instructions in the article you mentioned, but am having problems with my needdatasource code.  The article's code is this:

Private Sub MyReport_NeedDataSource(ByVal sender As System.ObjectByVal e As System.EventArgs) _   
            Handles MyBase.NeedDataSource    
    'Transfer the ReportParameter value to the parameter of the select command    
    Me.SqlDataAdapter1.SelectCommand.Parameters("@ManagerID").Value = Me.ReportParameters("ManagerID").Value    
    
    'Take the Telerik.Reporting.Processing.Report instance and set the adapter as   
    'it's DataSource    
    Dim report As Telerik.Reporting.Processing.Report = CType(sender, Telerik.Reporting.Processing.Report)    
    report.DataSource = Me.SqlDataAdapter1    
End Sub   

I tried to use it for my datasource, as shown below, but it doesn't work. 

 

Private Sub ReportSummary_NeedDataSource(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.NeedDataSource

 

 

'Transfer the ReportParameter value to the parameter of the select command

 

 

Me.LRDataSet.GetClaimsSummary.("PolicyNum").Value = Me.ReportParameters("PolicyNum").Value

 

 

'Take the Telerik.Reporting.Processing.Report instance and set the adapter as

 

 

'it's DataSource

 

 

Dim report As Telerik.Reporting.Processing.Report = CType(sender, Telerik.Reporting.Processing.Report)

 

report.DataSource =

Me.LRDataSet.GetClaimsSummary

 

 

End Sub

I am using Visual Studio 2008, and the trial verions of reporting Q1 2009.  I created the class library and added a Telerik report, assigned the parameters just like the article described.  The above code gives me a "Identifier expected" error on the first line of the code.  My dataset name is LRDataSet.xsd, and the datasource is GetClaimsSummary.  I tried using the Intellisense to try many different options as I am new to reporting, but nothing is working.  I was getting no results for a while, but now when I try to preview the report I get "An error has occured while processing Report '': Object reference not set to an instance of an object. "

I also tried this article: http://blogs.telerik.com/kevinbabcock/posts/09-03-14/telerik_reporting_connecting_to_stored_procedures.aspx
which is essentially the same but has the code for hte needdatasource in C#.  I used an online converted to try to convert it, but didn't have any luck with that either.  Can you tell me what I'm doing wrong?

 

0
Amy
Top achievements
Rank 1
answered on 23 Apr 2009, 08:46 PM
I recreated this class again and used the sql data adapter specifically.  Now I don't get the identifier error with the code I have below 

    Me.SqlDataAdapter1.SelectCommand.Parameters("@PolicyNum").Value = Me.ReportParameters("PolicyNum").Value

        'Take the Telerik.Reporting.Processing.Report instance and set the adapter as it's DataSource    
        Dim ReportSummary As Telerik.Reporting.Processing.Report = CType(sender, Telerik.Reporting.Processing.Report)
        'Dim report As Telerik.Reporting.Processing.Report = CType(sender, Telerik.Reporting.Processing.Report)
        ReportSummary.DataSource = Me.SqlDataAdapter1

But I do still get the error "An error has occured while processing Report '': Object reference not set to an instance of an object."  Help!

0
Steve
Telerik team
answered on 24 Apr 2009, 01:58 PM
Hi Amy,

The "Identifier Expected" error you received was due to this line:

Me.LRDataSet.GetClaimsSummary.("PolicyNum").Value = Me.ReportParameters("PolicyNum").Value

You have a "dot" before the ("PolicyNum") identifier which is not correct.

As for your last post - the code looks correct, so our advice would be to set break points and see which object is null and why. The code from the KB article is valid and there are even a sample working projects at its bottom. Please review them carefully and apply the appriach accordingly to fit your scenario.

Regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Amy
Top achievements
Rank 1
answered on 24 Apr 2009, 07:09 PM
I did download the report example and it does work, so I compared it to mine and no differences that I could find, except for the fact that it has a SqlDataAdapterManager and I don't.  I notice that the SqlDataAdapterManager is referenced in the ReportParameter collection under "AvailableValue".  Do you have any good references on the SqlDataAdapter?  I looked up a few but nothing was very helpful.  I keep thinking it's got to be in that part somewhere.  When I right click on the SQLDataAdapter1 in my project, and preview data, it comes up.  And I am setting a default for the one required parameter.  I have 8 total parameters, but am setting them all.  Still not working.  Any other ideas? 
0
Amy
Top achievements
Rank 1
answered on 24 Apr 2009, 08:20 PM
Well, I got it working, but unfortunately don't know how.  I redid the thing from scratch, and still had to play with it, but eventually it did work.  The only thing I did differently was that on the first try that didn't work, I did try to use the report wizard after I had it set up with the data source.  I didn't do that this time - I'm just setting up the report manually, which takes more time, but at least it works. 
Tags
General Discussions
Asked by
Amy
Top achievements
Rank 1
Answers by
Steve
Telerik team
Amy
Top achievements
Rank 1
Share this question
or