Solved

Pass Parameter to Crystal.....

Posted on 2000-04-17
3
254 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 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

11 Experts available now in Live!

Get 1:1 Help Now