Comments (11)
Can anyone pass these parameters?
from jasperphp.
Hi,
this is a complex sql, i use it in my systems
SELECT p.proprietarios_codigo,
p.proprietarios_nome,
cc.cc_terceiros_codigo,
cc.bancos_codigo,
cc.cc_terceiros_agencia,
cc.cc_terceiros_conta,
cc.cc_terceiros_tipo,
cc.cc_terceiros_titular,
cc.cc_terceiros_cnpjcpf,
l.locacoes_codigo,
b.bancos_nome
FROM locacoes l
JOIN imoveis_proprietarios ip ON ip.imoveis_codigo = l.imoveis_codigo
JOIN cc_terceiros cc ON cc.cc_terceiros_codigo = ip.cc_terceiros_codigo
JOIN proprietarios p ON p.proprietarios_codigo = ip.proprietarios_codigo
JOIN bancos b ON b.bancos_codigo = cc.bancos_codigo
JOIN eventos_locacao evl ON l.locacoes_codigo = evl.locacoes_codigo
WHERE evl.proprietario_dta_venc >= "$P{dta_repasse_inicial}"
AND evl.proprietario_dta_venc <= "$P{dta_repasse_final}"
AND evl.situacao = "NOR"
$P{rd_filtrar_pagos} //here pass a complex condition part of sql ex.: AND foo = bar AND tree = wood
$P{rd_filtrar_prop_imov}
$P{rd_filtrar_repassados}
GROUP BY p.proprietarios_codigo,cc.cc_terceiros_conta
ORDER BY p.proprietarios_nome ASC
from jasperphp.
I understand, in making filters based on individual parameters, but that makes the sql assembly much more complex... something that in the application there are many filters and makes them dynamic, so when passing the formulated parameter already as a kind of p_where, it makes it easier the process a lot, and as I said that way jasperreport native jasper api supports... and it makes it much easier to use this type of parameter, with that I pass a completely customized p_where.
from jasperphp.
ok,i think to support it,
what you pass in ($ P! {p_where}) parameter?
from jasperphp.
step a sql ex:
select * from person where ($P!{p_where})
I pass a sql in the parameter
p_where = city_id=10 and neighborhood_id=25
final result
select * from person where (city_id=10 and neighborhood_id=25)
just an example, that is, I pass a sql script that filters the records, so I can pass a very complex sql with several filters...
from jasperphp.
try this ($P{p_where}) without "!"
select * from person where ($P{p_where})
and pass a sql in the parameter
p_where = city_id=10 and neighborhood_id=25
from jasperphp.
Without ! seems to solve yes... because I did a debug printing the generated sql and now yes it is generating correctly... but I have other problems in the report anything I open another post. Here's just one suggestion that I inform you is the possibility of changing the patch directory of ini config files for database connection because in my case, I already have this file pattern because I also use PDO so I wanted to use the same files...
One question what makes a report slow? because I'm testing your library I already use the report with jar JasperStart but your generated even slower... I didn't understand.
from jasperphp.
About PDO, i use one solution, runs perfect for me, you can change on line
Line 7 in ee16f92
and implement a copy of Transaction Class, but taking connection parameters in your config file.
About slow reports, i think that much objects can make report slower, i have in my systems reports what generate mor then 60 pages in less of 6 seconds, containing 3 level sub reports with querys, passing parameters end receiving totalizers.
from jasperphp.
JasperPHP\ado\TTransaction::open("dev");
when I refer to changing the patch, I refer to the possibility, for example, of changing the directory where the dev.ini file is, or even some parameter that says that a complete patch of the file is being passed, because as I said, I already have files in another folder ini config files and didn't want to be duplicating the config files
from jasperphp.
Add the solution
JasperPHP/src/ado/TConnection.php
Line 30 in c1a338d
pass full path of file including extension
from jasperphp.
yes..
from jasperphp.
Related Issues (20)
- salve, salve!
- JasperPHP + iReport 5.6 Error HOT 3
- Filter by Collection or Array HOT 4
- Conditional print how to use? HOT 4
- Suport add element frame? HOT 4
- Does not respect the positioning HOT 3
- Conditional colors? HOT 24
- Band title with subreport, empty space HOT 1
- HEADER COLUMN REPEAT? HOT 3
- Rectangle does not put the border? HOT 5
- Header page does not repeat within subreport, second page.
- Support component table, let's implement it? HOT 1
- Se visualizan formulas en Campos con Expresiones Lógicas HOT 2
- Subreports HOT 2
- Fatal error with php 8.0 HOT 1
- How to install? HOT 1
- Grouping not working
- Feature suggestion: accept different types of dbData
- PHP 8.2 support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jasperphp.