Passing parameters into SQL string not working

4 posts, 0 answers
  1. Joe
    Joe avatar
    52 posts
    Member since:
    Feb 2012

    Posted 14 Jan Link to this post

    Hi all,

    I'm new to Telerik Reporting so forgive me for my ignorance. I read this article about using SQL parameters in a report: 

    https://docs.telerik.com/reporting/sql-data-source-using-parameters

    But I can't get it to work and I'm wondering what I'm doing wrong. I have a simple query that looks something like this:

    <p>"SELECT order_date, order_cost, order_customer</p><p>FROM orders</p><p>WHERE order_date = @OrderDate"</p>

    And I set the Parameter in the database connection Name: @OrderDate; Db Type: Date; Value: = Parameters.Order_Date.Value

    In the report, I created one ReportParameter, and I called it "Order_Date". It is set to AutoRefresh: True; Type: DateTime; Value: 1/6/2019; Visible: True.

    When I try to execute the query from within the SQL box where I enter the parameter information, it works. But when I try to Preview the report, the wheel just turns forever and nothing ever displays and I get no error. Can someone help me figure out what I'm doing wrong? 

  2. Joe
    Joe avatar
    52 posts
    Member since:
    Feb 2012

    Posted 14 Jan in reply to Joe Link to this post

    UPDATE: Well, I waited a half-hour for the wheel to finish turning, and it just showed me the table repeating like 100 times. What am I doing wrong?
  3. Joe
    Joe avatar
    52 posts
    Member since:
    Feb 2012

    Posted 14 Jan Link to this post

    I solved this on my own. What I needed to do was remove the DataSource from the Report. 
  4. Silviya
    Admin
    Silviya avatar
    350 posts

    Posted 15 Jan Link to this post

    Hi Joe,

    Yes, this is one of the approaches to get rid of the repeating Tables. If you wish, you could also move the Table to a report section that doesn't duplicate - such as group headers or footers of a static group.

    Regards,
    Silviya
    Progress Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top