Advertisement
Guest User

d

a guest
Jul 21st, 2016
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. String ls_select, ls_title, ls_popis, ls_cols, ls_col, ls_where, ls_tabs, ls_gcols, ls_group, ls_order, ls_str
  2. Boolean lb_e0001, lb_e0002, lb_e0003, lb_e0004, lb_e0005, lb_e0006, lb_e0007, lb_e0008, lb_e0009, lb_e0010, lb_e0011
  3. Boolean lb_e0001pov, lb_e0002pov, lb_e0003pov, lb_e0004pov, lb_e0005pov
  4. /************************************** COLUMNS *****************************/
  5. /* nazev cyklu */
  6. if of_num('zobr_e0001nazsv') = 1 then
  7.     ls_col = 'e0001nazev'
  8.     of_add_lab(ls_col, "Název světadílu")
  9.     ls_cols += ' e0001.e0001nazev'+" as "+ls_col+','+r
  10.     ls_group += ls_col+', '
  11.     ls_gcols += ls_col+', '
  12.     lb_e0001 = true
  13. end if
  14.  
  15. if of_num('zobr_e0002kodsv') = 1 then
  16.     ls_col = 'e0001kodsv'
  17.     of_add_lab(ls_col, "Kód světadílu")
  18.     ls_cols += ' e0001.e0001kodsv'+" as "+ls_col+','+r
  19.     ls_group += ls_col+', '
  20.     ls_gcols += ls_col+', '
  21.     lb_e0002 = true
  22. end if
  23.  
  24.  
  25. if of_num('zobr_e0003kodze') = 1 then
  26.     ls_col = 'e0002kodze'
  27.     of_add_lab(ls_col, "Kód země")
  28.     ls_cols += ' e0002.e0002kodze'+" as "+ls_col+','+r
  29.     ls_group += ls_col+', '
  30.     ls_gcols += ls_col+', '
  31.     lb_e0003 = true
  32. end if
  33.  
  34. if of_num('zobr_e0004nazze') = 1 then
  35.     ls_col = 'e0002nazze'
  36.     of_add_lab(ls_col, "Název země")
  37.     ls_cols += ' e0002.e0002nazze'+" as "+ls_col+','+r
  38.     ls_group += ls_col+', '
  39.     ls_gcols += ls_col+', '
  40.     lb_e0004 = true
  41. end if
  42.  
  43. if of_num('zobr_e0005kodel') = 1 then
  44.     ls_col = 'e0004kodel'
  45.     of_add_lab(ls_col, "Kód elektrárny")
  46.     ls_cols += ' e0004.e0004kodel'+" as "+ls_col+','+r
  47.     ls_group += ls_col+', '
  48.     ls_gcols += ls_col+', '
  49.     lb_e0005 = true
  50. end if
  51.  
  52. if of_num('zobt_e0006nazel') = 1 then
  53.     ls_col = 'e0004nazel'
  54.     of_add_lab(ls_col, "Název elektrárny")
  55.     ls_cols += ' e0004.e0004nazel'+" as "+ls_col+','+r
  56.     ls_group += ls_col+', '
  57.     ls_gcols += ls_col+', '
  58.     lb_e0006 = true
  59. end if
  60.  
  61. if of_num('zobr_e0007kodre') = 1 then
  62.     ls_col = 'e0003kodre'
  63.     of_add_lab(ls_col, "Kód reaktoru")
  64.     ls_cols += ' e0003.e0003kodre'+" as "+ls_col+','+r
  65.     ls_group += ls_col+', '
  66.     ls_gcols += ls_col+', '
  67.     lb_e0007 = true
  68. end if
  69.  
  70. if of_num('zobr_e0008paliv') = 1 then
  71.     ls_col = 'e0003paliv'
  72.     of_add_lab(ls_col, "Palivo")
  73.     ls_cols += ' e0003.e0003paliv'+" as "+ls_col+','+r
  74.     ls_group += ls_col+', '
  75.     ls_gcols += ls_col+', '
  76.     lb_e0008 = true
  77. end if
  78.  
  79. if of_num('zobr_e0009moder') = 1 then
  80.     ls_col = 'e0003moder'
  81.     of_add_lab(ls_col, "Moderátor")
  82.     ls_cols += ' e0003.e0003moder'+" as "+ls_col+','+r
  83.     ls_group += ls_col+', '
  84.     ls_gcols += ls_col+', '
  85.     lb_e0009 = true
  86. end if
  87.  
  88. if of_num('zobr_e0010porad') = 1 then
  89.     ls_col = 'e0005porad'
  90.     of_add_lab(ls_col, "Pořadí")
  91.     ls_cols += ' e0005.e0005porad'+" as "+ls_col+','+r
  92.     ls_group += ls_col+', '
  93.     ls_gcols += ls_col+', '
  94.     lb_e0010 = true
  95. end if
  96.  
  97. if of_num('zobr_e0011vykon') = 1 then
  98.     ls_col = 'e0005vykon'
  99.     of_add_lab(ls_col, "Výkon")
  100.     ls_cols += ' e0005.e0005vykon'+" as "+ls_col+','+r
  101.     ls_group += ls_col+', '
  102.     ls_gcols += ls_col+', '
  103.     lb_e0011 = true
  104. end if
  105.  
  106. /************************************** WHERE *******************************/
  107. //kuk na cykly
  108. if of_num("pk_e0001__") > 0 then
  109.     ls_where += "e0001.pk_e0001__ = " + String(of_num('pk_e0001__')) + " and" +r
  110.     ls_popis += "Cyklus : " + of_str('e0001kodcy') + ", "
  111.     lb_e0001pov = true
  112. end if
  113.  
  114. if of_num("pk_e0002__") > 0 then
  115.     ls_where += "e0002.pk_e0002__ = " + String(of_num('pk_e0002__')) + " and" +r
  116.     ls_popis += "Cyklus : " + of_str('e0002kodcy') + ", "
  117.     lb_e0002pov = true
  118. end if
  119.  
  120. if of_num("pk_e0003__") > 0 then
  121.     ls_where += "e0003.pk_e0003__ = " + String(of_num('pk_e0003__')) + " and" +r
  122.     ls_popis += "Cyklus : " + of_str('e0003kodcy') + ", "
  123.     lb_e0003pov = true
  124. end if
  125.  
  126. if of_num("pk_e0004__") > 0 then
  127.     ls_where += "e0004.pk_e0004__ = " + String(of_num('pk_e0004__')) + " and" +r
  128.     ls_popis += "Cyklus : " + of_str('e0004kodcy') + ", "
  129.     lb_e0004pov = true
  130. end if
  131.  
  132. if of_num("pk_e0005__") > 0 then
  133.     ls_where += "e0005.pk_e0005__ = " + String(of_num('pk_e0005__')) + " and" +r
  134.     ls_popis += "Cyklus : " + of_str('e0005kodcy') + ", "
  135.     lb_e0005pov = true
  136. end if
  137.  
  138.  
  139. /************************************** TABS ********************************/
  140. ls_tabs += "dba.e0004,"+r
  141.  
  142. if lb_e0003 or lb_e0003pov then
  143.     ls_tabs += "dba.e0003,"+r
  144.    
  145.     if lb_e0003pov then
  146.         ls_where += "e0004.pk_e0003__ = e0003.pk_e0003__ and" +r       
  147.     else
  148.         ls_where += "e0004.pk_e0003__ *= e0003.pk_e0003__ and" +r
  149.     end if
  150. end if
  151.  
  152. if lb_e0005 or lb_e0005pov then
  153.     ls_tabs += "dba.e0005,"+r
  154.    
  155.     if lb_e0003pov then
  156.         ls_where += "e0005.pk_e0004__ = e0004.pk_e0004__ and" +r       
  157.     else
  158.         ls_where += "e0005.pk_e0004__ *= e0004.pk_e0004__ and" +r
  159.     end if
  160. end if
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167. return 255
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement