StiDatePickerShow is not defined
Posted: Tue Oct 30, 2012 2:12 pm
Hi,
I'm using the trial version of Stimulsoft.Reports.Web 2012.2 to put together a test application to see if it's suitable for our requirements.
One of our requirements is that it works with our current set of reports. Some of those reports use dialog boxes, and have datepickers on the dialogs.
When running those reports, I'm getting a javascript error:
I have the following on my page:
And in my code behind am calling the following when generating the report:
Am I missing something from my page? A reference to some web or script resources? Reports without datepickers work just fine.
I'm using the trial version of Stimulsoft.Reports.Web 2012.2 to put together a test application to see if it's suitable for our requirements.
One of our requirements is that it works with our current set of reports. Some of those reports use dialog boxes, and have datepickers on the dialogs.
When running those reports, I'm getting a javascript error:
Code: Select all
ReferenceError: StiDatePickerShow is not defined
StiDatePickerShow(this, "yyyy/mm/dd");
Code: Select all
<Sti:StiWebViewer ID="viewer" runat="server" Visible="false" />
Code: Select all
public void LoadReport(Report model)
{
var report = new StiReport();
report.Load(model.Path);
if (IsValidReport(report.GetComponents()))
{
string filter = this.FilterValue;
foreach (StiSqlDatabase database in report.Dictionary.Databases)
{
database.ConnectionString = ConfigurationManager.ConnectionStrings["Connstr"].ConnectionString;
}
if (!string.IsNullOrEmpty(filter))
{
foreach (StiDataSource dataSource in report.Dictionary.DataSources)
{
string query = ((StiSqlSource) dataSource).SqlCommand;
((StiSqlSource) dataSource).SqlCommand = query.Replace("('%wc%' = '%wc%')",
string.Format("({0} IN ({1}))",
model.KeyWord,
filter));
}
}
this.viewer.Report = report;
this.viewer.ProcessReport();
this.viewer.Visible = true;
}
else
{
this.InvalidReportErrorVisible = true;
}
}
private static bool IsValidReport(StiComponentsCollection components)
{
bool isValidReport = true;
var invalidControlTypes = new List<Type>
{
typeof (StiGroupBoxControl),
typeof (StiGridControl),
typeof (StiPictureBoxControl),
typeof (StiCheckedListBoxControl),
typeof (StiLookUpBoxControl),
typeof (StiNumericUpDownControl),
typeof (StiListViewControl),
typeof (StiTreeViewControl)
};
foreach (StiComponent component in components)
{
Type type = component.GetType();
foreach (Type invalidType in invalidControlTypes)
{
if (type == invalidType)
{
isValidReport = false;
}
}
}
return isValidReport;
}