Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String ls_select, ls_title, ls_popis, ls_cols, ls_col, ls_where, ls_tabs, ls_gcols, ls_group, ls_order, ls_str
- Boolean lb_e0001, lb_e0002, lb_e0003, lb_e0004, lb_e0005, lb_e0006, lb_e0007, lb_e0008, lb_e0009, lb_e0010, lb_e0011
- Boolean lb_e0001pov, lb_e0002pov, lb_e0003pov, lb_e0004pov, lb_e0005pov
- /************************************** COLUMNS *****************************/
- /* nazev cyklu */
- if of_num('zobr_e0001nazsv') = 1 then
- ls_col = 'e0001nazev'
- of_add_lab(ls_col, "Název světadílu")
- ls_cols += ' e0001.e0001nazev'+" as "+ls_col+','+r
- ls_group += ls_col+', '
- ls_gcols += ls_col+', '
- lb_e0001 = true
- end if
- if of_num('zobr_e0002kodsv') = 1 then
- ls_col = 'e0001kodsv'
- of_add_lab(ls_col, "Kód světadílu")
- ls_cols += ' e0001.e0001kodsv'+" as "+ls_col+','+r
- ls_group += ls_col+', '
- ls_gcols += ls_col+', '
- lb_e0002 = true
- end if
- if of_num('zobr_e0003kodze') = 1 then
- ls_col = 'e0002kodze'
- of_add_lab(ls_col, "Kód země")
- ls_cols += ' e0002.e0002kodze'+" as "+ls_col+','+r
- ls_group += ls_col+', '
- ls_gcols += ls_col+', '
- lb_e0003 = true
- end if
- if of_num('zobr_e0004nazze') = 1 then
- ls_col = 'e0002nazze'
- of_add_lab(ls_col, "Název země")
- ls_cols += ' e0002.e0002nazze'+" as "+ls_col+','+r
- ls_group += ls_col+', '
- ls_gcols += ls_col+', '
- lb_e0004 = true
- end if
- if of_num('zobr_e0005kodel') = 1 then
- ls_col = 'e0004kodel'
- of_add_lab(ls_col, "Kód elektrárny")
- ls_cols += ' e0004.e0004kodel'+" as "+ls_col+','+r
- ls_group += ls_col+', '
- ls_gcols += ls_col+', '
- lb_e0005 = true
- end if
- if of_num('zobt_e0006nazel') = 1 then
- ls_col = 'e0004nazel'
- of_add_lab(ls_col, "Název elektrárny")
- ls_cols += ' e0004.e0004nazel'+" as "+ls_col+','+r
- ls_group += ls_col+', '
- ls_gcols += ls_col+', '
- lb_e0006 = true
- end if
- if of_num('zobr_e0007kodre') = 1 then
- ls_col = 'e0003kodre'
- of_add_lab(ls_col, "Kód reaktoru")
- ls_cols += ' e0003.e0003kodre'+" as "+ls_col+','+r
- ls_group += ls_col+', '
- ls_gcols += ls_col+', '
- lb_e0007 = true
- end if
- if of_num('zobr_e0008paliv') = 1 then
- ls_col = 'e0003paliv'
- of_add_lab(ls_col, "Palivo")
- ls_cols += ' e0003.e0003paliv'+" as "+ls_col+','+r
- ls_group += ls_col+', '
- ls_gcols += ls_col+', '
- lb_e0008 = true
- end if
- if of_num('zobr_e0009moder') = 1 then
- ls_col = 'e0003moder'
- of_add_lab(ls_col, "Moderátor")
- ls_cols += ' e0003.e0003moder'+" as "+ls_col+','+r
- ls_group += ls_col+', '
- ls_gcols += ls_col+', '
- lb_e0009 = true
- end if
- if of_num('zobr_e0010porad') = 1 then
- ls_col = 'e0005porad'
- of_add_lab(ls_col, "Pořadí")
- ls_cols += ' e0005.e0005porad'+" as "+ls_col+','+r
- ls_group += ls_col+', '
- ls_gcols += ls_col+', '
- lb_e0010 = true
- end if
- if of_num('zobr_e0011vykon') = 1 then
- ls_col = 'e0005vykon'
- of_add_lab(ls_col, "Výkon")
- ls_cols += ' e0005.e0005vykon'+" as "+ls_col+','+r
- ls_group += ls_col+', '
- ls_gcols += ls_col+', '
- lb_e0011 = true
- end if
- /************************************** WHERE *******************************/
- //kuk na cykly
- if of_num("pk_e0001__") > 0 then
- ls_where += "e0001.pk_e0001__ = " + String(of_num('pk_e0001__')) + " and" +r
- ls_popis += "Cyklus : " + of_str('e0001kodcy') + ", "
- lb_e0001pov = true
- end if
- if of_num("pk_e0002__") > 0 then
- ls_where += "e0002.pk_e0002__ = " + String(of_num('pk_e0002__')) + " and" +r
- ls_popis += "Cyklus : " + of_str('e0002kodcy') + ", "
- lb_e0002pov = true
- end if
- if of_num("pk_e0003__") > 0 then
- ls_where += "e0003.pk_e0003__ = " + String(of_num('pk_e0003__')) + " and" +r
- ls_popis += "Cyklus : " + of_str('e0003kodcy') + ", "
- lb_e0003pov = true
- end if
- if of_num("pk_e0004__") > 0 then
- ls_where += "e0004.pk_e0004__ = " + String(of_num('pk_e0004__')) + " and" +r
- ls_popis += "Cyklus : " + of_str('e0004kodcy') + ", "
- lb_e0004pov = true
- end if
- if of_num("pk_e0005__") > 0 then
- ls_where += "e0005.pk_e0005__ = " + String(of_num('pk_e0005__')) + " and" +r
- ls_popis += "Cyklus : " + of_str('e0005kodcy') + ", "
- lb_e0005pov = true
- end if
- /************************************** TABS ********************************/
- ls_tabs += "dba.e0004,"+r
- if lb_e0003 or lb_e0003pov then
- ls_tabs += "dba.e0003,"+r
- if lb_e0003pov then
- ls_where += "e0004.pk_e0003__ = e0003.pk_e0003__ and" +r
- else
- ls_where += "e0004.pk_e0003__ *= e0003.pk_e0003__ and" +r
- end if
- end if
- if lb_e0005 or lb_e0005pov then
- ls_tabs += "dba.e0005,"+r
- if lb_e0003pov then
- ls_where += "e0005.pk_e0004__ = e0004.pk_e0004__ and" +r
- else
- ls_where += "e0005.pk_e0004__ *= e0004.pk_e0004__ and" +r
- end if
- end if
- return 255
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement