CrystalReportViewer displays whole data regardless of date time parameters RRS feed

  • Question

  • I am using VS2010 and SAPCrystalReports Redist Version 13(64-bit). When I run the report , during first load, it is getting all the data regardless of date and time parameters. In the second run, it filters out and gets correct data. 

    I am sending a few more other params too to the report from application along with date and time params. 

    It is not erroring out. BUt, it is returning full data available in the database (relavant to current params, but not date and time). If I dont change the params and run the report again, it shows valid data. This happens everytime I close and reopen the applicationie, each time i reopen/reload the report viewer form.

    Friday, January 7, 2011 10:23 PM

All replies

  • Hi sraman,

    Thanks for your question.

    You mean you couldn't retrieve full data at the first query by pass in params, but I am not sure how you create param?

    Here is a link about params: http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-string-parameter.htm

    Test the code to see whether the scenario happens again.

    Have a nice day.

    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by SAPDon Friday, July 22, 2011 8:29 PM
    Tuesday, January 11, 2011 8:54 AM
  • Thank you for the reply. The issue is still open. wasnt able to find any solution yet.
    Wednesday, April 20, 2011 2:25 PM
  • Hello,

    Does your report have saved data? Open it up and then save it again and make sure the Save Data with report option is checked off.

    After you have set all the parameters and before you preview try this API:


    Thank you



    Don Williams
    Wednesday, April 20, 2011 3:43 PM
  • What is the Record Selection Formula you are passing to the report?
    Amit Govil(amit.govil@hotmail.com)
    Wednesday, April 20, 2011 7:22 PM
  • Yes, I unchecked the Save data with report and I use the ssame Refresh method, Still no luck.


    Tuesday, May 3, 2011 10:00 PM
  • Hi sramanu,


               before passing the datetime parameter you can try to cast in DateTime then pass the  parameter for your report.

    Regards atik sarker
    Thursday, May 5, 2011 5:52 AM