Question

Crystal Report Missing parameter values

Asked by: sanagarwl

I have an existing reports and every thing works fine.

Now, for the header I have created a sub-report and this sub-report is tied to a stored procedure.

I am passing the PolicyId to the sub-report as a linked param.

When I preview (in design mode) the sub-report with the desired PolicyId everything works ok.

BUT, when I run the main report then I keep getting the "Missing Parameter Value." error message.

I have "Verified the database" so every thing is in sych.

any help would be much appreciated.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-09-22 at 09:28:42ID24752107
Topic

Crystal Reports Software

Participating Experts
3
Points
500
Comments
29

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Crystal Parameters
    Hi guys I would like create report in CR 4.6 with these columns: Customer Name, Customer Address, Customer Account,Customer Scheme, Customer Arrears, Customer balance, Customer Liablities. The problem is that I need to link it witha database where one of the tables has va...
  2. Using Crystal Connect Parameter
    I have setup 2 databases, "Production" and "Training". I am using ODBC and have setup the proper DSN. When I login to the program I select the desired DSN. This works as I am able to enter different data into the 2 databases. The report was created using t...
  3. How to pass a date param from a VB6 datecombo to cryst…
    HI, On my VB6 form i'm asking the user to enter 2 dates using datecombo boxes which displays a calendar for user to select a date. I use 2 VB controls: Crystal Report Control and Sheridan datecombo Control. In Crystal 8.5 I use 2 date params(a from date and a to date). Th...
  4. Delphi + Crystal Reports + PReview PRoblem
    i am facing some problems with crystal reports in delphi 7.0 pls help me Problem 1: System Environment: OS = Windows 2000 Version 5.0 (Build 2195 Service Pack 2) Language = Delphi 7.0 Tool = Crystal Report 9.0 Databse = SQLServer 2000 When I Preview a Report from De...
  5. Parameter Values that can be used in Sub reports?
    Hi, I need to write some rather complex reports. I have a pretty basic handle on what I am doing but I am very new to Crystal Reports, so please treat me like an idiot with your answers! I need to insert a Parameter field in a main report so that when the report is run, th...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: GSQLPosted on 2009-09-22 at 10:11:37ID: 25395081

Did you create the parameter in the subreport or did Crystal create it for you when you selected the subreport parameter?  I believe you should see the "Select data in subreport based on field:" checkbox not grayed out and you should select the PolicyId field in the subreport dataset to link to.

 

by: sanagarwlPosted on 2009-09-22 at 10:26:44ID: 25395244

GSQL

I created the parameter in the subreport. See attached image. And, I selected the PolicyId field in the sub-report...

 

by: sanagarwlPosted on 2009-09-22 at 12:26:18ID: 25396517

I also went the route of tying the subreport to a strongly typed dataset "ReportHeader.xsd".

Again, the whole sub-report gets pulled up in the Group header section. It should pull up only a single record based on the the PolicyId.

Please see inserted snapshot on how I have linked the main report to the sub-report...

Am I missing some thing ? Any help would be much appreciated.

 

by: sanagarwlPosted on 2009-09-22 at 12:34:32ID: 25396604

the code snippet is given below...

oRpt.Subreports("CrystalReport3.rpt").SetDataSource(t1)

                                              
1:

Select allOpen in new window

 

by: GSQLPosted on 2009-09-22 at 13:30:58ID: 25397265

Have you installed SP3?  I assume you can install it with the VS version of Crystal Reports.

Check out this information from the CRXIWIN_SP3 description of a subreport parameter issue:

ADAPT00584330
Patch ID: 38,600,347
Description:
A record selection formula applied to subreports in a .NET application may fail to filter the records for all subreports.
The cause of the problem is that the modifying parameters for the record selection formula are lost before the report is run; a memory
clean-up routine removes all modifying parameters for the record selection formula instead of removing only those not in use.
New Behavior:
This problem is resolved.
To solve the problem, requests for record filter modifications are removed only if they come from the same
subreport or from the main report.
The issue is corrected in the following component version, or later.
dtsagent.dll 10.2.0.1409 06/09/2006

