// This page is called form ChooseReport.csp. It schedules a report using the desired file
// format. Some formats require extra options: these are hard coded here.
<!-- #include file="RetrieveIStore.csp" -->
<!-- #include file=helper_js.csp -->
var ceFormatTextPaginated = 6;
var ceFormatTextTabSeparated = 7;
var ceFormatTextCharacterSeparated = 8;
function ScheduleWithFormat(IStore, ReportID, Format)
var Reports = IStore.Query("SELECT SI_ID, SI_NAME FROM CI_INFOOBJECTS WHERE SI_ID="+ReportID);
//Create an interface to the scheduling options for the report.
ScheduleInfo = Report.SchedulingInfo;
// Get the actual Report object.
var PluginInterface = Report.PluginInterface("");
PluginInterface.ReportFormatOptions.Format = Format;
// Depending on the format, extra options may be required. These are hard coded here.
PluginInterface.ReportFormatOptions.TextFormatPaginated.LinesPerPage=60;
case ceFormatTextTabSeparated:
PluginInterface.ReportFormatOptions.TextFormatTabSeparated.IsSameDate=true;
PluginInterface.ReportFormatOptions.TextFormatTabSeparated.IsSameNumber=true;
case ceFormatTextCharacterSeparated:
PluginInterface.ReportFormatOptions.TextFormatCharacterSeparated.IsSameDate = true;
PluginInterface.ReportFormatOptions.TextFormatCharacterSeparated.IsSameNumber=true;
PluginInterface.ReportFormatOptions.TextFormatCharacterSeparated.Quote="'";
PluginInterface.ReportFormatOptions.TextFormatCharacterSeparated.Separator="$$";
PluginInterface.ReportFormatOptions.ExcelFormat.BaseAreaType=4; //Details section.
PluginInterface.ReportFormatOptions.ExcelFormat.HasColumnHeadings=true;
PluginInterface.ReportFormatOptions.ExcelFormat.IsTabularFormat=true;
PluginInterface.ReportFormatOptions.ExcelFormat.UseConstColWidth=false;
PluginInterface.ReportFormatOptions.ExcelFormat.UseWorksheetFunc=true;
//Tell the APS to schedule the report.
// Retrieve the report ID and format that were posted and schedule the report.
Response.Redirect ("Start.csp");
ReportID = Request.Form.Item("ReportID");
Format = Request.Form.Item("Format");
ScheduleWithFormat(IStore,ReportID,Format);
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |