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

VS2010 Cannot pass Parameters Programmatically

When I assign reports programmatically in VS2010, the box to enter parameters pops up. I am using a simple .SetParameterValue statement. THis worked in VS2008.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 07, 2011 at 11:49 AM

    Hi, I am passing parameters to my report in the same way using vs2010 and it works fine. Have you set the EnableParameterPrompt property of the crystal report viewer to False?

    Julie P

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 09, 2011 at 05:30 PM

    Hi,

    I also experienced this problem and managed to get passed it. I found the new property on the report viewer called 'ShowParameterPanelButton' and set it false however that did NOT solve my problem. Remember too that property values are language specific if your form is localizable.

    It seems that Crystal has always had problems (well without going further, that about says it all but...) with resolving the server at run time if the server was not resolved at design time. For example, developer a report against a server, later open the report at design time where the server is no longer valid, close the report without resolving a new server, build and ship and it will probably fail to resolve the server at the customer installation. The moral is, if the report is opened at design time, the server configuration must have integrity. Go to the menu of the design time surface for the report, Select the menu Crystal.., Database, Set DataSource Location and make sure each object for the report is correctly set to a valid server. Then in the Main Report View tab of the designer, refresh the report and be sure that either the parameter selection window opens or the report displays data if there are no report parameters. While you are at it there is a check box at the top of this surface 'Save Data in Report'. I don't know what the deal is there, can't find an explanation in the docs but I unchecked it.

    Note that saving the report will cause a prompt to save in the NEW format which I assume is the new SAP sauce, Ok.

    After performing the above actions my reports again worked correctly while otherwise would simply ignore parameters and return huge data sets.

    I don't like black magic answers and I especially detest the 'I dunno it works for me' answers one so commonly finds in forums. Probably only second in annoyance to answers in the flavor 'rewrite it all this way and it should work'. What I presented above solved my problem, I hope it allows you to get passed one of the many mysterious trip points that makes Crystal such a 'joy'.

    My project is now about 7 years along and since I took the trouble to offer the above let me also indulge in a minor rant.

    My project is large and sophisticated but with all the analysis, design and coding, no problem consumed as much time, energy in terms of shear frustration, customer dissatisfaction in terms of unexpected behavior on their servers as Crystal Reports! It has been the bane of my experience on my otherwise extemely satisfying project. I have suffered through the product changing hands multiple times and yet never presenting more plainly documented or otherwise satisfying experience to the developer. I am not alone in my frustration as any developer with Crystal experience will agree even if they have been fortunate enough to benefit from someone elses knowledge.

    What was once the darling of the fledging VB community is, in my opinion, a quirky, difficult to code legacy product over shadowed by so many better products that have kept pace with modern development practices. Thankfully I need only keep existing reports working, not create new ones in Crystal Reports.

    Considering it is not open source, Crystal should present; clear documentation, good examples, clean library interfaces and great online problem resolution. In my opinion it has never stepped up to any of the above. I acknowledge the forums and I did manage to find and purchase one book over the years though frankly it was not useful.

    That is my rant against Crystal, it has been 7 years in coming. Good luck SAP. For the sake of all dependent developers I hope you do more than put a token of effort into the product and then sell it as your predecessors have done or extricated themselves from what is probably by this time, a nightmare of code under the covers.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 04, 2011 at 06:41 PM

    This is not answered, there is no property referred to in the windows forms crystal reports viewer! Meanwhile, that which used to work in CR 2008 SP2 no longer works in CR2011 SP1!!! How sad it is when the quality of systems that developers pay good money for decline into un-usability! I can't say it any more clearly, despite setting the parameters correctly according to numerous examples on this and many other web sites (and in code that used to work just fine), CR 2011 continues to show it's parameter screen even though the parameters are being programmatically set before the viewer is passed the report document.

    Please don't mark this problem as answered, it isn't!!!!!

    Add a comment
    10|10000 characters needed characters exceeded

    • I looked at the thread you refer to in your post. Looks to me like David is working it pretty hard, sample apps and all. Let him know if this is specific to CR 2011 created \ updated reports running with CRVS2010 runtime. Re. sharing a sample app. I'd be happy to look at one given:

      1) See the blog [What are these "support" forums good for anyhow?|/people/ludek.uher/blog/2011/04/07/what-are-these-support-forums-good-for-anyhow]

      2) You either work with me, or with David. No sense having two of us working the same issue. Not even contract customers get that luxury 😊

      - Ludek

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.