I'm now sure where the DLL would be in your case, but you could check

C:\Program Files\Business Objects\Common\3.5\bin

If your version is greater than 10.2.0.1409 there still something else going on.

 

by: sanagarwlPosted on 2009-09-22 at 13:53:48ID: 25397497

10.2.0.1093 is the version that I have. And it resides @  C:\Program Files\Business Objects\Common\2.7\bin.

I'm at the client site and have inherited this development environment.

Are you sure that this could possibly be causing the problem. Are there any other workarounds short of installing the patch.

Asking the client to install this patch on all the dev boxes, staging and production servers for this one functionality may not be feasible...

thanks for the help

 

by: GSQLPosted on 2009-09-22 at 18:21:21ID: 25399319

That's understandable.  Since their file version is less than  10.2.0.1409 this fix may not apply.

Since it works in the designer and not at runtime it seems like it may be an issue with the code.  

Your first screenshot shows CrystalReports2.rpt in the main report, but your code snippet refers to CrystalReports3.rpt.   I assume you've continue to test and created a new subreport?


 

by: James0628Posted on 2009-09-22 at 23:36:06ID: 25400493

The link that you show is to a parameter that CR created in the subreport, which it then compares with the data coming from the stored procedure.  If the stored procedure used by the subreport has a PolicyId parameter, you need to link to that parameter.  If that parameter is the same data type as the PolicyId field in the main report, the parameter should show up in the dropdown list under "Subreport parameter field to use".

 If there are any other parameters in the subreport, you need to have something linked to them as well.

 Once that's done, you should be able to run the report in CR and not get prompted for parameters in the subreport.  However, if you're running the report from another application, you may still have problems.  I'm not sure, because I don't run reports that way, but I think when run from other applications, there may be more involved than how the subreport is linked in the report.

 James

 

by: sanagarwlPosted on 2009-09-23 at 07:28:34ID: 25403450

GSQL: That is correct. Earlier with CrystalReports2 I had tied it to a stored proc. But with CrystalReports3 it is tied to a datatable.

So, with CrystalReports2 the error I was getting was "Missing Parameter Value".

With CrystalReports3 everything is displayed in the header section rather than just one record based on PolicyId...

James0628: Please see my comment above to GSQL. All the reports/subreports are in the same application and are in fact even in the same directory...

oRpt points to the main report.

When I run the main report then all the records from the CrystalReport3 sub-report are displayed. I have linked the report as per the image attached.

Also, CrystalReports3  is the sub-report and that gets populated with a data table. the code is given below. As you can see the dataset is called ReportHeader and within that I am linking to policyid. The t1 datatable I am manually populating/mocking the data and the code snippet is also shown below in image.

image2 shows how all the records are being displayed in the header. As you can see only record which has policyId 35 should be getting shown.

any help would be much appreciated. I am not quite sure if I am missing any step. thanks for all the help.

oRpt.Subreports("CrystalReport3.rpt").SetDataSource(t1)
 
 'Mock data
                    Dim t1 As System.Data.DataTable = New ReportHeader.PolicyModDataTable()
                    Dim r1 As System.Data.DataRow = t1.NewRow()
                    r1("PolicyModId") = 166
                    r1("PolicyId") = 40
                    r1("Module") = 3
                    r1("EffectiveDate") = "01/01/2009"
                    r1("ExpirationDate") = "01/01/2009"
                    t1.Rows.Add(r1)
 
                    r1 = t1.NewRow()
                    r1("PolicyModId") = 2
                    r1("PolicyId") = 35
                    r1("Module") = 7
                    r1("EffectiveDate") = "01/01/2009"
                    r1("ExpirationDate") = "01/01/2009"
                    t1.Rows.Add(r1)
 
                    r1 = t1.NewRow()
                    r1("PolicyModId") = 3
                    r1("PolicyId") = 32
                    r1("Module") = 9
                    r1("EffectiveDate") = "01/01/2009"
                    r1("ExpirationDate") = "01/01/2009"
                    t1.Rows.Add(r1)
 
                    r1 = t1.NewRow()
                    r1("PolicyModId") = 4
                    r1("PolicyId") = 29
                    r1("Module") = 9
                    r1("EffectiveDate") = "01/01/2009"
                    r1("ExpirationDate") = "01/01/2009"
                    t1.Rows.Add(r1)
 
                    r1 = t1.NewRow()
                    r1("PolicyModId") = 5
                    r1("PolicyId") = 11
                    r1("Module") = 9
                    r1("EffectiveDate") = "01/01/2009"
                    r1("ExpirationDate") = "01/01/2009"
                    t1.Rows.Add(r1)
 
                    oRpt.Subreports("CrystalReport3.rpt").SetDataSource(t1)

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:

