[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

SQL OR CRYSTAL HELP

Posted on 2014-12-23
6
Medium Priority
?
203 Views
Last Modified: 2014-12-24
I'm trying to create a report that has a table that lists part numbers and a table that lists an attribute name and a third table that lists the attribute value.  There are up to 7 different attribute names but each part number usually has between zero and four attributes.  When I create a CR that shows the part number and the attribute name and value, a part that has four different attributes will show up four different times, one for each attribute.  I want to somehow display all attributes 1's in one column, 2's in a second column and so forth, with the part number listed only once.  The attributes have a UID (1-7) but they also have a name. Ultimately, I would like to create a new view for this as I seem to always need this info.  I'm not too familiar with SQL so don't really know how to do that.  How can I get this info all on one line in a report?
0
Comment
Question by:ITworks
[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
6 Comments
 
LVL 17

Expert Comment

by:OriNetworks
ID: 40515236
While I do not fully understand what you are trying to accomplish it would help the community if you share the sql you have created so far and maybe a screenshot of the report layout you have created.

My first thought was that you may benefit from a subreport to show the attributes for each part but then you mentioned to have all of the attributes on one line which I do not understand.
0
 
LVL 18

Expert Comment

by:vasto
ID: 40515288
You need to use left join between the parts, attribute name and attribute value. This will create a view with all parts, attributes name and corresponding values (if any). Then use a Cross tab to place the parts and rows, attribute names as columns and attributes values as values
0
 
LVL 4

Author Comment

by:ITworks
ID: 40515391
Untitled.png
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 4

Author Comment

by:ITworks
ID: 40515394
0
 
LVL 35

Accepted Solution

by:
James0628 earned 2000 total points
ID: 40516306
I can think of a few ways to do something like that in CR.  How many UID's can there be for a "part"?  Is there a set limit of 7, or could there be more?  If there could be more, and you're not sure how many, then you may need a more sophisticated solution (like a cross-tab, like vasto suggested).

 If there is a set limit, you could try something like this.

 Using your sample report, with 4 formulas for UID's 1 - 4.  Group the report on whatever identifies a "part" (lot and item_id?), and suppress the detail section.  Put lot, item_id and item_desc in the group header or footer (your choice).  Right-click on each of your formulas in the detail section (eg. @COO) and select Insert > Summary, and create a Maximum summary for the "part" group (not a grand total).  Put those summary fields in your group header or footer with the other fields.

 I think that should work.

 James
0
 
LVL 4

Author Closing Comment

by:ITworks
ID: 40516733
That did it!
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

650 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