This question already has answers here:
How to show/hide a column at runtime?
(8 answers)
Closed 5 years ago.
I am using ireport to design jasper reports. I want to have a report that can be dynamically generated based on user input. Means columns can be added/removed based on user input.
The one solution I know is to design the report that contains all the columns, Then based on the user input, Using "Print When Expression" can hide the column, But the empty column will still be there. Is there any way to remove the columns completely without leaving empty space in ireport.
JasperDesign is used to modify the template object (JasperReport) from within the code at runtime. I guess this might fit in your case.
Also check this SO question
Related
This question already has answers here:
Best way to store data between program runs in java?
(11 answers)
How can I save the state of my program and then load it?
(2 answers)
Closed 5 years ago.
For example, if I had checked a JCheckBox when I opened the program, how would I make the it remember the status of the checkbox so that the next time I open up the JFrame, the box stays checked.
I would also like to extend this question to other swing components like radiobuttons, color chooser, etc.
Attempted solution: The only way I can think of it is possibly making a new file so that the program can update and read the status of it and adjust the swing components when opened. However, this is too inefficient. I read online something about cookies but I am not too sure.
This question already has answers here:
How to print a JTable object in the Java application
(3 answers)
Closed 6 years ago.
I have a JTable in my application which I need to print. The printed page should contain only the table and some text above and below the table. So I ask what is easiest way to do this?
Do I need to create some kind of document, and then import the table in document and add the text, and then print the document?
well you have to go row by row and print it out
This question already has answers here:
How do you add text to JTextArea? (console simulation) [closed]
(2 answers)
Closed 7 years ago.
I am making a simple NotePad app in my spare time and i have added some buttons to add some text, like the time or an essay plan etc. I am currently using the code
textArea.setText("Text");
But it keeps on replacing all of the text, is there anyway to just add the text to the JTextArea? I've tried
textArea.addText("Text");
and it doesn't seem to work.
You need to use textArea.append("text");
You should use the append and insert methods.
Use textArea.append("text"), but I recomend JTextPane for more control like color, selection, etc.
This question already has an answer here:
SQLite:"ALTER TABLE `game` ADD UNIQUE(`name`)" Error in SQLite
(1 answer)
Closed 8 years ago.
I have an existing database and I'd like to add the UNIQUE flag to one of the columns to prevent duplicates. What exactly would be the command to put in the onUpgrade section to achieve this?
Regretfully SQLite has very basic support for alter table - you can only either rename the table or add a column - see here.
However you can use similar approach to the one we use for renaming a column.
This question already has answers here:
Java OCR implementation [closed]
(5 answers)
Closed 9 years ago.
Hey guys is it possible to read text from an image, like how you go to submit a form and it ask you to fill in the text inside image. I want to know if it is possible to read the text inside it. If so, what language?
David Biga
EDIT:
I am not trying to read captcha I was just giving an example of an image with text in it.
It is possible to read text with Optical Character Recognition.
However, CAPTCHAs are designed to thwart this, in order to distinguish humans from computers.