Jump to content
We've recently updated our Privacy Statement, available here ×

as_9

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

as_9's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. In the compilation i always get the warnings: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by net.sf.jasperreports.engine.util.ClassUtils (file:/C:/Development/Java/Eclipse%20Workspace/rpgen/lib/jasperreports-5.6.0.jar) to constructor com.sun.org.apache.xerces.internal.util.XMLGrammarPoolImpl() WARNING: Please consider reporting this to the maintainers of net.sf.jasperreports.engine.util.ClassUtils WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release Mai 02, 2019 3:40:11 NACHM. net.sf.jasperreports.engine.design.JRJdk13Compiler compileClasses INFO: Note: C:DevelopmentJavaEclipse Workspacerpgenblank_1556804410135_187077.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. --------------------------------- The code should be correct: The .jar looks like: jasperMasterReport =JasperCompileManager.compileReport((String) (String.valueOf(reportTemplatePath) + sourceFile));jasperPrint = JasperFillManager.fillReport((JasperReport) jasperMasterReport,parameters, con);JasperExportManager.exportReportToPdfFile(jasperPrint, destinationFile);[/code]the pdf is created but it is empty. For con i am using also a good connection string, that i tested multiple times. If i use this connection string directly in jaspersoft studio, it works. But when i want to do it with the api, I always get these warnings and my pdf has no database input. Last year I created many reports with this method. Do you know what the problem is? My jar has no depracated code. This "blank_1556804410135_187077.java" i guess it is created automatically with the compilation. I even cant create very simple reports with a single query. Do I receive no data because the compilation uses depracted code? Or do I use a wrong java version? (java version "12.0.1" 2019-04-16)
  2. Hi, I am using Excel (.xlsx) as database. In the main report i use the main data Adapter with a sheet selection. (it has no effect. i have to make the sheet selection in the java code, too) But it works and i get my stuff printed. But now i want to use a list (and later subreports) in my report with data from another sheet and this does not work :( I created a new Data Adapter -> it can read all fields and there is a sheet slection too. But when I want ot display the data of my list -> the list is empty (null values). The correct Dataset is selected and i use a JRDatasource Experession -> probably this is the wrong part. It is similar to howi I work with xml just i changed the last part "exceldatasource". ((net.sf.jasperreports.engine.data.ExcelDataSource)$P{REPORT_DATA_SOURCE}) In my Java program i use: ExcelDataSource jrxlsds; try { jrxlsds = new ExcelDataSource(xlsFileName); jrxlsds.setSheetSelection("Jasper"); jrxlsds.setUseFirstRowAsHeader(true); this works for the mainreport only. Is it possible to make some sheetSelection for lists and Subreports, too? I try different ways for hours and i don't make any progress >.< If somebody can build a report with a simple list including data from 1 excel document from different sheets... and show me how to do this... it would make me happy :D
  3. The solution i found for this: - creating a new subreport for the pictures - Edit Page Format of subreport - set Columns => so u can have as many records you want horizontally
  4. Hi, i made a very dynamic and complicated report. I try to make it simple here: i have the bands: detail1 detail2 detail3 and other uninteresting stuff. Depending on database there can be different combinations of the print order of detailbands because of print when expression. What I want: When detail1 is in the lower part of the page -> there should be a break over it, so detail 1 is printed on the next page. For example the page is 200x500 I imagined something like this: "break" element in detail 1 has a print when expression like "if element.position.y >= 400". But i dont know how to get the element position on the page and i m not even sure if it is possible. Has somebody an idea, how i can solve my problem?
  5. Hey, i have a db like: Type | Question | Answer | Picture A | x | y | null B | abc | def | path ... The report i build simple: ------------------------------- $f{question} $f{answer} | detailband 1 (print when $f(type).equals("A")) ------------------------------- | IMAGE | | detailband 2 (print when $f(type).equals("B") __________________________________________________________________ And this works nice. But i would like to save some space and place: | IMAGE | | IMAGE | -> that means the 2nd record with type B should be in this case in the same row as the 1st with type B. Do you have an idea or do you know a way how it is possible? i found a semi-solution but still need to make it fine. (sorry, i translated it the wrong way -> i meant 2 records from the sql query in the same row) When i add columns in the page Format and paste in the source: printOrder="Horizontal" it does exactly what i want. 1st data -> picture is left. 2nd data picture is right. but i have like 8 different detailbands and i need this option just for 2 detailbands. Is it possible to make the same thing like adding multiple columns in pageformat just for 2 detailbands and the rest is default with just 1 column? Here are some pictures: https://imgur.com/a/qgmYUzK there you see i have different bands. The important one is detail6. There i want the picture and textfield to be printed horizontally. The other detailbands should be printed normally.
  6. I think my mistake is using an excel sheet. After importing the data in a mysql db and making the connection - the table is filled. (i dont know the excel logic but maybe the file is locked when the data is imported and maybe cant open for the table? so i get null values)
  7. It seems to be a bug or something like this. On my side, it is an excel problem. When using a excel sheet as db, it works normally for the detail bands but my table in the summary is empty. No idea why. But i copy&pasted the table in a mysql database. Now both detail band and the table are filled.
  8. I think, we have the same problem... Really would like to know the solution.
  9. Hi, i made an excel file with a table like this: TypeData1Data2Data3Aabcdefghi In the report I have 8 detail bands (1 for each Type, that is printed, when the right type is in the query) - it works fine. Now i want in the summary band a Table, that shows me some data from the same excel file. 1. I generated "DataAdapterExcel" and selected the excel File and i got automaticly all the fields. 2. After designing the report and placing the table in summary band, I created Dataset1 with "DataAdapterExcel" and in the Query i have SELECT * FROM Table1 -> When clicking on Data preview i see the same Data as in the main report. 3. click on Table element -> Dataset Run (Dataset1) -> "Use same JDBC connection used to fill the master report" So theoretically, i have to get the data displayed in detail 1-8, in the table, too. But my table is empty :( and i dont know why. I worked on other reports that are using table, too in summary band and it's working nice. The only difference -> it was an empty report and i made the connection with a .jar file. So i don't know why the same stuff doesn't work, if i select the "DataAdapterExcel" Here are 2 screenshots: https://imgur.com/EsCees2 (how the bands look like) https://imgur.com/oO2GVE4 (how the preview looks like)
  10. Okey, i "solved" it with a very ugly method. It works now the way i like but i dont know if it should be done this way. I just decreased the size of the tables to 1 px and now when 5-7 tables are blank/null the empty space is only 5-7 px. Well in fact it is no solution and the problem is not really solved... but you dont see a big difference. i would like to have something like a "float" for the other direction, too. Float seems to work only, if something is exanding but not in the opposite direction, if something is dissapearing.
  11. i have a detailband (had many detailbands, too but same result). In the detailband i use many tables with each table having an unique dataset. The report is mostly generated the way i like. But when a dataset is empty, it is like the table is invisible and the next table is under the invisible one instead of its position. So with many "blank" tables i will have much blank space and thats not what i want. [table a]----->[table a]----->[table a] [table b]----->[blank ]----->[table d] [table c]----->[space ]-----> [table d]----->[table d]-----> ok --> b,c dataset = null---> 3rd column i want i hope you understand what i mean :D i tried with "float", "remove line with blank" + "blank when null" but none of that worked. Somebody knows how to solve it?
  12. "Your group should break every record." -> i m not sure where to set this up. In the group properties i have: name, expression, min height, min details, start new column, start new page, reprint heder on each page, reset page number, keep together, prevent orphan footer, footer position, layouts, height, split type, print when expression.
  13. Hi, thx for the answer. i have now: <Group1 Group Header 1> <G1 gH 2> <G1 gH3> <Detail 1> <Detail 2> <Detail 3> Is this the right way? What do I have to write in the printwhen expression, so than h1 is printed over detail 1 and h2 over detail2?
  14. Hi i want to create in Jaspersoft Studio the following report: <Column Header1> <Detail1> <Column Footer1> <Column Header2> <Detail2> <Column Footer2> <Column Header3> <Detail3> <Column Footer3> And i dont know how to realise it. What i can do: <Column Header> <Detail1> <Detail2> <Detail3> <Column Footer> And thats not what i like. I read in the forum somebody else had a similar issue and the answer was to create groups. But somehow it doesn't work the way i want or i do something wrong. The result i get with groups: <Column Header> <Group1 Header> <Group2 Header> <Group3 Header> <Detail1> <Detail2> <Detail3> <Group3 Footer> ... How can i realise it? I hope somebody can help me.
×
×
  • Create New...