IgnoreBlanks (WBIK)

Formßt bloku:

IgnoreBlanks: { none | CRLFonly | all }

P°φkaz umo₧≥uje zvolit zp∙sob prßce s tzv. prßzdn²mi znaky (white spaces, tj. znaky s ASCII k≤dem 9 - horizontßlnφ tabulßtor, 10 - od°ßdkovßnφ LF, 11 - vertikßlnφ tabulßtor, 12 - odstrßnkovßnφ - form feed, 13 -od°ßdkovßnφ CR, 32 - mezera) v Üablonßch mimo HTW zßvorky (tj. mimo <%...%>). V konektoru se zvolφ prßv∞ jedna z nabφzen²ch mo₧nostφ. Nenφ-li blok pou₧it, pou₧ije se none.

JeÜt∞ jednou z∙razn∞me, ₧e p°i volb∞ all, nebo CRLFOnly se tyto znaky do v²slednΘho dokumentu dostanou jedin∞ tehdy, pokud jsou souΦßstφ citovanΘho v²razu.

P°φklad:

Export v²sledku statistiky e-Shopu v CSV, pro formßtovßnφ v²stupu je zapot°ebφ nastavit typ a p°esn∞ pracovat s konci °ßdk∙:

<%WBC%>
// export v²sledku statistiky Obraty v Φase v CSV
RequiredValues: interval ord ds typ obch pocet

Content-type: "text/plain; charset=windows-1250"
IgnoreBlanks: all

DeclareVariable: podmstr:String[250]=""

SQLStatement: 
+ CALL Podminka_cas(%interval%,%pocet%,%ds%,%typ%,%obch%,:>podmstr)

SQLStatement: PoSkupinach
#if interval=1
+SELECT Date2str(OH.datum,1) AS dat,
+ SUM(OH.sum_obj) AS bezdph, COUNT(OH.id_dobj) AS pocet_obj, SUM(OH.k_uhrade) AS sdph, OH.datum
+ FROM Obj_header AS OH, Obchodni_partneri AS OP
+ WHERE %podmstr%
+ GROUP BY OH.datum
#endif
#if interval=2
+ SELECT Int2str(Month(OH.datum))||"_"||Int2str(Year(OH.datum)) AS dat,
+ SUM(OH.sum_obj) AS bezdph, COUNT(OH.id_dobj) AS pocet_obj, SUM(OH.k_uhrade) AS sdph, OH.datum
+ FROM Obj_header AS OH, Obchodni_partneri AS OP
+ WHERE %podmstr%
+ GROUP BY Month(OH.datum)
#endif
#if ord=1
+ ORDER BY datum 
#endif
#if ord=2
+ ORDER BY sdph DESC
#endif
<%/WBC%>

<%if interval="1"%>Dny<%elseif interval="2"%>Mesice<%endif%>,Pocet_obj,Objem_bez_dane,Objem_s_dani<%#13#10%>

<%begindetail PoSkupinach%>
<%dat%>,<%pocet_obj%>,<%bezdph;-101%>,<%sdph;-101%><%#13#10%>
<%enddetail%>