Solved

Pass Parameter to Crystal.....

Posted on 2000-04-17
3
256 Views
Last Modified: 2010-05-02
I would like to pass parameter into crystal report without prompting to user.I mean from frontend(e.g. Clarify)if user select 1 option out of 3.With that option i want to pass some value as "Concise report" or " Detail Report" to crystal report.And i want to print it at particular place in my report depends on user's selection.How do i do that ?

Thanks for your time in advance.

I am eagerly waiting for your reply.

Thanks,
bhavesh55
0
Comment
Question by:bhavesh55
3 Comments
 

Expert Comment

by:RKMAGICMAN
ID: 2724650
What version of crystal are you using?
I have the answer but I may only be valid for crystal 7.
0
 

Expert Comment

by:renga_t
ID: 2725213
Use "ParameterPromptingEnabled" property of the object "CRPEAuto.Report" and set the value to false for not prompting for parameters.
0
 

Accepted Solution

by:
SergeDymkov earned 30 total points
ID: 2725318
Or you can use Crystal Report OCX that comes with VB (so it doesn't matter what version of CR you have). Let's say I have a report which based on a Stored Procedure. This Stored Procedure has one parameter:

    With CrystalReport1
        .Connect = "DSN = MyDSN;UID = UserName;PWD = Password;DSQ = DatabaseName"
        .RetrieveStoredProcParams
        .StoredProcParam(0) = "2"
        .Action = 1
    End With


Note that I pass 2 as a string. Cyrstal Reports will expect all parameters as a string, although it knows their real data types.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now