2012-06-06 3 views
2

맞춤 보고서를 만드는 것이 매우 쉽습니다. 나는 crm에있는 사용자에게 시작 날짜와 종료 날짜를 물어볼 필요가있다. 그래서 결과는 그 두 날짜 사이에서만 생성 된 것이다.날짜 매개 변수 정의

필자는 내 데이터 (계정, 인시던트, 계약서)를 사전 필터링하는 세 개의 매개 변수를 가지고 있으며 Visual Studio에서 두 개의 날짜 매개 변수를 추가했습니다.

하지만 지금은 꽤 붙어 있습니다 ...

도움이 될 것입니다!

편집 1 :

<?xml version="1.0"?><fetch distinct="false" mapping="logical" output-format="xml-platform" version="1.0"> 
     <entity name="incident" enableprefiltering="1"> 
     <attribute name="overriddencreatedon"/> 
     <attribute name="new_dateclotureincident"/> 
     <attribute name="title"/><attribute name="createdon"/> 
     <attribute name="new_travaileffectue"/> 
     <attribute name="ticketnumber" /> 
     <attribute name="new_dureecumuleeactivites"/> 
     <order descending="true" attribute="createdon"/> 
     <filter type="and"> 
     <condition attribute="createdon" value="@Date-Debut" operator="on-or-after"/> 
     <condition attribute="createdon" value="@Date_Fin" operator="on-or-before"/> 
     </filter> 
     <link-entity name="new_contrats" alias="aa" to="new_contrat" from="new_contratsid" enableprefiltering="1"> 
    <attribute name="new_referencecontrat"/> 
    </link-entity> 
    <link-entity name="new_lignecontrat" alias="ab" to="new_lignecontrat" from="new_lignecontratid"> 
    <attribute name="new_unitesrestantes"/><attribute name="new_unitesrestantes"/> 
    </link-entity> 
    <link-entity name="account" alias="ac" to="customerid" from="accountid" enableprefiltering="1"><attribute name="name"/> 
    </link-entity></entity></fetch> 

날짜는 보고서의 실행에 문제없이 메시지가 그러나 나는 그들을 선택 후 datas가 제대로 정렬되지 않습니다 : 여기 내 쿼리의 조각은 XML 기반 FETCH입니다. 나는 방금 두 개의 간단한 날짜 매개 변수를 만들었으므로 내가 뭘 잘못하고 있니?

답변

3

문제가 해결되었습니다.

간단한 날짜 형식입니다.

날짜 형식 표현식을 매개 변수와 연결하면 완벽하게 작동합니다.

=Format(Parameters!YourDateParameterName.value,"yyyy-MM-dd") 
+0

매우 오도 된 문제에 대한 적절한 해결책. 감사합니다! –

관련 문제