locked
Why Showing all records ? RRS feed

  • Question

  • User1929035129 posted

    I am creating a Crysal Report,, by using Wizard.

    In wizard, i have set columns, group by

    Now, i have called Stored Procedure and passed some parameters, 

    returned resuilts get stored in DataSet 

    by debuging i have checked Dataset results, results are correct(what i needed using filters)  

    now i am setting DataSource

    rptDoc.Load(Server.MapPath("reports/ReportStock.rpt"));

    rptDoc.SetDataSource(dsDataSource);
    CrystalReportViewer1.ReportSource = rptDoc;

    but report is showing all records instead of showing some records.

    What i am doing wrong ???

    Monday, October 29, 2012 3:55 AM

Answers

  • User-578610739 posted

    Hi Friend,

    The option comes at save time when you go by menu i.e. file "menu" -> "save with data".

    The logic is if procedure have change i.e specially when you include parameterer(even you null it). In first time it ask and if you not give then , it take last proper fully satisfy condition's output.

    Then report refresh and then Report always want to value as you get right now. you just set always null parameter in report to show preview.

    Consider thing is , you check the report with and without parameter value, The output  is satisfy as your input?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 30, 2012 9:08 AM
  • User1929035129 posted

    thanks for your time

    Problem solved by using setParameterValue method

    I dont understand i have already filtered data, then what filtering crystal report parameters are doing ?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 30, 2012 1:17 PM

All replies

  • User-578610739 posted

    Hi Tdmca,

    Are you save report with  " with data" option. If yes , then remove it and save it.

    If no, then in report give the same parameters and check the result. Also check your stored procedure .

    Compare it, so you know where wrong happened.

    Monday, October 29, 2012 7:08 AM
  • User1929035129 posted

    hi ajay thanks for your response,

    where this option is "with data"

    what i did wrong was i have altered procedure to accept parameter after report created already using no parameters.

    now when i again i was adding a report with parameterised procedure then in wizard it was asking for parameter values,

    so i have checked "is null" for each parameter.

    Now, the problem is when report is loading it asking for parameter values in popup, and i have already passed parameters to procedure and i have also filtered data in my dataset, the same dataset i am setting as datasource.

    but why this popup is asking me for values of parameters ??

    Monday, October 29, 2012 12:14 PM
  • User-578610739 posted

    Hi Friend,

    The option comes at save time when you go by menu i.e. file "menu" -> "save with data".

    The logic is if procedure have change i.e specially when you include parameterer(even you null it). In first time it ask and if you not give then , it take last proper fully satisfy condition's output.

    Then report refresh and then Report always want to value as you get right now. you just set always null parameter in report to show preview.

    Consider thing is , you check the report with and without parameter value, The output  is satisfy as your input?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 30, 2012 9:08 AM
  • User1929035129 posted

    thanks for your time

    Problem solved by using setParameterValue method

    I dont understand i have already filtered data, then what filtering crystal report parameters are doing ?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 30, 2012 1:17 PM