Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Daily, weekly, monthly, yearly sales report in cry Post Reply Post New Topic
Author Message
axcel25
Newbie
Newbie
Avatar

Joined: 09 Dec 2012
Location: Philippines
Online Status: Offline
Posts: 3
Quote axcel25 Replybullet Topic: Daily, weekly, monthly, yearly sales report in cry
    Posted: 09 Dec 2012 at 6:20am
Hi,
     im having a problem in compiling my report by daily, weekly, monthly, yearly report for my POS.

    what I like to be done is like this. the report will ask the user if daily,weekly,monthly,yearly report,

then for weekly report the user will only choose from week1 to week4 or until week5, then it will compile all the dates within that parameter.

for monthly report- the user will only input month and year

for yearly report- the user will input only the year then the crystal report will compile all the dates within the year, month

im new with this using the crystal report2008, my db is mysqlyog,im using Visual studio.net

please help me doing this guys. thnx.!
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 10 Dec 2012 at 5:18am
Since you're doing this in Visual Studio, it will be easier to set up the parameters.  You'll need to create a screen where your users will do the following:
1.  Select the date type - Weekly, Monthly, Yearly.
 
2.  Based on the date type selected, the user will enter the parameters that need to have data for that date type. 
 
3.  Click a button to run the report.  Your code for the button will set the parameters in the report prior to showing it.
 
In your report, you'll do the following:
 
1.  Create the following parameters:
  Date Type - string, valid values are Weekly, Monthly, and Yearly.
  Week - string, optional, valid values are All, 1, 2, 3, 4, 5, default value is "All".
  Month - string, optional, valid values are All, Jan, Feb,...,Dec, default value is "All".
  Year - Number, no list of values.
 
2.  If you're using tables in your report, edit the formula in the Select expert.  If you're using a command, edit the "Where" clause of the command (in this case you'll create the params in the Command Editor and then modify them in the report to set the default values.)  The logic is something like:
 
(
({?Date Type} = 'Weekly' and {week field} = {?Week}  and 
 {month field} = {?Month} and {year field} = {?Year})
or
({?Date Type} = 'Monthly' and  {month field} = {?Month} and
 {year field} = {?Year})
 
({?Date Type} = 'Yearly' and {year field} = {?Year})
)
 
Note how the parentheses are set up - this won't work without them!
 
-Dell
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.