Skip to Content
avatar image
Former Member

Crystal reports- what we have between Crystal reports and SQL Database

Hello, I have a question about Parameter fields. I have 2 pf, but I can't understand what they do. Becouse one of them is a date which is don't exist in the sql database, but it is parameter and when I run the report, I think that this parameter is something lika a filter. But I dont understand how to see it. I tried with "Show SQL", but there isnt this parameter and this field "?Date". There is question mark (I saw it means the they are used in Formula/Report etc...). Could you please tell me more about this concept- between Crystal Reports / Formula field and the database?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Nov 17, 2017 at 05:52 PM

    Hi,

    If you don't see the parameter in the SQL, go into Report | Selection Formula | Record and see if it's being used there. If not then go into Report | Selection Formula | Group and see if it's being used in there.

    If your report is using a Stored Procedure with a parameter, it will appear in your Parameter Fields list with a question mark and yellow database icon. That's a parameter the report gets when you connect to the Stored Procedure and pass parameters to it. So the filtering is done on the database and not in the report.

    My guess is your report is using a Stored Procedure and to see what the parameter is doing, you'll have to look at the SQL code in the database.

    Brian

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 20, 2017 at 03:20 PM

    Hello. But the problem is that in the report I have less results than the "Show sql" query show in the database. Maybe there are filters, but...I dont understand how to see them

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 21, 2017 at 07:51 AM

    Brian Dong Thank you, but I dont have Stored procedure and the sign is only question mark, without database sign. I don't know...but when I copy the "Show sql code", it returns more data in sql than the report (more rows)

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      Is there a Selection formula?

      How are you determining the number of records in the report?

      Could the report be hiding rows or groups?

      If you're getting less records in Crystal then we need to look in the report. Answer these questions, especially the Selection Formula.

      There are a number of ways Crystal can filter or hide rows.

      Brian

  • avatar image
    Former Member
    Nov 23, 2017 at 01:41 PM

    Vitaly Izmaylov Thanks. They are Date 2 only

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 17, 2017 at 05:22 PM

    Start with the icon next to Parameter, see the screenshot below:

    Date1: with Question mark and yellow cylinder means the Parameter is used in Records Sellection

    Date2: with green check and rectangle is Parameter used in the report. For sorting records for example

    Date3: only rectangle - Parameter is unused

    Add comment
    10|10000 characters needed characters exceeded