Ticket T317718
Visible to All Users

Bind XtraReport to a stored procedure through EF

created 9 years ago (modified 9 years ago)

[DevExpress Support Team: CLONED FROM T317573: EF Connection string for xaf ReportDataV2]
No, thats not it because it doesnt give me the ability to bind to the output of a stored procedure.

My Stored Proc returns a list of string results

I tried the following

C#
class ReportsDB : jtDbContext { public IList<SPResultString> CancelOrders() { return GetSpResults("TestOrders"); } } where in jtDBContext I have public IList<SPResultString> GetSpResults(string spName) { return Database.SqlQuery<SPResultString>(spName).ToList(); } and the SPResultString is public class SPResultString { public string Result { get; set; } }

When I try to use ReportsDB  the StoredProc result will not appear.
http://screencast.com/t/MphMJYfRYIp6

Answers approved by DevExpress Support

created 9 years ago (modified 9 years ago)

Hi Kirsten,
I believe the following article is exactly what you're looking for: How to: Bind a Report to an Entity Framework Data Source. Try to accomplish the steps mentioned in that tutorial and let me know if there are any difficulties with it. I also would like to emphasize that while you can create and show a regular report using our built-in data access solution, it is NOT  compatible with our XAF framework. A similar issue has been already discussed in the Setting criteria for defined reports thread raised by you: you tried to create a report using the DataSourceWizard with the help of the EFDataSource component, and it worked, but the ReportServiceController's criterion was not applied to the report.
Regards,
Yaroslav.

    Show previous comments (20)
    Vasily (DevExpress Support) 9 years ago

      Hi Kirsten,

      Your last comment is not completely clear to me. You gave a link to this ticket there, but I do not see any new questions. Would you please clarify this? Maybe, you have provided the incorrect link.

        Thanks Vasily the comment should have read
        Asked a new question on how to set the datasource after the user has set the parameters
        https://www.devexpress.com/Support/Center/Question/Details/T332285
        I will delete the comment.

        Vasily (DevExpress Support) 9 years ago

          Thank you for the clarification, Kirsten!
          I would like to note that we have already posted an answer to the T332285: Show report parameters dialog prior to setting data for report ticket.
          Let us know if you need any further assitance. We will be happy to help you.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.