Solved

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

Posted on 2011-02-15
12
579 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
12 Comments
 
LVL 101

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 101

Expert Comment

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


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

mlmcc
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 101

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 101

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 101

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 101

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 101

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

626 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