Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, May 18, 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!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Saleslogix 8.0 and Crystal, passing a condition and a parameter
Jeremy Wagner
Posts: 5
 
Saleslogix 8.0 and Crystal, passing a condition and a parameterYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Sep 15 3:51 PM

I have a crystal report and was successful in passing a condition using the BasicFunctions.ReportAddCondition
I however need more control over the crystal to do a few things


1) I need to pass a value into crystal, this is a value that isn't stored in the database so I can't pull it within Crystal


2) I need to figure out a way to generate the file name it exports to PDF as, right now when you export to PDF it tries to save it to the report ID 


I've searched all day and I have seen and attempted many methods but can't seem to get anything to work.  Currently the following code is what I'm working with:


 


Sub btnPrintQuoteClick(Sender) 


Dim oppid

oppid = Application.BasicFunctions.CurrentOpportunityID

Dim oCR, oCond, oConds

    GlobalReportController.Init

    Set oCR = GlobalReportController.CrystalReport

    oCR.Family = "Opportunity"

    oCR.Name = "Quote2"

    oCR.PluginID = ""

    oCR.Reload 


    Set oCond = New SLXReportCondition

    oCond.Table = "Opportunity"

    oCond.Field = "OPPORTUNITYID"

    oCond.Value = "'" & oppId & "'" 


    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

End Sub


The line that's throwing the error is "oCR.RDC.ParameterFields.Item(0).ClearCurrentValueAndRange" and the only error is "An error occured executing active form script" and references the line number of this line.  If I comment it out, I get an error on the the next line saying "Object doesn't support this property or method: 'oCR.RDC.SetParameterValue'" so I'm guessing the examples I'm trying to follow don't apply to SalesLogix 8.0.  Finally, if I comment out both of those lines, It does fire a report but there is no data as if the conditions being supplied aren't generating any results.  Could anyone point me in the right direction or provide an example because I'm really at a loss here.  


 


Thank you.

[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): 5/18/2024 11:44:23 PM