Either or drop downs

Posted by: warren_louie on 6 April 2022, 2:22 am EST

  • Posted 6 April 2022, 2:22 am EST

    I'm new with ActiveReports. I have the following javascript:

    {
    "name": "Other_Organization_Managers_PDF",
    "excelReport": "Other_Organization_Managers_EXCEL",
    "title": "Organization Managers",
    "connectionStringName" : "ReportsConnection",
    "directions" : "Please select a Domain OR Organization. You can change the organization to any organization. If you select the check box to include sub-organizations the report will include all child organizations information as well.","parameters": [
    { "name": "domain",
    "directions": "Please select a Domain:",
    "type": "Dropdown",
    "required": false,
    "query" : "SELECT DOMAIN_ID, DOMAIN_NAME, DOMAIN_ABBREVIATION FROM dbo.DOMAIN",
    "text" : "DOMAIN_NAME",
    "value" : "DOMAIN_ID DOMAIN_NAME '-' DOMAIN_ABBREVIATION" },
    {
    "name": "Orgs",
    "directions": "Select an Organization:",
    "type": "Search",
    "required": false,
    "query" : "SELECT O.NAME AS ORG_NAME, O.ID AS ORG_ID, O.STATE, O.COUNTRY FROM DBO.ORGANIZATIONS O WHERE O.ACCOUNT_STATUS = 'E', O.DOMAIN_ID",
    "default" : [{ "dataType" : "SQL",
    "query" : "SELECT O.NAME AS ORG_NAME, O.ID AS ORG_ID, O.STATE, O.COUNTRY FROM DBO.USERS U JOIN DBO.ORGANIZATIONS O ON U.ORGID = O.ID WHERE U.ID = @CURRENT_USER_ID"}],
    "columns" : [ {"text" : "Organization", "value" : "ORG_NAME" },
    {"text" : "State", "value" : "STATE" },
    {"text" : "Country", "value" : "COUNTRY" }],
    "parameters" : [ {"text" : "Search Text", "value" : "ORG_NAME"} ],
    "pageSize" : 10,
    "selectLimit" : 1,
    "maxResults" : 500,
    "value" : "ORG_ID"
    },
    {
    "name": "Level",
    "directions": "Include Sub-Organizations?",
    "type": "MultiSelect",
    "orientation" : "HORIZONTAL",
    "values": [{"text" : "",
    "value" :{"checked": 9, "unchecked": 1}}],

    I want to enforce the either or selection of Domain or Organization. How can I do that here? Thank you. We're using ActiveReports 14 and a SQL Server DB is the backend.
  • Marked as Answer

    Replied 18 April 2022, 6:12 pm EST

    Hello,

    To enforce the either-or selection of Domain or Organization parameter. You can try setting the default values of both the Domain and Organization parameters which would allow the user to preview the report whether they have entered the value of either of the given parameters or not.

    You may implement the same using the Default Values Section in the Report Parameter Dialog Box.

    For more information on the same, please refer to the below link:
    https://www.grapecity.com/activereportsnet/docs/v14/online/parameters.html

    Regards
    Dushyant Sharma
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels