Solved

Pass Parameter to Crystal.....

Posted on 2000-04-17
3
258 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

825 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