Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6793877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:09:15+00:00 2026-05-26T18:09:15+00:00

am using CR 8.5 to generate report.I am passing a parameter field from VB

  • 0

am using CR 8.5 to generate report.I am passing a parameter field from VB to crystal report.
I have added the SQL query for the report in which the “WHERE” condition is got from the parameter field.

say
select * from tableA where column1='{?prameter1}’

The report is empty when i preview.. Please advise what am i missing

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:09:16+00:00Added an answer on May 26, 2026 at 6:09 pm

    In the older versions of Crystal, it wasn’t possible to amend queries to include parameter values – you could only add constant values. Consequently, your amended query is selecting records from tableA where column1 is equal to the string “{?prameter1}”, not the value of parameter {?prameter1}.

    In order to select by the parameter value, reset the query to its default value – probably:

    select * from tableA
    

    and add a condition to the Crystal record selection dialog:

    {tableA.column1} = {?prameter1}
    

    (Note – no quotes in the latter condition.)

    EDIT:

    As noted above, you need to remove the parameter from the query, because it is passed to SQL exactly the way you see it when using Show Query in Crystal. If you amend the query to select * from tableA where column1={?prameter1}, Crystal will attempt to run that exact string as a SQL statement, and will therefore return an error – it will not attempt to substitute the value of the parameter into the SQL statement.

    However, if you add a Crystal record selection condition using the parameter into the report, Crystal will attempt to add the selection condition to SQL when running the report – if you use Show Query after adding the Crystal record selection formula, it should first prompt you for a value for your parameter, and then show you a query that includes your selection condition (with the entered value of the parameter, not the parameter name).

    There are a couple of restrictions on this automatic addition of Crystal record selection conditions to SQL:

    • the SQL query must be uncustomised (ie. no changes made to the default version of the query), otherwise Crystal will not try to amend the query – the customisation takes precedence. (This is why you have to reset the query to its default form.)
    • the Crystal record selection criteria need to be relatively simple – a series of and conditions on database and parameter field values are normally OK, but a mixture of and and or conditions, or conditions on Crystal formula values, will probably result in Crystal not amending the query conditions.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a stored procedure to generate report using the SQL Server Reporting Services.
I'm using Netezza to generate a report and I have the following query select
I infrequently (monthly/quarterly) generate hundreds of Crystal Reports reports using Microsoft SQL Server 2005
I have an application which needs to generate a report. However, I do not
I have a report which needs to be exported in pure word format(97-2003) using
I am using PHP to generate a report, which is basically a one line
I am using reportlab to generate a pdf report automatically from dynamic data. As
I'm using Reportlab to generate report cards. The report cards are basically one big
I am using the publishing functionality of MATLAB to generate a quick report of
I'm using DOMPDF to generate about 500 reports from one script. It's running out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.