Solved

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

Posted on 2011-02-15
12
531 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

706 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now