Thanks for the quick reply.
I tried it, and it should work, but it doesn’t. The SQL provided in my original post was simplified, and once I added all data & tables, both <customSql> and the individual <clause> approached produce the same error. It’s a SQL Server error, but it comes from the WHERE clause produced by $defaultWhereClause.
The error: “The multi-part identifier “Dimension.DateTimes.createdAtDayPacific” could not be bound.” It’s referring to this where clause:
WHERE (((Dimension.DateTimes.createdAtDayPacific >= '2010-11-10'
AND Dimension.DateTimes.createdAtDayPacific IS NOT NULL)
AND (Dimension.DateTimes.createdAtDayPacific <= '2010-11-10'
OR Dimension.DateTimes.createdAtDayPacific IS NULL)))
I ran the generated SQL, and this is the corrected where clause:
WHERE (((createdAtDayPacific >= '2010-11-10'
AND createdAtDayPacific IS NOT NULL)
AND (createdAtDayPacific <= '2010-11-10'
OR createdAtDayPacific IS NULL)))
I have a DateRangeItem in the UI which drives the criteria. It defaults to YESTERDAY.
DateRangeItem rangeItem = new DateRangeItem("createdAtDayPacific", "Date Range");
The datasource field definition is:
<field name="createdAtDayPacific" type="datetime"
tableName="Dimension.DateTimes" />
I’ve attached the datasource, the ListGrid and the console output. If you could please give me a head’s up as to what I’ve incorrectly configured, I’d appreciate it.
AccountsDashboardSummaryGrid.java (7.83 KB)
SmartGwt_DSErrorLog.txt (17.8 KB)
LeadCompleted.ds.xml (3.76 KB)