Solved

Crystal Report

Posted on 1998-07-17
6
268 Views
Last Modified: 2010-05-03
hi there,
i'm using crystal report 5.0
i hava a table ....
CUSTOMER      DATE            STATUS
AAA            9/12/97            ORDINARY
AAA            12/12/97      GOLD
XXX            8/8/97            RED
YYY            12/12/97      BLUE
BBB            5/12/97            ORDINARY
CCC            12/12/97      ORDINARY
BBB            6/12/97            GOLD
CCC            12/12/98      GOLD

I need to show on my report only records with gold and ordinary status,
and report on the customers, first column of my report lists all the
customers, no repeating values, second column list the date the customer turned ordinary, and third date the customer turned gold  so for my report i should have something like this:

                ORDINARY      GOLD
CUSTOMER      DATE            DATE
______________________________________

AAA            9/12/97            12/12/97
BBB            5/12/97            6/12/97
CCC            12/12/97         12/12/98


please help, any suggestions will be appreciated. thanks.
0
Comment
Question by:mallow
[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
  • 4
  • 2
6 Comments
 
LVL 2

Expert Comment

by:percosolator
ID: 1466117
The problem that you are encountering is that you have a table with linear data, but wish to view it 2-dimensionally.

Mucked-about with a cross-tab report for a while... That's not your solution as to it deals with summary information.

What you need to do is transform your data from the one-dimensional view that it's currently in, to a 2d one.  This can be done with a series of queries to which you link your report.

If you would like, I can send you SQL code for a SQL stored procedure, or the Access queries to do this transformation.  Or Post it, if you'd prefer.

0
 

Author Comment

by:mallow
ID: 1466118
can you please send the codes for the stored procedure to carol@the.net.ph please? thanks :)
0
 
LVL 2

Accepted Solution

by:
percosolator earned 100 total points
ID: 1466119
This script will create SP_TEST when run through I/SQL

Make sure that Crystal can view stored procedures.  Go to File, Options,   SQL tab and there is a check box for stored procedures in a frame called "Allow reporting on"

I am running Crystal 6.0, but 5.0 should have the setting in the same spot.

------------------------------------------

CREATE PROCEDURE SP_TEST AS


      SELECT
            CUSTOMER,
            DATE_                              ORDINARYDATE,
            CONVERT(DATETIME, NULL)            GOLDDATE
      INTO
            #temp
      FROM
            _CUSTOMER
      WHERE
            STATUS = "ORDINARY"


      UPDATE
            #temp
      SET
            GOLDDATE = DATE_
      FROM
            _CUSTOMER
      WHERE
            #temp.CUSTOMER = _CUSTOMER.CUSTOMER
      AND
            _CUSTOMER.STATUS = "GOLD"


      SELECT * FROM #Temp

GO
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:percosolator
ID: 1466120
You never said whether that worked for you, or not.

How'd it go?
0
 

Author Comment

by:mallow
ID: 1466121
hi there percosolator, i have to try the codes, and is this the correct syntax for stored procedure in  informix because i'm getting a syntax error for my stored procedures, if you know that syntax, please tell me, i have to try these codes on monday, thanks :) i'll tell you.
0
 
LVL 2

Expert Comment

by:percosolator
ID: 1466122
ooh.

sorry.  i thought that you were using Microsoft SQL Server.

hmmm.

the syntax is probably close.  i don't know if Informix is ANSI-SQL compiant.  i _think_ that SQL server is....

the syntax might be a little off for Informix, but the logic is sound.

Doug


0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

734 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