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

mwarner_2

Members
  • Posts

    58
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by mwarner_2

  1. I am thinking that you are not seeing any values, because in your definition of your input control, on the Set Parameter Values page, in the Visible Columns entry, there are no columns shown. Probably you entered a column, but didn't press "Add". When editing the input control, under Type, there are many different input control types. You probably want your input to be of type "Multi-select Query".
  2. It seems like there is a limit on the number of input controls that the server can handle. Around 12 or more and the report won't run. This is even though in Studio (and in preview) there is seemingly no limit. Can someone confirm that there is a limit on the number of input controls? How many is it? Does this include the controls created in studio, or is it only for server-based controls? Thanks.
  3. I figured out a way to do this, in certain circumstances. If I just want to print out a form (which I created in a detail band), then usually the main datasource just has SQL like "Select null". That returns one row. So I added a Parameter for Number_of_Copies, and then I modified the query to return as many null rows as there are number_of_copies. So selecting 4, returns 4 detail rows, thus 4 copies. There are a few different ways to create more than one null row. Like for i = 1 to Number_of_Copies. I happened to do a cross join to a table that just has one column, n, and thousands of rows, one row for each n integer. So when I select n = 4, I get back four rows from that table, and ththus 4 rows in my result set.
  4. Lets's say that in my report, that I have detail records at the employee level. Every employee is a member of one department. Every department is a member of one division. Every division is a member of one organization. So my report is kind of like this: Organization Division Department Employee Department totals Division totals Organization totals Normally for the totals, I would create 3 variables. One for Department, with the Reset Type = [Group] Department One for Division, with the Reset Type = [Group] Division One for Organization, with the Reset Type = [Group] Organization. That is how I normally do things. It works. The only drawback is creating a Variable for each group. Is there a way to only use one variable in all three group band totals? I ask because I notice that when I add a Variable to the report, in the Text Field property, there is an Evaluation Time field. Maybe like I can set the Evaluation Time to Band (or something else), and then for the Variable I set the Reset Type to something like band (though that is not a choice), and then I can use the one variable in all 3 group bands and it knows how to properly calculate. Fewer variables would be faster to create, and easier to maintain. Thanks.
  5. After more experimenting, I have discovered more about this "problem". Let's call this parameter (for which I want to have default values) Employee_Types. The query populating the collection values for Employee_Types is dependent on another parameter value being entered by the user. Say this other parameter is Customer_Number. When I enter a default value for the Company_Number (in JS Studio), publish and then run the report, then there are pre-selected choices for Employee_Types. But If I change the Company_Number, then click off of that field, none of the the Employee_Types are pre-selected. So when a new Company_Number is entered, then the default values are no longer considered (even though the query for Employee_Types is being run again).
  6. srang - Appreciate your effort. But it didn't work for me. For this parameter, these are the values I tried: Class: java.util.Collection Nested Type Name: java.lang.String Default Value Expression - (java.util.Collection)(Arrays.asList("abc","mno","xyz")) (well not exactly those values) But after publishing to JS Server, running the report, those values are not pre-selected. Does it matter that not all the default values are in the values returned by the input control's underying query?
  7. I know how to create default values for a collection parameter that is used in a list of values input control. Works fine. But I can not get that to work when the input control is from a query (a stored procedure in this case). Any clues? My parameter is a collection. I have tried, unsuccessfully, using the following for the Default Value Expression: new ArrayList(Arrays.asList("value1","value2","value3)) new ArrayList(Arrays.asList(new String [] {"value1","value2","value3})) In JS Studio, the default values show up. But not in JS Server. I have to believe it seems from the input control being a query. Any suggestions?
  8. My bad. I figured it out. And the answer is Yes you can do a multi-select collection of dates. I had just fat-fingered a few things.
  9. Is it possible to create a collection of dates? The user wants to be able to select dates like 10-31-2015, 11-17-2015, and 12-01-2015. I created a collection parameter in a new report. I created an input control, multi-select query, with my SQL that generates a list of dates. I linked the report's input control to the server input control. I can do this successfully all day long with text or number data types. But when I do it with dates, then I get an error (that doesn't tell me anything actionable). In JS, is a collection of dates possible?
  10. Thank you. Adding the following keeps the font size from getting reduced. Who would have known? <property name="net.sf.jasperreports.export.xls.font.size.fix.enabled" value="false"/>
  11. Has anyone else noticed this? If so, how have you gotten around this bug? For all my reports, I use a style sheet with defined styles. All fonts I use are Tahoma. Some are size 8 (row data), 10 (column headers), 14 (report titles). You get the idea. But when I publish any report to JS Server, and run the report and export the report to Excel, all the fonts are one size smaller than what I defined them as. For instance, my row data in Excel is now Tahoma 7, my column headers Tahoma 9, and my report titles are Tahoma 13. I did some experimenting, and if in Studio when I overwrote the row data style and defined the field as Tahoma 9, then when I run and export the report, that data field is displayed as Tahoma 8. I did further experimenting and didn't use a style sheet, and just created some text fields of size Tahoma 8, Tahoma 10, Tahoma 14, and Arial 14, SansSerif 10, and Calibri 8 When I ran and exported the report, they all were in Excel with one size smaller. So it is not a style sheet issue nor a font issue. The fonts are properly sized in Studio, Preview. Why in JS Server would exporting to Excel reduce the font size by 1? And more importantly, how can I fix this?
  12. I did some experimenting. When I drag my browser (IE 11) from my main monitor (which has a resolution of 2560 x 1600) over to my secondary monitor (which has a resolution of 1920 x 1080) then I can scroll down the page using my web browser, and I can see all the reports in the repository. So the problem is that when I view the Jaspersoft Server screen at a higher resolution (in my case 2560 x 1600) I can NOT scroll down to see past 40 reports. Someone suggested to me that Jaspersoft has a progressive paging setup that does not work at higher vertical resolutions.
  13. I'm sure there is a simple answer. In Jaspersoft Server (development), version 6.1, enterprise, we have the following structure. root>>>companies>>>company1>>>reports. Under reports is where we load our reports from Jaspersoft Studio. I just uploaded my 41st report, which just so happens has the highest alphabetically-sorted name. When looking in the repository for my just uploaded report, I don't see it. The repository is only showing 40 reports on the screen. It is not until I sort by modified date do I see my new report. There does not seem to be any control, such as a next page button, to get to the page with the 41-80th reports. What am I missing?
  14. Customer is using a JS report for an empty form. They want to have an input parameter where they can select how many copies of the page they want. They will then print out those page(s). In JS is there a way to tell it how many times to repeat the form? I can create the parameter, no sweat, but where could I tell the report to repeat itself that many times. (I know that in printing, a user can specify how many copies they want. But that is not what they want here. They want to specify the number of copies in JS. Customers!)
  15. I asked if it is currently possible to show/print/display the parameter name, and apparently it is not. There might have been a secret convention like $N{City}, whereby its use would give the name of the parameter and not its value.
  16. Maybe this is real simple, but I don't know how. I want to show in a text field the name of the parameter, not its value. Something like: Selected [parameter name]: [parameter value] example: Selected City: Athens So the text field would be something like "Selected " + $P{City}.name + ": " + $P{City} But I don't know how to do the parameter name part of this. I want to do this so that if I change the Parameter Name, then it is automatically updated in the report (versus if I manually typed the parameter name into the text field).
  17. See if this helps http://community.jaspersoft.com//questions/950271/dependent-input-control-and-stored-procedure
  18. I have found my own answer. Maybe this will help you as well. Maybe most importantly, is that JS server input controls are not a separate, different animal, but rather are exactly the same as if they had been created (if they could be created) in JS Studio. The JS server input control for a multi-select query, creates a collection. These collections are enclosed by square brackets, have a comma and a space in between items in the collection. Like this [item1, item2, item3]. Unless the stored procedure has been written to strip out the square brackets and the spaces, the SQL might not run correctly. Additionally, but of course, the stored procedure must be written so as to allow multiple values to be passed to its input parameter (for the parameter that is to have multiple values). What I do in JS Studio is to create a prompting parameter, and define it as a collection. That name for this parameter must be exactly the same as JS server input control internal name. Let's call this Cost_Code. I then create a non-prompting parameter, and define it as a string. Let's call it Cost_Code_String. It has a Default Value Expression of $P{Cost_Code}.toString().replace("[","").replace("]",""). This turns the collection into a string and removes the square brackets. Next, in the data source (of the Main Report), my Dataset sql query is like below, where GETDATA is the name of the stored procedure, and @Cost_Code is the name of its input parameter. EXEC GETDATA @Cost_Code=$P{Cost_Code_String} When the report is exported to JS server, the Cost_Code prompting parameter, must be changed in Repository, [Report], edit, Controls & Resources, Cost_Code so as to point it at the server input control (something like this: /public/Controls/Cost_Code). Hope this helps. It shouldn't have been this hard for me, but I somehow thought that JS server input controls were different animals than JS Studio prompting parameters, and that I had to treat them differently.
  19. Can this be done? If so, how? If I can't do it as I want to, then how can I do it? I want to have a server-stored multi-select input control, say for city. The SQL to fill the control is a stored procedure (with an input parameter for state). When the user chooses their cities, then I want those cities to be passed (and used) in the Main Report, which is another stored procedure, with city as an input parameter. I have seen the $X method, but in order to use that, I have to have and use straight SQL, in $X(IN ... Thanks
  20. http://community.jaspersoft.com/wiki/tips-exporting-excel
  21. Here is the wiki page http://community.jaspersoft.com/wiki/tips-exporting-excel
  22. Thank you fixing the title name! And I see that you did some other great formatting changes. Thanks so much!
  23. I created a Wiki page for this, but wouldn't you know it, in the topic title, I spelled "Excel" as "Excl" and now I can't edit it.
  24. These are the tips I've learned on how to create a report that is expected to be exported to Excel. Most of my reports now days, have a user selection of 'PDF or Excel'. So the reports are built for both PDF format and for Excel format. Reports need to be designed differently depending on how the user is going to view/use them. I find PDF is easier than Excel. Excel has taken some trial and error to get satisfactory results. With Excel you have to make certain all the columns line up, so you don't get a whole bunch of different sized columns in Excel. Export a poorly laid out report to Excel, and this is clearly seen. This post doesn't cover that effort. For exporting to Excel, my objective is to keep things clean and tidy. This is because the user wants the data in Excel so that they can slice, dice, and sort, group, filter, and play with it until they see/get what they need. They don't want to do clean up before they can do that. In Excel, I have one tab for data, and another tab for footnotes. In the data tab I have one row for the report name / company logo. The next row is for column headers. Then the rows for data. Now in Jaspersoft Studio... The Column Header section is where I place the table for the data. Having the data in a table, allows the user when viewing the data in HTML to sort the data, etc. The data table, has one row for column headers, one row for data. In the Summary section, I show the user all their input selections, explain any abbreviations or calculations, show who ran the report and when, etc. I also have the report name and company logo at the top of this section. I don't put them in the Column Header or the Page Header (unless the report also has PDF output) because it kind of junks up the look of the Excel data page. Place a Break Palette Element at the very top of the Summary. Mine is at x: 0 px, y: 0 px, Height 1px, Position Type: Fix Relative To Top. At the top of the Summary section, I have a page break (which is 1 pixel high). All Other elements on the summary page start on or lower than Y position 1, so as to not overlap with the page break. I also have a No Data section, which is a copy of the Summary page with the addition of a big "There was no data found for the selections made" notice, and the addition of the report name and company logo. With this No Data section, if the user made selections that have no resulting data, they see a notice telling them that, and they can see their selections. Often times an empty report, to a user, is seen as the system or the report not working. So I want to tell them that it was their choices that led them here. The Main Report has to have the same dataset query as the table, for this to work. In Main Report, Report properties, Page Format (for this one example report I am looking at), my Page Format has the following properties: Format: Letter is what I always useWidth: When I have a report that does both PDF and Excel, the the width is 792. Height: When I have report that does both PDF and Excel, then the height is 612 Note: Excel doesn't care what your margins here are. PDF likes these just fine.Units: pixel. Much easier to work in than inchesPage Orientation: LandscapeMargins: 36 for all margins.Also, in Report properties, I have made these selections: When No Data Type: No Data SectionSummary On A New Page: checkedSummary with Page Header and Footer: checked --I could have this unchecked, and in the Summary section, I would have to add the report name and the company logo.Ignore Pagination: After much experiementation, I have decided that unchecked is best, otherwise when doing a PDF or Excel format report, the PDF does not page properly, and can't be recovered from. It is the lessor of two evils (until Jaspersoft fixes this in a new version).Also, in the Main Report Properties, in Advanced, Properties, I have added these (which end up near the top of the Source XML): <property name = "net.sf.jasperreports.export.xls.one.page.per.sheet" value="true"/>[/code]Without the above, JS only puts as many data rows on a single tab as fit within the Page Height.<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>[/code]The above gets rid of one row with a very large row height at the end of the data tab. Don't understand why that one very high row is created, but this is needed to get rid of it. Of course having this means that you can't (easily) have row spacing in the footnotes.<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>[/code]The above gets rid of empty columns, such as caused by margins, or by poor layout.<property name="net.sf.jasperreports.export.xls.white.page.background" value="false"/>[/code]The above shows the Excel grid lines, otherwise you get solid white, which kind of ruins the look of Excel (for a data dump).<property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/>[/code]The above tells Excel to treat dates as dates, numbers as numbers, instead of all being treated as text when it is set to "false" (which is the default).Note: Java's custom date formats are different from Excel's custom date formats, so a date format might look good in Excel but bad in Java/HTML, or vis-a-versa, so take care with custom date formats.<property name="net.sf.jasperreports.export.xls.ignore.graphics" value="false"/>[/code]The above tells Excel to not delete the company logo graphic. "true" (which is the default) deletes graphics.<property name="net.sf.jasperreports.page.break.no.pagination" value="apply"/>[/code]The above, as far as I know, has to be typed or cut-n-pasted directly into the Source XML. I have not found a place to select it under any Properties. I am not certain why it is needed, but it is.<property name="net.sf.jasperreports.export.xls.sheet.names.all" value="Data/Footnotes"/>[/code]The above tells Excel, to name the first tab "Data", and the second tab "Footnotes". Instead of "Data", I would recommend something more descriptive, maybe the report name.<property name="net.sf.jasperreports.export.xls.freeze.row" value="3"/>[/code]The above tells Excel to freeze the top 2 rows. Once in Excel therefore, the report name/company logo row, and the column headers row is frozen, and the user can scroll through thousands of records and still see them. Without this, the user would have had to do it themselves.<property name="net.sf.jasperreports.print.keep.full.text" value="true"/>[/code]The above keeps JS from truncating values wider than the explicity set colunmn widths. In Excel this is seen as wrapping.<property name="net.sf.jasperreports.exports.xls.font.size.fix.enabled" value="false"/>[/code]The above keeps JS from reducing the font size by 1 when exporting to Excel. For example, without this, an Arial 10 in Studio, in Server when exported to Excel ends up as an Arial 9 font.When looking at your report, the look in Preview is different than the look in JasperReports Server. To keep the pagination, when running the report from the server, then Save/Export as Excel or XLSX. Excel Paginated or XLSX Paginated reintroduce Excel paging (which you don't want).
×
×
  • Create New...