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

  • Home
  • SEARCH
  • 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 3454714
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:31:34+00:00 2026-05-18T09:31:34+00:00

This must be simple, yet I can’t seem to find an answer. I have

  • 0

This must be simple, yet I can’t seem to find an answer.

I have a simple Query:

SELECT InvoiceTotal, InvoiceDate, InvoiceNoUnit from InvoiceLineItem

Which I want to display in Crystal Reports from my App. Rather than build many reports, I want to be able to have the user change a parameter that allows the resulting report to be grouped by date, based on the level of granularity selected by the user.

EG: I want the user to be able to select “By Month” and the report is grouped by Month (with corresponding Chart displayed by month. Then the user runs the report “by week” and the report changes to group by week.

I want them to select this in my app, and for me to pass a parameter to CR to change the grouping.

Any suggestions?

  • 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-18T09:31:35+00:00Added an answer on May 18, 2026 at 9:31 am

    You can create a parameter where the user selects “Year”, “Month”, “Day” etc.

    From there, you can create a formula that specifies the grouping based on the parameter above, and then create a Grouping in the report that uses this formula to group by.

    I don’t have Crystal Reports handy, but the formula could look something like this:

    IF @UserDefinedGrouping = "Year" THEN
        DATEPART(yyyy, {Table.InvoiceDate})
    ELSEIF @UserDefinedGrouping = "Month" THEN
        DATEPART(m, {Table.InvoiceDate})
    ELSEIF @UserDefinedGrouping = "Quarter" THEN
        DATEPART(q, {Table.InvoiceDate})
    ' etc...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I think this must be simple but I can't get it right... I have
This probably has a simple answer, but I must not have had enough coffee
This must be a very simple question, but I don't seem to be able
I'm sure this must be possible, but I can't find out how to do
I can't get my head around this - I know it must be simple..
I'm sure this is a relatively simple question, and there must be a good
Now this must be easy, but how can sum two NSNumber ? Is like:
This is a very simple task in every language I have ever used, but
Yet another strange WPF error: I have a custom control in a simple XAML
I have the need to express simple conditionals as program input. The input must

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.