//CREATING STYLES
createStyle(name: 'title',fontBold: true, h_span: 3, h_alignment: 'CENTER', v_alignment: 'CENTER', fontHeight:20)
createStyle(name: 'header',fontBold: false,  h_alignment: 'CENTER', v_alignment: 'CENTER', fontHeight:10, leftBorder:'MEDIUM', rightBorder:'MEDIUM', topBorder:'MEDIUM', bottomBorder:'MEDIUM', wrapText: true)
createStyle(name: 'data',fontBold: false,  h_alignment: 'CENTER', v_alignment: 'CENTER', fontHeight:10, leftBorder:'THIN', rightBorder:'THIN', topBorder:'THIN', bottomBorder:'THIN')
createStyle(name: 'textData',parent: 'data')
createStyle(name: 'numberData',parent: 'data',h_alignment: 'RIGHT')
createStyle(name: 'dateData',parent: 'data',h_alignment: 'RIGHT',format: 'm/d/yy')

//REPORT
page{"РЕЕСТР"}{
    //TITLE
    rowHeight(30)
    setStyle('title')
    text("Реестр по проданным заказам")
    //HEADER
    setStyle('normal')
    nextRow()
    rowHeight(15)
    nextRow()
    rowHeight(40)
    setStyle('header')
    text('№ заказа')
    nextColumn()
    columnWidth(20)
    text('Дата создания')
    nextColumn()
    columnWidth(20)
    text('Стоимость')
    tickets{
        nextRow()
        rowHeight(10)
        text(it.fullNumber,'textData')
        text(it.createDate,'dateData')
        text(it.totalPrice,'numberData')
    }
}

