Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
865fc95e
Commit
865fc95e
authored
May 03, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reportes v3
parent
15fb883f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
views.py
reports/views.py
+11
-5
No files found.
reports/views.py
View file @
865fc95e
...
...
@@ -526,7 +526,7 @@ def PDFGenerator(request,purchase_id):
style3
.
fontSize
=
19
# Header
im
=
Image
(
USERS_PATH
+
'header.png'
,
width
=
3
00
,
height
=
70
)
im
=
Image
(
USERS_PATH
+
'header.png'
,
width
=
5
00
,
height
=
70
)
im
.
hAlign
=
'CENTER'
story
.
append
(
im
)
...
...
@@ -575,16 +575,22 @@ def PDFGenerator(request,purchase_id):
# Header
im
=
Image
(
USERS_PATH
+
'header.png'
,
width
=
3
00
,
height
=
70
)
im
=
Image
(
USERS_PATH
+
'header.png'
,
width
=
5
00
,
height
=
70
)
im
.
hAlign
=
'CENTER'
story
.
append
(
im
)
story
.
append
(
Spacer
(
1
,
.3
*
inch
))
story
.
append
(
Spacer
(
1
,
.5
*
inch
))
fecha
=
file
[
6
:
8
]
+
"/"
+
file
[
4
:
6
]
+
"/"
+
file
[
0
:
4
]
story
.
append
(
Paragraph
(
"<strong>"
+
fecha
+
"</strong>"
,
styleN
,
))
story
.
append
(
Spacer
(
1
,
.3
*
inch
))
# table with images
story
.
append
(
myTable
(
path1
,
SCL
,
file
))
story
.
append
(
Spacer
(
1
,
.
5
*
inch
))
story
.
append
(
Spacer
(
1
,
.
2
*
inch
))
# add barchart and legend
...
...
@@ -596,7 +602,7 @@ def PDFGenerator(request,purchase_id):
story
.
append
(
PageBreak
())
# build our document with the list of flowables we put together
doc
=
SimpleDocTemplate
(
ruta
+
reporteDir
+
".pdf"
,
pagesize
=
letter
,
topMargin
=
5
,
title
=
searchInfo
[
'report_name'
]
+
" "
+
searchInfo
[
'title'
],)
doc
=
SimpleDocTemplate
(
ruta
+
reporteDir
+
".pdf"
,
pagesize
=
letter
,
topMargin
=
7
,
title
=
searchInfo
[
'report_name'
]
+
" "
+
searchInfo
[
'title'
],)
doc
.
build
(
story
)
#return HttpResponse (request.POST.get('ruta'))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment