Solved

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

Posted on 2011-02-15
12
559 Views
Last Modified: 2012-05-11
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
Comment
Question by:smetechit
  • 7
  • 5
12 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 34903331
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
 

Author Comment

by:smetechit
ID: 34903835
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 34903864
WOuld something like this be good enough


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

mlmcc
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 34904062
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
 

Author Comment

by:smetechit
ID: 34904237
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 34907401
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
 

Author Comment

by:smetechit
ID: 34915627
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 34919426
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
 

Author Comment

by:smetechit
ID: 34936139
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 34937830
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
 

Author Comment

by:smetechit
ID: 34938221
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 34939362
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question