Ticket T239036
Visible to All Users

bind report to sql query in vb.net

created 10 years ago

hi
i want to bind report with sql query and i dont know how

i use this code:
cmd.CommandText = "SELECT product as product ,sum(quantite) as nombre from ventes "

Answers approved by DevExpress Support

created 10 years ago (modified 10 years ago)

Hello Farid,

There are two possible ways to achieve this goal:

  1. Use the SqlDataAdapter class to populate a DataSet object and then bind an XtraReport instance to that DataSet. I suggest that you review the Populating a DataSet from a DataAdapter MSDN article for additional details.
  2. Use our SqlDataSource component as described in the How to: Bind a Report to an MS SQL Server (Runtime Sample) tutorial.

Let me know if you need further assistance.
Thanks,
Dmitry

    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.