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 7997805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:03:18+00:00 2026-06-04T15:03:18+00:00

I’m building a report using Crystal Reports XI that calls a SQL Server stored

  • 0

I’m building a report using Crystal Reports XI that calls a SQL Server stored procedure that expects parameters @Type_ID and @Subtype_ID.

There’s also a table in the database that associates Types and Subtypes in a one-to-many relationship.

I’d like to have the report’s parameters prompt screen ask for:

  • Type – either one of the listed Types or Null. If Null, the screen won’t ask for a Subtype.

  • Subtype – either one of the listed Subtypes that’s associated with the selected Type or Null.

… and pass these two values to the stored procedure as @Type_ID and @Subtype_ID, respectively. (If the stored procedure gets @Type_ID = Null, it will return records of all types. If it gets @Type_ID <> Null and @Subtype_ID = Null, it will return records of all subtypes associated with the selected type.)

Is there a way to make my Crystal report do all this?

So far, using advice from this answer, I set up a dynamic cascading parameter (DCP) on @Subtype_ID, which asks for a Type and then a Subtype in the way I describe above, then passes the selected Subtype to @Subtype_ID. However, I haven’t yet figured out how to pass the Type selected through this DCP to @Type_ID, so that if Subtype is Null, the stored procedure can return all records with the selected Type.

  • 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-06-04T15:03:19+00:00Added an answer on June 4, 2026 at 3:03 pm

    The problem is that your procedure’s definition creates to two parameters: TYPE_ID and SUBTYPE_ID. Crystal Reports’ parameters (dynamic or static) weren’t designed to interact with each other.

    As I see it, you have three options:

    • create a report w/ the single prompt group (make sure that the prompt group creates two parameters) that you want (the main report doesn’t require a data source, btw); insert a subreport that uses your procedure (it will create two parameters); link the parameters in the main report to parameters in the subreport; if necessary, you can create formulae in the main report (which are then linked to the two parameters in the subreport) for extra logic (convert a parameter value of ‘All Type Id’ to NULL, for example).

    • refactor your procedure to have a single VARCHAR parameter that will receive a concatenated TYPE_ID and SUBTYPE_ID. Create a dynamic parameter that will have a concatenated value for the key and for the description (e.g. 1/3; Type [1] – Subtype [3]). Your procedure’s logic will need to parse the parameter’s value to determine the values of TYPE_ID and SUBTYPE_ID. You’ll need to create a query that generates the keys and descriptions, which will be exposed through a BusinessView’s various layers.

    • abandon the procedure in favor of a Command or ‘normal’ query. in my experience, the vast majority of reports can be build without a stored procedure. Combined w/ a single prompt group, this will give you the flexibility that you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am doing a simple coin flipping experiment for class that involves flipping a

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.