473,804 Members | 3,305 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Pass Multi Parameter to Crystal Report

Kosal
68 New Member
Dear Sir/Madam

I would like you to help give me the an example pass multi parameter to crystal report.

thanks
Best Regard
Kosal
Nov 2 '08 #1
1 2497
Dököll
2,364 Recognized Expert Top Contributor
Hey there Partner!

This may be what you need:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim oCrystalApp As CRAXDRT.application
  3.  
  4. Dim oCrystalReport As CRAXDRT.Report
  5.  
  6. Dim oCrystalParameters As CRAXDRT.ParameterFieldDefinitions
  7.  
  8. Dim oCrystalParameter As CRAXDRT.ParameterFieldDefinition
  9.  
  10.  
  11.  
  12. ' Open the report
  13.  
  14. Public Sub OpenReport(cReportName as string)
  15.  
  16. Set oCrystalReport = oCrystalApp.OpenReport(cReportName, crOpenReportByTempCopy)
  17.  
  18. Set oCrystalParameters = oCrystalReport.ParameterFields
  19.  
  20. End Sub
  21.  
  22.  
  23.  
  24. 'Set Parameters
  25.  
  26. Public Sub SetParameter(cParmName as string, cParmValue as string)
  27.  
  28. For Each oCrystalParameter In oCrystalParameters
  29.  
  30.     If oCrystalParameter.Name = cParmName  Then
  31.  
  32.         Select Case oCrystalParameter.ValueType
  33.  
  34.             Case crDateField, crDateTimeField, crDateField
  35.  
  36.                 oCrystalParameter.SetCurrentValue CDate(cParmValue)
  37.  
  38.             Case crNumberField
  39.  
  40.                 oCrystalParameter.SetCurrentValue Val(cParmValue)
  41.  
  42.             Case Else
  43.  
  44.                 oCrystalParameter.SetCurrentValue cParmValue & ""
  45.  
  46.         End Select
  47.  
  48.     End If
  49.  
  50. Next oCrystalParameter
  51.  
  52. End Sub
  53.  
Have a look here if not helpful:
http://www.google.com/search?hl=en&r...b6&btnG=Search

Let us know if anything worked...
Nov 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1842
by: Michael | last post by:
I followed the solution document at the http://support.businessobjects.com/library/kbase/articles/c2015079.asp?ref=devzone_netzone_howto .. However, the Crystal Report prompt is still showing. The following are my scenario, the platform, and partial code information. Thanks in advance for the help, Michael J. ------------------------ 1. Scenario: I am trying to pass the parameter value to an embedded Crystal Report file from C#.NET...
0
1628
by: Brenny | last post by:
Hi I'm developing a project and in the project, I used crystal report. Firstly my database isn't protected with password. After finishing project I determined a password for my database. Firstly I opened my database as private usage. I determined a database password. Only password, there iso no login ID or user ID. After that, I edited my crystal report.In the crystal report I changed only jet database password. In the report...
6
3579
by: Woody Splawn | last post by:
I am using SQL Server 2000 as a back-end to a VS.net Client/Server app. In a certain report I use a view as part of the query spec. For the view, at present, I am querying for all the records in the table. But I am wondering if there is a way, at runtime, to pass values to the View (like start date and end date) so that I don't have to return every record in the table of my view. If I can't pass a parameter, perhaps I can create a view,...
2
2219
by: Raj | last post by:
How to pass a Two Date parameter to a report at runtime using VB .NET -- Raj Kumar Mishra jcast Networks Ltd. New Delhi. India. 91-51678212,13,14
1
1686
by: Ray | last post by:
Hi all, I would like to ask how to pass a parameter from vb.net to Crystal Report. So I can select a record from SQL database in the Crystal Report. Thanks a lot, Ray
1
2252
by: Ray | last post by:
Dear all, How to pass parameter from vb.net to Crystal Report? I'm now using ReportDocument and CrystalReportViewer. However, I don't know how to pass a parameter to the report and print the parameter in the report. Please help. Thanks a lot, Ray
4
2262
by: Marcelo | last post by:
Any suggestion? Thanks Marcelo
0
1810
by: lrobo01 | last post by:
I'm having a problem with Crystal report.net with ASP.NET. The problem occurs when exporting the report. The report uses a discrete parameter with multiple values. When the report is loaded into the crystal report view it shows all the values from the discrete parameter. But when I export the report it only shows the values from the last discrete parameter value enter. My code is listed below:
0
2113
by: PriyaManasarovar | last post by:
Can someone help how to pass parameters to a crystal report using a Crystal report object? I am using a console application & hence crystal report viewer cannot be used. And i need to pass the parameter through a batch file at run time? I have included a code here to pass parameters, but its giving invalid index error when i try to pass parameters: report1 = app.OpenReport(sfilename) crxDatabase = report1.Database ...
0
9708
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10588
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7623
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.