?
Solved

SQL or Crystal Reports Question

Posted on 2014-12-30
6
Medium Priority
?
476 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 101

Accepted Solution

by:
mlmcc earned 2000 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 101

Expert Comment

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

mlmcc
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 101

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

862 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