Select allOpen in new window

 

by: sanagarwlPosted on 2009-09-23 at 07:40:45ID: 25403610

I also attempted to link to the report fields PolicyMod.PolicyId as shown in the figure below. But that too does not solve the problem and the subreport displays all the records as per the image above

 

by: James0628Posted on 2009-09-23 at 08:34:21ID: 25404389

So, the subreport is actually reading tables directly, not using a stored procedure as indicated in your original message?  In that case I can only guess that it may be something in the code that runs the report, but I don't run reports that way, so I can't help there.  Hopefully someone else will come up with something.

 James

 

by: sanagarwlPosted on 2009-09-23 at 08:45:01ID: 25404534

James0628:
The subreport is not directly using stored procedures. The db layer returns either strongly typed object collections or datasets to the business tier. The business tier then applies business rules and then passes the datasets/collections to the code behind.

In this case a dataset is being returned and then the dataset.datatable is then being consumed by the subreport using the setdatasource syntax.

In the original post I was simply trying to get the subreport to work and then I was getting the "Missing param..." message.

Also, using stored procedure to directly populate the subreport may not be feasible when I have to move from dev, to staging, to Production considering the connection string is encrypted etc. Besides, that is not an option I have since this is an existing enterprise system and all other reports are using datasets.datatables.

thanks

 

by: sanagarwlPosted on 2009-09-23 at 08:48:54ID: 25404575

James0628:

Just wanted to clarify that I am *not* using db tables directly. I am using dataset.datatables in the codebehind...

{James, I just re-read your post and realised that you may be thinking that I was using the the db tables directly but as mentioned above I am using dataset.datatables...}

thanks for the help

 

by: James0628Posted on 2009-09-23 at 08:58:14ID: 25404695

OK.  Like I said, I don't run reports this way (from my own application), so I know very little about it.  If it's not simply some kind of bug, it may be something about how you're setting the parameters in your code, but I really can't help with that.

 James

 

by: mlmccPosted on 2009-09-25 at 07:45:22ID: 25423497

I have read through the discussion and am not clear as to what the current issue is.

What problem are we trying to solve now.

mlmcc

 

by: sanagarwlPosted on 2009-09-25 at 08:06:01ID: 25423744

mlmcc:

Please see my post ID 25396517 onwards. Essentially, I am trying to get the report header such that only one record is displayed based on policyid.

However, as you can see in post ID: 25403450 all the records are being displayed in the header.

post ID: 25403450 also shows how I am linking the main report to the sub-report crystalreports3

Please let me know if I can give any further information. Thank you again for your help

sanagarwl

 

by: sanagarwlPosted on 2009-09-25 at 08:11:50ID: 25423818

mlmcc:

Please also ignore my posts before Post ID: 25396517. The title "Crystal Report Missing parameter values" does not accurately depict the problem - my bad...

thanks
sanagarwl

 

by: mlmccPosted on 2009-09-25 at 14:45:02ID: 25427529

SO this seems to be an issue with record selection in the subreport.

Have you looked at the selection forula in the subreport?

mlmcc

 

by: sanagarwlPosted on 2009-09-26 at 08:32:03ID: 25430084

mlmcc,

I have linked the policyid from the main report to the sub-report as per post id: 25403450 {untitled3.bmp}

In the code behind I set the sub report with the following syntax.
oRpt.Subreports("CrystalReport3.rpt").SetDataSource(t1)

