Hello, Dear All,
I’m trying to crate a cross tab report ( 300 Rows X 15 Columns ) with Virtual List Technique which is related to just one table.
I’m getting client names in first column without problem.
But, second column data is not matching with first column (ClientNames).
Also, i wonder what happened to when ExecuteSQL didn’t find anything in the query. Because Most of the column2 data are must be blank.
Please help me to work it out.
Here is my report script;
Set Variable ( $ClientList; Value:
query = “SELECT DISTINCT MusteriIsmi FROM vl_UPLITEMS WHERE PlanTarihi = ? and \"_idOgun\" = ?";
result = ExecuteSQL( query ; "" ; "" ; UPL::PlanTarihi; UPL::_idOgun)
If [ not IsEmpty ( $ClientList ) ]
Set Variable [ $ItemCount; Value: ValueCount ( $ClientList ) ]
Exit Loop If [ Let ( $i = $i + 1; $i > $ItemCount ) ]
Set Variable [ $Client; Value: GetValue ( $ClientList; $i ) ]
Set Variable [ $$COLUMN1; If( IsEmpty( $$COLUMN1 ) ; $Client ; $$COLUMN1 & ¶ & $Client ) ]
Set Variable [ $Portion; Value: Let([
query = “SELECT Porsiyon FROM vl_UPLITEMS WHERE PlanTarihi = ? and \"_idOgun\" = ? and \"_idYMK\" = ? and MusteriIsmi = ?";
result = ExecuteSQL( query ; "" ; "" ; UPL::PlanTarihi; UPL::_idOgun; 3148; $Client)
Set Variable [ $$COLUMN2; If( IsEmpty( $$COLUMN2 ) ; $Portion ; $$COLUMN2 & ¶ & $Portion ) ]