i try to show xtrareport , this report was binding to SP using Framework, but this error appear during creating document .
report.CreateDocument(true);
DataRetrievalException: خطأ عند محاولة ملء مصدر البيانات. تم طرح الاستثناء التالي:
Ambiguous match found.
this line "خطأ عند محاولة ملء مصدر البيانات. تم طرح الاستثناء التالي" mean :
error when you try to populate the data source. The following exception has been thrown
This error appears as soon as you add the stored Procedure
CREATE DEFINER=`root`@`localhost` PROCEDURE `getAccountsItems_WithDate_byDates`(in startDate Datetime, in endDate Datetime)
BEGIN
SELECT
accdet_Cat,
accdet_AccountCode,
accitem_AccID,
MergName,
accm_ID,
accitem_ID,
accitem_Date,
FORMAT(SUM(Debit),2) Debit ,
FORMAT(SUM(Credit),2) Credit ,
FORMAT((SUM(Debit)-SUM(Credit)),2) Balance
FROM view_items_accounts_tree_with_date
where accitem_Date between startDate And endDate
Group By accitem_AccID;
END
public virtual ObjectResult<getAccountsItems_WithDate_byDates_Result> getAccountsItems_WithDate_byDates(Nullable<System.DateTime> startDate, Nullable<System.DateTime> endDate)
{
var startDateParameter = startDate.HasValue ?
new ObjectParameter("startDate", startDate) :
new ObjectParameter("startDate", typeof(System.DateTime));
var endDateParameter = endDate.HasValue ?
new ObjectParameter("endDate", endDate) :
new ObjectParameter("endDate", typeof(System.DateTime));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<getAccountsItems_WithDate_byDates_Result>("getAccountsItems_WithDate_byDates", startDateParameter, endDateParameter);
}
public virtual ObjectResult<view_items_accounts_tree_with_date> fncgetAccountsItems_WithDate_byDates(Nullable<System.DateTime> startDate, Nullable<System.DateTime> endDate)
{
var startDateParameter = startDate.HasValue ?
new ObjectParameter("startDate", startDate) :
new ObjectParameter("startDate", typeof(System.DateTime));
var endDateParameter = endDate.HasValue ?
new ObjectParameter("endDate", endDate) :
new ObjectParameter("endDate", typeof(System.DateTime));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<view_items_accounts_tree_with_date>("fncgetAccountsItems_WithDate_byDates", startDateParameter, endDateParameter);
}
public virtual ObjectResult<view_items_accounts_tree_with_date> fncgetAccountsItems_WithDate_byDates(Nullable<System.DateTime> startDate, Nullable<System.DateTime> endDate, MergeOption mergeOption)
{
var startDateParameter = startDate.HasValue ?
new ObjectParameter("startDate", startDate) :
new ObjectParameter("startDate", typeof(System.DateTime));
var endDateParameter = endDate.HasValue ?
new ObjectParameter("endDate", endDate) :
new ObjectParameter("endDate", typeof(System.DateTime));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<view_items_accounts_tree_with_date>("fncgetAccountsItems_WithDate_byDates", mergeOption, startDateParameter, endDateParameter);
}
What I have tried:
i tried to bind the report with the SP directly not the function but there is no fields.
also i tried to re add the stored procedure , in "manage Stored Procedures" window i clicked on Preview and the same error appear
Data loading failed because the Exception occurred
Ambiguous match found.