Solved

SQL or Crystal Reports Question

Posted on 2014-12-30
6
420 Views
Last Modified: 2015-01-05
I am trying to create a report that displays results from an inspection record that is in a database.  Currently there are approx. 2 dozen different "named attributes" but that list could increase slightly.  I would like to be able to, I guess, save each of these named attributes as a new field so that I could use that field anywhere in a report.   I want to be able to place the fields anywhere in the report instead of all in a row like it would display currently.  1.png My first file shows a picture of what my report will currently display, in a column, for the various Measurements (attributes).  
2.png The second image shows a word document of an inspection report that I am trying to mimic.  I need the various fields to populate in different places on the report, not in a row.

How should I proceed?
Mechanical-Sue.rpt
0
Comment
Question by:ITworks
  • 3
  • 3
6 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40524808
You are going to have to use a group and build the report itself in the group footer.

Details section will be

WhilePrintingRecords;
Global StringVar HeatNumber;
Global StringVar Inspector;
Global StringVar Sampler;
...

If {MeasurementField} = "Heat Number" then
    HeatNumber := {InspectionValueField}
Else if {MeasurementField} = "Inspector" then
   Inspector := {InspectionValueField}
Else if {MeasurementField} = "Sampler" then
    Sampler := {InspectionValueField}
...
Else
   "";
""

Open in new window


You can then create the report with the lines and everything in the group footer and use formulas like

Name - Display Heat Number
WhilePrintingRecords;
Global StringVar HeatNumber;
HeatNumber

Open in new window


You will have one test and variable for each value you need and one display formula for each value for the report

mlmcc
0
 
LVL 4

Author Closing Comment

by:ITworks
ID: 40524820
Got it...... thanks!
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40524957
If you need more help, just ask.

mlmcc
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 4

Author Comment

by:ITworks
ID: 40525925
I need more help, please.  I guess I don't 'got it'.  

I'm having issues with suppressing the blanks.  It's showing spaces for blanks and I haven't figured out how to suppress them.

Also, There could be up to (4) individual inspections.  Therefore, there could be up to (4) results for each inspection name (attribute).  I want to group them and sort them.  {view_PT_InspectionItem_Measurement.ID} will have a numeric value.  It will be a sequential number and it just keeps going on and on in the database.  So on this inspection report, the number may start with 18413 and for each of the 22 attributes it will go up by one.  Then there will be another 22 if there is a second part inspected like there is in this case, etc.  Basically, I believe if I sort everything by the ID, I will be ok.
Mechanical-Sue.rpt
0
 
LVL 4

Author Comment

by:ITworks
ID: 40530747
.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40531522
I think this does what you want.

I set the GF to suppress when blank.

I also modified the main formula to include the yield test and the display yield to only display for the yield group

mlmcc
Mechanical-Sue.rpt
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

808 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