Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 590
  • Last Modified:

How to design this report using Crystal Report .Net 2008?

Hello,

I want to design a report that depicts machine stop times as shown in attached picture. The database table stores stop times and start times for each machine error. The report should depicts each hour of the shift as 60 small squares and shadow minutes of machine failure.

I want to do this very efficiently both the queries and report design and I use SQL server 2008.

Thanks
machines-stop-times-report.PNG
0
smetechit
Asked:
smetechit
  • 7
  • 5
1 Solution
 
mlmccCommented:
As far as I know there are no chart types that will do what you want.

What data do you have in the database?
Is it a start datetime and an enddatetime?

The lines will be the nearly impossible part since there is no easy way to draw them.

How many hours might be covered by a report?

mlmcc
0
 
smetechitAuthor Commented:
I have 8 hours in the report , i.e 8 lines of squares

The data source is the stop time and start time only.

My idea is to use text boxes or box objects . how to change thier background color using data available in this table.
0
 
mlmccCommented:
WOuld something like this be good enough


------------------------------
 | | | | |X|X|X|X|X| | | | |
------------------------------

mlmcc
0
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

 
mlmccCommented:
Take a look at this report.  I have saved the data with it so you can see what it does.

To use it with your data just change the database and Change Field1 and Field2 to your start and stop fields.

mlmcc

DownTimeChart.rpt
0
 
smetechitAuthor Commented:
Hi mlmcc,

I could open your report using Crystal Report 10 but can not open with Visual Studio.Net 2008. Can you send me detailed steps to create it in VS.NET 2008. It seems working :)

Thanks
0
 
mlmccCommented:
If you can open it in CR10 then just copy the formulas that are being used.
I don't have a workingVS.Net environment to build it in

mlmcc
0
 
smetechitAuthor Commented:
Hi mlmcc,

I changed data source to reference my database but I can not view the report du to this error "There must be a group that matches this field" - please see attached picture.
group-error.png
0
 
mlmccCommented:
The formula causiing the issue

CSTr(Time(GroupName ({Table2.Field1}, "by hour")),"hh:mm") & " - " & CSTr(Time(GroupName ({Table2.Field1}, "by hour")),"hh:59")

Change {Table2.Field1} to the time field you are grouping on

mlmcc
0
 
smetechitAuthor Commented:
Hi mlmcc,

Just two questions:
1) How do you make the report caches the data without mdb file existance?
2) What is the purpose of these formula fields: DeclVars, Groupreset, x, CreateString?

Thanks
0
 
mlmccCommented:
DeclVars - declares the variables for the report

Groupreset- resets the value of various variables to an initial state otherwise the previous group values get used

x and CreateString - formulas I used for trying an idea.  X printed all the characters 50 per line so I could find the filled box and empty box.  They aren't needed for the report

mlmcc
0
 
smetechitAuthor Commented:
I deleted DeclVars and Groupreset and the report still working the same.

There is a small bug in the formula , see the example below

08:50 - 09:10
10:40 - 10:50

renders the report the same as

08:50 - 09:10
09:40 - 09:50

Have you a fix for this?


Thanks
0
 
mlmccCommented:
You need the Groupreset formula to reset the string when a new group starts.

It is group on time by hour.

mlmcc
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now