Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

  • 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?

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.

  • 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?

Make cMonth =

Date (

Month ( Prod_Date ) + ( Day ( Prod_Date ) > 19 ) ;

1 ;

Year ( Prod_Date )

)

  • 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?

Script.jpg

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

  • 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

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

  • Author

Thank you a lot.

I got my answer and it doing so fine.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.