The RWSFilterParams object pulls the filter list of the relevant report, and the return value of this object will come to us as string type xml.

The following line of code is an example of c # .net to fetch GetFilter.

ReportingService.RWSFilterParams parameters = new ReportingService.RWSFilterParams();
parameters.repName = "MMRPItemsList";string filterList =myService.getFilterList(parameters, basicParams);

The filter list returned to us will be as follows.

<?xml version="1.0" encoding="UTF-8"?>
<navi-filters>
   <filter type="group-selection" caption="Malzeme (Sınıfı) Türü" id="1" />
   <filter type="group-selection" caption="Malzeme (Sınıfı) Durumu" id="2" />
   <filter type="string" caption="Malzeme (Sınıfı) Kodu" id="3" range="true" />
   <filter type="string" caption="Malzeme (Sınıfı) Açıklaması" id="4" range="true" />
   <filter type="string" caption="Malzeme (Sınıfı) Özel Kodu" id="5" range="true" />
   <filter type="string" caption="Malzeme (Sınıfı) Yetki Kodu" id="8" range="true" />
   <filter type="string" caption="Malzeme (Sınıfı) Grup Kodu" id="10018" range="true" />
   <filter type="string" caption="Üst Malzeme Sınıfı Kodu" id="20" />
   <filter type="group-selection" caption="Konfigüre Edilebilir" id="10" />
   <filter type="string" caption="Birim Seti Kodu" id="22" range="true" />
   <filter type="string" caption="Birim Seti Açıklaması" id="23" range="true" />
   <filter type="group-selection" caption="ızleme Yöntemi" id="24" />
   <filter type="group-selection" caption="Stok Yeri Takibi" id="31" />
   <filter type="numeric" caption="Alış KDV Oranı (%)" id="25" />
   <filter type="numeric" caption="Satış KDV Oranı (%)" id="34" />
   <filter type="numeric" caption="İade KDV Oranı (%)" id="35" />
   <filter type="group-selection" caption="Kullanım Yeri" id="36" />
   <filter type="string" caption="Org. Birimler" id="33" range="true" />
   <filter type="string" caption="OrgBirimGrupKodu" id="9" />
   <filter type="list-selection" caption="Ambar_Bilgisi_Detayları" id="28" />
   <filter type="string" caption="Ambar Kodu" id="29" range="true" />
   <filter type="list-selection" caption="Takım_Bilesenleri" id="30" />
</navi-filters>

Convert the parameters we want to use on the rotating filter from xml to the following form. For example, we want to use the material code from the filter list above.

<?xml version="1.0" encoding="UTF-8"?> 
<filter type="string" caption="Malzeme(Sınıfı) Kodu" id="3" range="true"/>

 We remove unnecessary fields from the filter field above,

Filter types

STRING_FILTER = 1

STRING_RANGE_FILTER = 2

NUMERIC_FILTER = 3

NUMERIC_RANGE_FILTER = 4

DATE_FILTER = 5

DATE_RANGE_FILTER = 6

TIME_FILTER = 7

TIME_RANGE_FILTER = 8

GROUPSEL_FILTER = 9

LISTSEL_FILTER = 10

We change the Type field according to the filter type above.

In the material code we use, the type field above has returned to us as a string, we do this according to the filter type.

Finally, we set the value field to XML to give the value or value range that we want to call, we want value = "2 | 5", ie the material code to return values between 2 and 5.

We change the XML structure we use;

<?xmlversion="1.0" encoding="UTF-8"?> 
<navi-filters><filter type="2" id="3" value="2|5" />  </navi-filters>

Finally, in the method we used to run our report, The defined filter list is set to filter values by pulling the XML from the saved location.

string filter = System.IO.File.ReadAllText(@"D:\web\reportfilterlist.xml");
parameters.filtersValues= filter;

Below is the MetaTorrent example of the ReportingWebServis that is run using c # .net filters.

ReportingService.RWSParams parameters = new ReportingService.RWSParams();
            parameters.reportName = "MMRPItemsList";
            parameters.outputType = 4;
            parameters.outputTypeSpecified = true;
            string filter = System.IO.File.ReadAllText(@"D:\web\reportfilterlist.xml");
            parameters.filtersValues = filter;
            ReportingService.RWSBasicParams basicParams = new ReportingService.RWSBasicParams();
            basicParams.firm = 1;
            basicParams.firmSpecified = true;
            basicParams.period = 1;
            basicParams.periodSpecified = true;
            basicParams.language = "TRTR";
string reportLink =myService.executeReport(parameters, basicParams);

Telif HakkıKullanım KoşullarıGizlilik
Copyright © 2018 Logo Yazılım