6/18/2025 4:28:47 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.
|
|
|
|
passing parameters to Reports
Posted: 04 Jun 07 8:32 PM
|
Saleslogix 7.0 SQL server 2005
I have a custom table(HISTORY_ACCESS) that has 2 fields UserID and AccessID.. it list all the user visibility rule for a given user (i.e U6UJ9A000000 can only view U6UJ9A000000 's history; U6UJ9A000001 can view history for U6UJ9A000000,U6UJ9A000001,U6UJ9A000002,U6UJ9A000003 U6UJ9A000002 can view history records for U6UJ9A000000 and U6UJ9A000002)
I want to make sure that ALL my SLX reports (the out of the box ones) displays the history details based on this custom table.
How do I pass the current userID to all the report so that I can filter my custom hisory_access table for that user. if I do that, I can then join the AccessID field to the history table's userID and display only the required result
data in HISTORY_ACCESS table U6UJ9A000001 U6UJ9A000000 U6UJ9A000001 U6UJ9A000001 U6UJ9A000001 U6UJ9A000002 U6UJ9A000001 U6UJ9A000003 U6UJ9A000002 U6UJ9A000000 U6UJ9A000002 U6UJ9A000002 U6UJ9A000000 U6UJ9A000000
|
|
|
|
Re: passing parameters to Reports
Posted: 05 Jun 07 8:27 AM
|
I am not too familiar with the code area where SLX reports are called. I don't even know if the code is accessible. The fact is you are asking the OOTB reports to use a custom table. There is no easy way to do this with out rewriting the OOTB reports. You are going to have to customize each and every OOTB report to include your custom table in addition to passing the current userid to the reports.
John G. |
|
|
|
Re: passing parameters to Reports
Posted: 05 Jun 07 8:38 AM
|
I am not too familiar with the code area where SLX reports are called. I don't even know if the code is accessible. The fact is you are asking the OOTB reports to use a custom table. There is no easy way to do this with out rewriting the OOTB reports. You are going to have to customize each and every OOTB report to include your custom table in addition to passing the current userid to the reports.
John G. |
|
|
|
Re: passing parameters to Reports
Posted: 06 Jun 07 10:34 AM
|
Hey, David,
Here's a document that I wrote so that I would remember how to do it for myself. This example is for 6.2.
In summary you need to provide: A launch script to call the report and create a global variable. A script that launches with the report's WhenOpened event. The report to print.
Here's what I wrote:
Summary This article desribes how to call a report by a specific ID.
Plugins Involved A launch script to call the report and create a global variable. A script that launches with the report's WhenOpened event. The report to print.
Launch Script Call a script that creates a global variable with the GlobalInfoSet function, then launches a specific report via the DoInvoke function.
E.g.
sub Main Application.BasicFunctions.GlobalInfoSet "g_TemporaryOpportunityID",application.BasicFunctions.CurrentOpportunityID Application.BasicFunctions.DoInvoke "CrystalReportPreview","Opportunity:PEx Placement" end sub
WhenOpened Script
On the report that you want to filter, for the WhenOpened event (properties of the report itself, accessible by selecting Properties with a right-click from Manage Reports in Architect), select an active script to execute and use the ReportAddCondition function to create a parameter for the report that you execute.
E.g.
option explicit Sub Main dim accid accid = application.BasicFunctions.GlobalInfoFor ("g_TemporaryOpportunityID")
With Application.BasicFunctions .ReportClearConditions .ReportAddCondition "Opportunity:OpportunityID", "=", "'" & accid & "'" , "string", "" .GlobalInfoClear ("g_TemporaryOpportunityID") End With End Sub
Execute the Script when the report opens
Click Manage | Reports from within Saleslogix Architect. Locate the report that you called from the launching script (example above), and double-click. On the Execution tab, specify properties for the When Open event by clicking the elipsis. For Action, select "ActiveScript." For Argument, locate and select the When Open script (like the script example above).
Final Step Associate the launch script with an event in Saleslogix, whether it's the clicking of a button, or a script that launches the report directly, or what not.
|
|
|
| |
|
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!
|
|
|
|
|
|
|
|