8/23/2025 5:26:33 PM
|
|
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!
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.
|
|
|
|
Prompted for Crystal Params twice - any ideas?
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 |
|
|
| |
|
Re: Prompted for Crystal Params twice - any ideas?
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. |
|
|
|
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!
|
|
|
|
|
|
|
|