Solved

SQL or Crystal Reports Question

Posted on 2014-12-30
6
430 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
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

 
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…

829 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