Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, April 23, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Reporting & Notification Forums - Reporting
Forum to discuss reports for SalesLogix including Crystal, SQL Reports, etc. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Reporting | New ThreadView:  Search:  
 Author  Thread: Passing Parameters From v8.1
Vaughn Poulson
Posts: 32
 
Passing Parameters From v8.1Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 May 14 3:14 PM

Does anyone know how to pass parameters from saleslogix to crystal 11?


I'm trying this


oCR.RDC.ParameterFields.Item(0).CurrentValues.Add "test param"


And getting this error


SalesLogix.Reporting.API: The argument value is invalid


Paramert name: value

[Reply][Quote]
Vaughn Poulson
Posts: 32
 
Re: Passing Parameters From v8.1Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 May 14 3:42 PM

I found this method


 


<p> 

 


    oCR.RDC.SetParameterValue "TestField", "test param"

 

but i still get the pop up asking me to enter the paramater value and it is blank

here is my full code

 Dim acctId     acctId = frmAccountDetail.CurrentID     Dim oCR, oCond, oConds, oMV      GlobalReportController.Init     Set oCR = GlobalReportController.CrystalReport     oCR.Family = "Account"     oCR.Name = "Testrpt"     oCR.PluginID = ""     oCR.Reload      Set oCond = New SLXReportCondition     oCond.Table = "ACCOUNT"     oCond.Field = "ACCOUNTID"     oCond.Value = "'" & acctId & "'"      Set oConds = oCR.ReportConditions()     oConds.Add oCond      oCR.ReportConditions = oConds     stop     oCR.RDC.ParameterFields.Item(0).ClearCurrentValueAndRange     oCR.RDC.SetParameterValue "TestField", "test param"       On Error Resume Next     GlobalReportController.ExportReportTo "Preview", ""     If Err.Number <> 0 Then         MsgBox "Error Exporting The Report" & vbCRLF & "Description: " & Err.Description & vbCRLF & "Source: " & Err.Source, vbOKOnly + vbCritical, "ERROR"         Err.Clear         Exit Sub     End If

is this this crrect way to call a crystal report and pass parameters in 8.1?

is there a way to see the value of the parameter when it changes?

i have oCR.RDC.ParameterFields.Item(0).Name to see the name of the parameter, but i'm not sure what property will let me see the value as i debug it





 

[Reply][Quote]
Vaughn Poulson
Posts: 32
 
Re: Passing Parameters From v8.1Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 May 14 3:43 PM

Here is some readable code


    Dim acctId


    acctId = frmAccountDetail.CurrentID


    Dim oCR, oCond, oConds, oMV


 


    GlobalReportController.Init


    Set oCR = GlobalReportController.CrystalReport


    oCR.Family = "Account"


    oCR.Name = "Testrpt"


    oCR.PluginID = ""


    oCR.Reload


 


    Set oCond = New SLXReportCondition


    oCond.Table = "ACCOUNT"


    oCond.Field = "ACCOUNTID"


    oCond.Value = "'" & acctId & "'"


 


    Set oConds = oCR.ReportConditions()


    oConds.Add oCond


 


    oCR.ReportConditions = oConds


    stop


    oCR.RDC.ParameterFields.Item(0).ClearCurrentValueAndRange


    oCR.RDC.SetParameterValue "TestField", "test param"


 


 


    On Error Resume Next


    GlobalReportController.ExportReportTo "Preview", ""


    If Err.Number <> 0 Then


        MsgBox "Error Exporting The Report" & vbCRLF & "Description: " & Err.Description & vbCRLF & "Source: " & Err.Source, vbOKOnly + vbCritical, "ERROR"


        Err.Clear


        Exit Sub


    End If

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 4/23/2024 7:35:41 PM