StiDatePickerShow is not defined

Stimulsoft Reports.WEB discussion
Post Reply
JoshR
Posts: 7
Joined: Tue Oct 30, 2012 1:42 pm

StiDatePickerShow is not defined

Post by JoshR »

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:

Code: Select all

ReferenceError: StiDatePickerShow is not defined

StiDatePickerShow(this, "yyyy/mm/dd");
I have the following on my page:

Code: Select all

<Sti:StiWebViewer ID="viewer" runat="server" Visible="false" />
And in my code behind am calling the following when generating the report:

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;
}
Am I missing something from my page? A reference to some web or script resources? Reports without datepickers work just fine.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: StiDatePickerShow is not defined

Post by Alex K. »

Hello,

Can you please send us a sample project which reproduces the issue for analysis.

Thank you.
JoshR
Posts: 7
Joined: Tue Oct 30, 2012 1:42 pm

Re: StiDatePickerShow is not defined

Post by JoshR »

Hi Aleksey,

Sorry this took so long to get to you, please see the attachment. Let me know if you have any problems running the solution.
Attachments
StimulTestApp.zip
(2.52 MiB) Downloaded 202 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiDatePickerShow is not defined

Post by HighAley »

Hello.

You should use the RenderMode="AjaxWithCache" of the StiWebViewer.

Thank you.
JoshR
Posts: 7
Joined: Tue Oct 30, 2012 1:42 pm

Re: StiDatePickerShow is not defined

Post by JoshR »

Hi Aleksey,

I've changed that in the example solution I sent you, and I still get the error. Any thoughts?

Thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiDatePickerShow is not defined

Post by HighAley »

Hello.

We made an improvement.
The solution will be available in our next prerelease build from November 16.

Thank you.
JoshR
Posts: 7
Joined: Tue Oct 30, 2012 1:42 pm

Re: StiDatePickerShow is not defined

Post by JoshR »

Hi Aleksey,

Can you tell me which release this will be in?

Thanks again :)
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiDatePickerShow is not defined

Post by HighAley »

Hello.
JoshR wrote:Can you tell me which release this will be in?
As I wrote before, the solution will be available in our next prerelease build from November 16.

Thank you.
Post Reply