salishs Posted October 27, 2009 Share Posted October 27, 2009 hi friendswill any body please explain me how can i make the report in pdf in the formate (each store sale in each month).Please help me i am using iReport 3.0.0 Jan FEB MAR APR MAYStore1 10 20 30 40 0Store2 0 0 50 0 60Please help me Thanks In advance Link to comment Share on other sites More sharing options...
rushit Posted October 28, 2009 Share Posted October 28, 2009 I think Crosstab will solve the problem you are having. Select column having store values as rows and months as columns. Put the value you want to display in the Measure and that should give you the desired results. Let me know if it does not work out. Link to comment Share on other sites More sharing options...
salishs Posted October 29, 2009 Author Share Posted October 29, 2009 Thanks for your replay and sorry to say that i had mistaken you alsoActually i want the report per month means if we took October then the date 1,2,3... on xaxis and each store on y axis so that per day how many qty that store had sold that was the main problem , please excuse me for the wrong info i posted sorry and thanks for your valuable replay please replay me for the actual problem Thank You Link to comment Share on other sites More sharing options...
rushit Posted October 30, 2009 Share Posted October 30, 2009 Sorry about that.I am still not very clear about your requirement. see the attached pdf report and let me know if this the way you want your report.if not then please attach a sample report created in excel or word.... that might give better ideas as to what exactly you are trying to accomplish. thank you. Link to comment Share on other sites More sharing options...
salishs Posted November 2, 2009 Author Share Posted November 2, 2009 Thanks To your valuable replay The formate i want is attaching its now in xls Thank You Link to comment Share on other sites More sharing options...
rushit Posted November 2, 2009 Share Posted November 2, 2009 Got it....see the attached jrxml..... in this i have taken example that i attached earlier in the post. Here change the following things in crosstab properties and you will get your report.Right click on crosstab area and select CrossTab propertiesGo to Row and Column groups tab and change row group to your Date field retreived from query. change Column group to employee name column.Go to Measuer tab and select Store-in time as the Measuer expression. Then generate the report and see if you get the resutls. Let me know if it works.... Thanks. Link to comment Share on other sites More sharing options...
salishs Posted November 3, 2009 Author Share Posted November 3, 2009 Thanks for your replay , and give a new knowledge about the crosstab,i'm new in crosstab part so slight problem i thin in getting the data as per the requirement but i had done as per your instruction and i getting the result ,but the colums are only a few number means as per my queryselect name,DATE_FORMAT(date1,'%D %b %Y')as date1,time1 from test.login where year(curdate()) and monthname(date1) like $P{mon} order by date1 ascthe month name is i am passing (October) but its not comming in a sorted order and another thing is that the date 01-10-2009 to 30-10-2009 is not printing in the straight formate earlier one that i attached , after the crosstab option the value or the output is ok i will attach what i gotin crosstab option name in rows date on colims time on details funtion nothing the jrxml also i'm attaching,please go through it please excuse me ,for trouble you /tools/fckeditor/editor/images/smiley/msn/heart.gifplease go through testspage.xls that is the actualiy i want Thank You Very Much for your replays Link to comment Share on other sites More sharing options...
rushit Posted November 3, 2009 Share Posted November 3, 2009 check the attached report file. I have done some changes....I am not able to understand the logic behind making a date field string that you are doing in query. You could have got the date field and then changed properties to display it as per your requirements. I have changed it back to date so that you get data in proper sorting order.You may just have to change the Field Class type for date1 in your report. I was unable to do so as i did not have your db. The other thing is you may consider when you run into situation where data is not appearing in the same row is to reduce the font size by one or two. Let me know if it works.Post Edited by rushit at 11/03/2009 10:43 Link to comment Share on other sites More sharing options...
salishs Posted November 4, 2009 Author Share Posted November 4, 2009 Thank a lot for Your valuable help ,I got the formate that i want by your own help ,thanks a lotYou had asked me a doughtselect name,date_format(date1,'%d') as date1,time1,date_format(date1,'%M-%y') as hdat from test.login where year(curdate()) and monthname(date1) like $P{mon} order by date1 asc i think the date_format is that problem in the table the field is varchar and in order yyyy-mm-dd so to use the patteren in the report wont give the correct formate that i want means dd-mm-yy so in mysql date_formate(date,format) will give in which formate we want the next date_formate will show the month and year this report had madeThe Output also attaching Thanks a Lot 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