FindUsersInstances.csp

<%@ Language=JavaScript%>

<!-- #include file="RetrieveIStore.csp" -->

<!-- #include file=helper_js.csp -->


<%


function Main()

{

    var IStore;

    IStore = RetrieveIStore();

    if (IStore == null)

    {

        Response.Redirect ("Start.csp");

        return;

    }


    // Retrieve the email address to search for.

    var Email = String(Request.Form.Item("Email"));

    // The result of the query

    var Result;

    // The instance of the report.

    var Report;

    // Query for all report instances that contain the newly added Email property.

    Result = IStore.Query("Select SI_NAME From CI_INFOOBJECTS Where SI_PROGID='CrystalEnterprise.Report'"

    + "And SI_INSTANCE=1 And Email='" + Email + "'");


    if (Result.Count == 0)

    {

        Response.Write ("No instances of the custom value " + Email + " could be found.");

        return;

    }

    

    Response.Write ("Looking for instances containing the custom value: ("+Email+") <BR>");


    for (k=1;k<=Result.Count;k++)

    {

        Report = Result.Item(k);

        Response.Write ("Found: " + Report.Title + "<BR>");

    }

}


Main();


        

%>






Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com