I assumed based on the code above the CrystalReport3 will pull up only the record that matches the policyid being passed in from the main report.

thanks for the help - {my apologies for not reponding earlier - I did not rcve an email stating that a comment had been added to my question...}




 

by: mlmccPosted on 2009-09-26 at 08:57:42ID: 25430170

Have you checked the record selection formula on the subreport to ensure it is correct?
I have seen times where it gets added wrong and thus allows extra records through.

mlmcc

 

by: sanagarwlPosted on 2009-09-26 at 14:28:11ID: 25431630

mlmcc
thanks for the response will check on Monday.
Will be on client site then.

 

by: sanagarwlPosted on 2009-09-28 at 09:21:36ID: 25440653

mlmcc:

once i linked the main report to the subreport - cystalreport3 as per post id 25403450, I went back to the cystalreport3 and here I do not "see" the record selection formula. Should this not be prepopulated with the correct formula.

When I do select the record selection formula what I see is shown in the attached image.

Could you let me know the syntax what needs to be in the record selection formula.

thanks again for all the help.

 

by: mlmccPosted on 2009-09-28 at 09:35:39ID: 25440790

I don't use the .Net versions so I am not sure where it is.  In the standalone versions it is under the REPORT menu.

Basic formula that should be there

{?PM-YourMainReportField} = {MatchingSubreportField}

mlmcc

 

by: sanagarwlPosted on 2009-09-28 at 11:16:26ID: 25441726

thanks mlmcc for all the help.

finally, finally i got this to work - here are the steps

1)specify a parameter field in the subreport as Pm-GetBondView.PolicyId
2)In the record selection formula in the subreport specify condition:{PolicyMod.PolicyId} = {?Pm-GetBondView.PolicyId}
3)In the main report link as per following image. {notice that select data in subreport... checkbox is disabled}
If one omits step 1 and 2 then the select data in subreport... checkbox *is* enabled BUT then all the records in the subreport are displayed.

It seems steps 1 and 2 have to be manually configured since the link "wizard" in the main report does not do the complete job.

and, voila everything start working...

 

by: mlmccPosted on 2009-09-28 at 13:09:34ID: 25442818

When I link subreports the SELETC DATA ... is available to be checked so it is added to the select expert directly.

mlmcc

 

by: James0628Posted on 2009-09-28 at 17:06:31ID: 25444723

mlmcc,

 I think the difference is that he actually created a parameter in the subreport named Pm-GetBondView.PolicyId and linked the field to that parameter, rather than letting CR create the parameter and then linking that to a field in the subreport.  When you link to a manually created parameter, the "Select data ..." option is not available.  If you look at one of his previous screenshots, the "Select data ..." option was available before and he was using it.


 sanagarwl,

 It looks like in your version of CR, letting it create the parameter in the subreport and then trying to link that to a field in the subreport did not work.  Or, it's possible that there's just something weird going on with that one report.  Every now and then a particular report will just develop some odd problem where something that should work just doesn't seem to work quite right.  Subreport links are one of the things that I think I've had problems with before, where for some reason one subreport just doesn't seem to want to work properly.  This could be something like that.

 FWIW, if I'm correct and you actually created a parameter named Pm-GetBondView.PolicyId, you might want to consider changing the name.  When CR creates a parameter in a subreport, it starts the name with "Pm-".  It might be worthwhile to rename your parameter and at least remove that part, to avoid possible confusion later (like how mlmcc seems to have assumed that CR created that parameter).

 James

 

by: sanagarwlPosted on 2009-09-28 at 18:41:44ID: 25445337

James,
thanks for the feedback, will rename the param
name. I assumed prefixing with Pm was
good coding practise.

 

by: James0628Posted on 2009-09-28 at 18:57:42ID: 25445395

No problem.

 FWIW, it's not unreasonable to start your parameter names with something specific that clearly identifies them as parameters.  I don't, but others may.  Personally, I find the "?" at the beginning of the name to be enough.  But if you want to start your parameter names with something, I'd use something else, since CR uses "Pm-" for the subreport parameters that it creates.

 James

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...