Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, June 28, 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!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: crystal report in 7.5.2 web
Jason Daraz
Posts: 12
 
crystal report in 7.5.2 webYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Mar 10 11:43 AM
I need to fire off a specific crystal report for the 'current entity' from a button rather than having to open the reports menu.

Does anyone have some code for this?
[Reply][Quote]
Doug Evenhouse
Posts: 66
 
Re: crystal report in 7.5.2 webYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Mar 10 11:42 AM
There is a new Reporting API available that may help you.

For example, you can add a button to a quickform and put javascript code in the onclientclick property like so:

ShowReportByName('Contact:Contacts By Lead Source - Sample');

More example API Usage:

/* Display the 'Contact:Contacts By Lead Source - Sample' using the current entity. */
javascript:ShowReportByName('Contact:Contacts By Lead Source - Sample');

/* Display the default report associated with the current entity. */
javascript:ShowDefaultReport();

/* Set the current default Contact report to 'Contact:Contact Summary - Sample' and then display it. */
javascript:SetContactReport('Contact:Contact Summary - Sample');ShowDefaultReport();

/* Display the report associated with the ID 'p6UJ9A0004SD' (i.e. Contact:Contacts By Account - Sample). */
javascript:ShowReportById('p6UJ9A0004SD');

/* Display the 'Contact:Contact Address Book - Sample' report for the Contact John Abbott. */
javascript:ShowReport('Contact:Contact Address Book - Sample', 'CONTACT', 'CGHEA0002670');


[Reply][Quote]
Lane
Posts: 121
 
Re: crystal report in 7.5.2 webYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Mar 10 2:03 PM
Doug, great info, where did you find the api ?
[Reply][Quote]
Doug Evenhouse
Posts: 66
 
Re: crystal report in 7.5.2 webYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Mar 10 3:27 PM
It was first released (as far as I know) as an add-on for 7.5.1 on the partner developer discussion forum here: http://community.sagesaleslogix.com/slsl/board/message?board.id=dev_slx&message.id=31 (must be a partner to see this post). Now, in 7.5.2, it is provided as a standard feature. Beyond what was provided in that post, I haven't been able to find any help or documentation about it but the javascript source is easy enough to read (jscript/sage-common/ShowReportUtil.js).
[Reply][Quote]
mark
Posts: 70
 
Re: crystal report in 7.5.2 webYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 12 12:47 PM
fiogf49gjkf0d

Dear All,


 


 


I just need help regarding following scenario.


 


I am using SLX 7.5.4 Web. I need to call a report on web on a button click of account detail screen by dynamically passing account id as a parameter.


 


The Report is “Custom Account Detail Report” which aspects one parameter which is accountid


 


In Architect report settings are  main table is Account table and Masteruserid is accountid


 


Externally my report works fine when I manually pass any accountid as parameter.


 


I am using below JS function for calling report.


 


function ShowReportByName(ReportName) {
    if (GLOBAL_REPORTING_URL == "") {
        alert(MSGID_THE_REPORTING_SERVER_HAS_NOT_BEEN);
        return;
    }
    if (ReportName == null || ReportName == "") {
        alert(MSGID_THE_REPORTNAME_HAS_NOT_BEEN_DEFINED);
        return;
    }
    if (Sage.Services.hasService("ClientEntityContext")) {
        var contextSvc = Sage.Services.getService("ClientEntityContext");
        var context = contextSvc.getContext();
        var strTableName = context.EntityTableName.toUpperCase();
        var strEntityId = context.EntityId;
        if (strEntityId != "") {
            var strReportId = GetReportId(ReportName);
            if (strReportId != null && strReportId != "") {
                PopulateGlobals(strReportId, strTableName, strEntityId);
                var url = "ShowReport.aspx";
                window.open(url, "ShowReportViewer", "location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=no,toolbar=no,width=800,height=630");
            }
            else {
                alert(MSGID_THE_REPORT_COULD_NOT_BE_LOCATED_FOR)
            }
        }
        else {
            alert(MSGID_THE_CURRENT_ENTITY_IS_UNDEFINED);
        }
    }
    else {
        alert(MSGID_UNABLE_TO_SHOW_THE_DETAIL_REPORT);
    }
}


 


I am giving the report name as parameter at client click. But still it is asking for the parameter.


 


 


Could you please help me with this..


 


I have also tried below JS function which is in  reportutil.js of slxlclient portal  file but it is not working it is still asking for parameter to pass manually.


 


 


function ShowReport(ReportNameOrId, EntityTableName, EntityId) {
    if (GLOBAL_REPORTING_URL == "") {
        alert(MSGID_THE_REPORTING_SERVER_HAS_NOT_BEEN);
        return;
    }
    if (ReportNameOrId == null || ReportNameOrId == "") {
        alert(MSGID_THE_REPORTNAMEORID_IS_UNDEFINED_IN);
        return;
    }
    if (EntityTableName == null || EntityTableName == "") {
        alert(MSGID_THE_ENTITYTABLENAME_IS_UNDEFINED_IN);
        return;
    }
    if (EntityId == null || EntityId == "") {
        alert(MSGID_THE_ENTITYID_IS_UNDEFINED_IN);
        return;
    }   
    var strReportId = GetReportId(ReportNameOrId);
    if (strReportId != null && strReportId != "") {
        var strTableName = EntityTableName.toUpperCase();
        var strEntityId = EntityId;
        if (strEntityId != "") {
            PopulateGlobals(strReportId, strTableName, strEntityId);
            var url = "ShowReport.aspx";
            window.open(url, "ShowReportViewer", "location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=no,toolbar=no,width=800,height=630");
        }
        else {
            alert(MSGID_THE_CURRENT_ENTITY_IS_UNDEFINED);
        }
    }
    else {
        alert(MSGID_THE_REPORT_COULD_NOT_BE_LOCATED_FOR)
    }
}


 


Thanks in advance

[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): 6/28/2025 12:33:34 AM