Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, August 23, 2025 
 
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: Prompted for Crystal Params twice - any ideas?
Matt Dockins
Posts: 159
 
Prompted for Crystal Params twice - any ideas?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 May 08 9:37 PM
I'm trying to display a simple Crystal Report in the Crystal viewer (System:SLX Crystal Report Viewer) and have two formatting parameters in the report.
I have a simple button that feeds the report a recordselectionformula then displays it in the viewer, it displays fine, but every single time I'm prompted to input the Crystal Parameters twice.

Any ideas? Here is my code:
on error resume next
dim strFileName, strAID, strQID, strQPIDs
dim strErrMsg, objRDC
dim objFS, objFile

strQID = Form.CurrentID
strAID = lueAccount.LookupID

set objRDC = Application.BasicFunctions.GetCrystalReport("Quote:Quote Detail")

if (err.number <> 0) then
if (err.number = 424) then
strErrMsg = "Report Unavailable."
msgbox strErrMsg,,"Report Not Found"
else
strErrMsg = err.number & ":" & err.description & vbCrLf & "Sub cmdPreviewQuoteClick Line 254"
msgbox strErrMsg,,"Error"
end if
err.clear
end if
if (chkShowParents.Text = "T") then
strQPIDs = GetQuoteProductParentIDs(strQID)
strQPIDs = "'" & replace(strQPIDs,",","','") & "'"
objRDC.RecordSelectionFormula = "{ASI_QUOTE.ACCOUNTID} = '" & strAID & "' and {QUOTE.QUOTEID} = '" & strQID & "' and {QUOTEPRODUCT.QUOTEPRODUCTID} in [" & strQPIDs & "] and ({QUOTEPRODUCT.OPTIONAL} <> 'T' or isnull({QUOTEPRODUCT.OPTIONAL}))"
else
objRDC.RecordSelectionFormula = "{ASI_QUOTE.ACCOUNTID} = '" & strAID & "' and {QUOTE.QUOTEID} = '" & strQID & "' and ({QUOTEPRODUCT.OPTIONAL} <> 'T' or isnull({QUOTEPRODUCT.OPTIONAL}))"' and {?FaxCoverID} = '"& strFaxCoverID &"'"
end if

Dim objMainView, objDetail

Set objMainView = Application.MainViews.Add("System:SLX Crystal Report Viewer", 2, False) 'DNL
objMainView.Height = 600
objMainView.Width = 800

objMainView.Caption = Application.Translator.Localize("SalesLogix Crystal Report Viewer")

Set objDetail = objMainView.DetailsView
objDetail.Script.Display objRDC

objMainView.Show ' show report in non-modal dialog

Set objDetail = Nothing
Set objMainView = Nothing

objRDC.discardsaveddata
set objRDC = nothing
[Reply][Quote]
Matt Dockins
Posts: 159
 
Re: Prompted for Crystal Params twice - any ideas?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 May 08 4:26 PM
h'llo? :P

I think I hear crickets chirping :D
[Reply][Quote]
Matt Dockins
Posts: 159
 
Re: Prompted for Crystal Params twice - any ideas?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 May 08 11:34 AM
After walking through the code step by painful step I found I was adding the crystal report to the viewer before the viewer was displayed, so when I added it to the viewer, it prompted for parameters, then when it displayed, it prompted for parameters. I had to swap the two lines of code so that the viewer displayed first, then loaded the report. Duh.................................... Argh.

Of course, this is the way Sage was doing it, so it will be interesting to see when this issue rears its ugly head for them.
[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 © 2025 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): 8/23/2025 6:03:45 PM