Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e25c106e
authored
Mar 23, 2023
by
aagusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perbaikan reports
1 parent
1561ff06
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
opensipkd/base/tools/report.py
opensipkd/base/tools/report.py
View file @
e25c106
from
pyreportjasper
import
PyReportJasper
from
opensipkd.base.tools
import
get_random_string
from
opensipkd.base
import
get_settings
,
get_params
from
platform
import
python_version
import
os
from
opensipkd.tools.report
import
*
from
opensipkd.tools.report
import
*
from
opensipkd.base
import
log
from
opensipkd.base
import
log
log
.
warning
(
"Opensipkd.base.tools.pbb depreciated use opensipkd.tools.pbb"
)
log
.
warning
(
"Opensipkd.base.tools.pbb depreciated use opensipkd.tools.pbb"
)
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import
os
from
platform
import
python_version
from
opensipkd.base
import
get_settings
,
get_params
from
opensipkd.base.tools
import
get_random_string
from
pyreportjasper
import
PyReportJasper
db_driver_port
=
{
db_driver_port
=
{
"postgresql"
:
[
"postgres"
,
"5432"
,
"org.postgresql.Driver"
,
"jdbc:postgresql://localhost:5432/pjdl_ciamis"
],
"postgresql"
:
[
"postgres"
,
"5432"
,
"org.postgresql.Driver"
,
"jdbc:postgresql://localhost:5432/pjdl_ciamis"
],
...
@@ -48,9 +48,18 @@ def jasper_export(input_file, output_file=None, schema=None,
...
@@ -48,9 +48,18 @@ def jasper_export(input_file, output_file=None, schema=None,
jdbc_driver
=
db_driver_port
[
db_driver
][
2
]
jdbc_driver
=
db_driver_port
[
db_driver
][
2
]
db_driver
=
db_driver_port
[
db_driver
][
0
]
db_driver
=
db_driver_port
[
db_driver
][
0
]
log
.
info
(
jdbc_dir
)
log
.
info
(
jdbc_dir
)
input_file
=
input_file
.
split
(
":"
)
if
len
(
input_file
)
>
1
:
path
=
__import__
(
input_file
[
0
])
path
=
os
.
path
.
dirname
(
path
.
__file__
)
input_file
=
os
.
path
.
join
(
path
,
input_file
[
1
])
else
:
input_file
=
input_file
[
0
]
if
not
output_file
:
if
not
output_file
:
tmp_report
=
get_params
(
"tmp_report"
,
"/tmp"
)
output_file
=
get_params
(
"tmp_report"
,
"/tmp"
)
output_file
=
os
.
path
.
join
(
tmp_report
,
get_random_string
(
32
))
output_file
=
os
.
path
.
join
(
output_file
,
get_random_string
(
32
))
conn
=
{
conn
=
{
'driver'
:
db_driver
,
'driver'
:
db_driver
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment