Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4058590
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:05:55+00:00 2026-05-20T15:05:55+00:00

I have a report I am trying to modify in Crystal. It has a

  • 0

I have a report I am trying to modify in Crystal. It has a data field that has a formula in it, but I want to use another formula.

This is an example of what I am trying to do.

[((# Days in January) – 15) x (Market Rent/(# Days in January))]
 + [((# Days in February) – 0) x (Market Rent/(# Days in February))]
 + [14 x (Market Rent/(# Days in March))]

I have ADO commands built out for the market rent, and a start date and end date. The months in my example are just that an example. I am not sure how to take my ADO command dates that are entered in on a filter page, and put them in a formula like the one above. Any ideas?

Also, in the first and last para. the -15 and the 14 are for a date in the middle of the month. So if the start date was on the 15th of Jan, and the End date was the 15th of march. This formula would calculate my loss of rent during vacancy.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T15:05:56+00:00Added an answer on May 20, 2026 at 3:05 pm

    If I’m reading your question correctly, you want to take a date field and find out how to measure the number of days in that month, the month before it, and the month after it. Here’s some Crystal formulas to help you out. Let’s assume your date field is called {@DateFld}:

    To find the number of days in a particular month relative to a particular date, try this:

    local datevar X:=cdate(dateadd("m",0,{@DateFld}));
    
    datediff(
       "d",
       date(year(X),month(X),1),
       date(year(X),month(X)+1,1)
    )
    

    I recommend you copy & paste this in 3 different formulas:
    – In the 1st formula, replace the “0” with a -1 to get the number of days in the previous month.
    – In the 2nd formula, don’t change anything. That’ll get you the number of days in the current month (i.e. the month that {@DateFld} is in)
    – In the 3rd formula, replace the “0” with a +1 to get the number of days in the next month.

    For example, if {@DateFld} is March 10th, 2011, the 1st formula will give you 28, the 2nd will give you 31, and the 3rd will give you 30.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a report that contains a table of data this data is set
I have small web app that generate PDF files as a report. I'm trying
I have a report that renders data returned from a stored procedure. Using profiler
I have an XML file I'm trying to modify and want to add a
I have a report where I need the same data, but for four separate
I want to know I can dynamically modify an existing Crystal Report (using C#
I have a Crystal Report I'm trying to recreate from scratch after an update
I have a report that brings in values from a stored procedure. I want
So i have a report viewer showing data but in one of my columns
Hey guys, So I have this report that I am grouping into different age

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.