Skip to Content
author's profile photo Former Member
Former Member

Problem in displaying the records in crystal reports

Hi;

I am facing a unique problem where I am not able to understand what the problem is. Let me explain the problem; I am having a stored procedure and when I execute the stored procedure I get 2879 rows and the result that is shown is correct. The stored procedure contains a date parameter

Now I prepared a crystal report using the stored procedure. It will prompt for the date parameter and I give the current date in this scenario all the records are shown correctly and nothing is missed.

Now I gave another parameter for selecting the records. The name of the parameter is VENDOR. Its a dynamic parameter. I gave the datasource for the parameter (Value / Description / Parameters)

I placed this parameter on the report header which is suppressed.

Then from the menu REPORT --> SELECT EXPERT --> RECORD I gave the formula

SP.Field1 = SP.Field2 AND SP.VENDORNUM = (?VENDOR)

If I select all the vendors which appear in the list then I get 1971 records which should be rather 2854 records

I then executed the stored procedure in SQL database. I got 2879 records and then I copied the result to an excel file.

I did a comparison where Field1 does not match with field2 and I noticed that there are 25 such records.

I am not able to find out any logic why some of my records are missing the report.

I hope that I had been able to explain my problem.

Please suggest me some ideas what could be the potential reason for the missing data.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jun 03, 2014 at 12:49 PM

    Hi Sreejith,

    Instead of creating the parameter on the report (via the Field Explorer), create the parameter inside the Stored Proc just like the Date prompt.

    Also include the condition SP.field1 = SP.field 2 in the where clause of the stored proc's query.

    The record selection formula for such reports is not passed back to the database.

    -Abhilash

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 03, 2014 at 01:59 PM

    Hi Sreejith,


    If you want to create parameter in Report Level ,

    then You can create a parameter type as 'ALL' instead of selecting all values in the list.

    And then write the below formula in REPORT --> SELECT EXPERT --> RECORD


    If {?parameter}='ALL'

    Then {database_field} like '*'

    Else {database_field} = {?parameter}

    Note : Here '*' means " all values in that parameter "

    Regards

    Swathi

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.