krishnatmx Posted January 20, 2009 Share Posted January 20, 2009 Hi All, I have one issue with the jasper reports.I have a report template, i have designed it using iReport.I have added alternate colors each row, when i run the report using viewers the row colors are displaying. the same jrxml file i have added in jasper server , from japser server if i click on the report It does not showsing any colors . its showing normal report without any effects. Please somebody help me on this, why it behaving like this, do i miss anything?? Thanks Link to comment Share on other sites More sharing options...
mmflynn Posted January 21, 2009 Share Posted January 21, 2009 Most likely you have fields or layout objects overlapping each other. The JR report viewer (written in Java) and PDF can display overlapping layout objects fine, but HTML tables cannot. (If you're super interested in the HTML limitations and options, you can check out http://www.jaspersoft.com/jaspersoft_app17.html.) The way I like to handle this is to use the Report Inspector panel in iReport to select each object and note its properties. If you already know you have an object overlapping another (for example, a rectangle box), you can replace the box with a frame and apply your styles to the frame. The frame is not a graphic object; it's more like a container. You put all your layout items inside the frame and the layout items inherit whatever styles you apply to the frame. HTH, Mary Link to comment Share on other sites More sharing options...
krishnatmx Posted January 21, 2009 Author Share Posted January 21, 2009 Hi Mary, Thanks for Quick reply. In My Report in Column Header band i have placed a Frame with background color as "Dark Grey". on that frame i have added the column headers.when i view with JRViewer everything is fine , in HTML it is not showing background color for column header. Please give some solutions, if you want to check i can send my jrxml file Thanks K R IS Link to comment Share on other sites More sharing options...
mullinsw Posted January 21, 2009 Share Posted January 21, 2009 I ran into a similar problem when creating reports based on a template that I designed. The columnHeader band in my template contained a staticText element within a frame, and the detail band contained a textField element within a frame. To make alternating row colors happen, a conditional style was applied to the detail band frame.I eventually discovered that reports created using the Report Wizard and my template as the layout contained a problem which caused alternating row colors not to work.I expected my columnHeader band to have a frame element containing a number of staticText elements representing my column headings. Instead, the frame was empty and the staticText elements were at the same level as the frame element. Same thing for the detail band ... the frame was empty and the textField elements were at the same level as the frame element.To fix the problem I had to manually move the staticText elements and the textField elements inside their corresponding frame containers.Hope this helps.Bill Link to comment Share on other sites More sharing options...
krishnatmx Posted January 23, 2009 Author Share Posted January 23, 2009 Hi Bill, I have tried by manually moving the static text blocks inside the frame for header. it doen't work for me. please find attached jrxml file. try to view that as HTML preview , you can see no colors are applied for header & detail band Plese help me ThanksK R I SPost Edited by Krishna Tmx at 01/23/09 18:43 Link to comment Share on other sites More sharing options...
lucianc Posted January 26, 2009 Share Posted January 26, 2009 Your texts are not inside the frame, instead they overlap the frame.The texts need to be nested inside the frame, i.e. something like this in the JRXML:<frame> <staticText> ... </staticText> <staticText> ... </staticText></frame>Also see the attached iReport document structure screenshot.I don't know how to take an element in iReport and nest it inside a frame, try asking on the iReport forum.Regards,Lucian Link to comment Share on other sites More sharing options...
krishnatmx Posted January 26, 2009 Author Share Posted January 26, 2009 Hi Lucian, Thanks, Thats worked for me , i have movie all my elements as sub elements of the Frame. In iReport i haven't find that, so i did it manually by chnaging the xml code. Thanks for your Help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now