Passing a variable from VB.NET to a Crystal report parameter or formula with no prompt 
Author Message
 Passing a variable from VB.NET to a Crystal report parameter or formula with no prompt

Hello!

All I want to is be able to pass a variable from VB.NET to a field in
a Crystal Report (CR.NET) without the prompt being displayed.

I have looked at http://www.*-*-*.com/

for an example but this still brings up a prompt!

Can anyone help me with this simple problem (I hope)!...

Thanks

Al.



Wed, 08 Jun 2005 00:00:43 GMT  
 Passing a variable from VB.NET to a Crystal report parameter or formula with no prompt

sample code (VB.NET)

Dim crParameterFieldDefinition As ParameterFieldDefinition
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterValues As New ParameterValues()
Dim crParameterDiscreteValue As New ParameterDiscreteValue()

crParameterFieldDefinitions = Report.DataDefinition.ParameterFields
crParameterDiscreteValue.Value = Month.GetMonthInWords(Month) + ", " +
CStr(Year)
Try

    crParameterFieldDefinition =
crParameterFieldDefinitions.Item("MonthAndYear")
    crParameterValues = crParameterFieldDefinition.CurrentValues
    crParameterValues.Add(crParameterDiscreteValue)
    crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
Catch

End Try

Note:
Report will be your report.
You have to create the MonthAndYear parameter in your report otherwise it
will throw exception.

anand

Quote:
> Hello!

> All I want to is be able to pass a variable from VB.NET to a field in
> a crystal report (CR.NET) without the prompt being displayed.

> I have looked at

http://support.crystaldecisions.com/library/kbase/articles/c2010251.asp
Quote:

> for an example but this still brings up a prompt!

> Can anyone help me with this simple problem (I hope)!...

> Thanks

> Al.



Wed, 08 Jun 2005 09:59:40 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to pass parameter from VB.Net to Crystal Report

2. Parameter passing for Crystal Reports in .Net

3. Passing parameters in Crystal reports.net

4. Passing Parameters from C# to Crystal Report / Crystal Report Viewer

5. Problem with passing formula from VB to Crystal Report

6. Crystal Reports 8.5 (VB6) to Crystal Reports NET (VB.NET) conversion

7. Brian Bischof - Help - parameters not passing to Crystal from VB.NET

8. How do you pass parameters from VB 5 to crystal reports

9. Pass Parameter to Crystal Reports from VB

10. Passing SQL Server parameters to subreports in Crystal Reports 6 from VB

11. Problem with VB passing parameters to Crystal Report - Stored Procedure

12. passing Parameter from Vb to Stored Procedure In crystal reports

 

 
Powered by phpBB® Forum Software