Solved

Pass Parameter to Crystal.....

Posted on 2000-04-17
3
260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

724 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