June 5, 201114 yr hello to everyone, Here I attach a sample database. I want to design a report to shows Total_weight of each month. any help? Production.zip
June 5, 201114 yr Author Many thanks for the reply. It is very useful but what I need is a report which only shows cMonth and sTotal_Weight. Also I like to use them to make a chart. is it possible?
June 5, 201114 yr I need is a report which only shows cMonth and sTotal_Weight. Use a layout with no body part. It needs to be in List view - a Table view won't work for this.
June 5, 201114 yr Author Thanks a lot, it works great. if I may ask for more help? can we design cMonth to calculate from 20th of each month to 19th next month?
June 5, 201114 yr Make cMonth = Date ( Month ( Prod_Date ) + ( Day ( Prod_Date ) > 19 ) ; 1 ; Year ( Prod_Date ) )
June 6, 201114 yr Author Well my problem doesn't solve with this solution. I thing it needs more explanation. I attach the script which shows Persian Calendar range. what I need is cMonth sets for each range which is a persian month and shows in the report. is it possible?
June 6, 201114 yr I need is cMonth sets for each range which is a persian month That's very different from: design cMonth to calculate from 20th of each month to 19th next month I don't see what your script is supposed to accomplish. I'd suggest you add a table of PersianMonths, with fields for MonthName and MonthStart - then lookup the month name from there using a relationship. Or calculate the Persian month - IF you can find an algorithm you trust. See: http://fmforums.com/forum/topic/74931-i-need-solar-calendar-for-fm-how-can-i-get-it/page
June 7, 201114 yr Author I followed the link and got so happy because I find that you are very familiar with persian calendar. I will explain what i did till now. I created a table "Calendar" with two fields. 1-G_Date (date), 2-Sh_Date (Text)and made 365 records with equal date. I also created another table "Production" included bellow fields: Prod_date Device_name Prod_name Prod_QTY Prod_weight Operator_name I linked Prod_date to Sh_Date. I need a script to make a annual report of any of fields in Production table while using Calendar table. as you suggested, I have to create cMonth, but I don't know what should the calculation be and how to use any of Prod_date, G_date or Sh_Date. kind regards
June 7, 201114 yr The "secret" for grouping records in a report is to have a field with a value that is common to all records in the group. In my example, the cMonth field returns the date of January 1, 2011 for all records in that month. If your Calendar table were built like: GregorianDate PersianMonth ... 2011-5-19 1390-02 2011-5-20 1390-02 2011-5-21 1390-02 2011-5-22 1390-03 2011-5-23 1390-03 2011-5-24 1390-03 ... you could group your records by the related Calendar::PersianMonth field - after defining a relationship matching: Production::Prod_date = Calendar::GregorianDate
Create an account or sign in to comment