[dba-SQLServer] (cross posted) Looking for some CrystalReports help

Michael Maddison michael at ddisolutions.com.au
Wed Mar 24 22:46:55 CDT 2010


Jeff,
Then how about manipulating the dataTable directly.
Add new rows before passing the table to CR/CO.

Cheers

Michael M

Sorry, should have been a little clearer.  I cannot create additional
tables, this is a 'closed' system.  I need this to be as hands-off as
possible as I will not be there after this week.  So far everything works
fine except for printing the correct number of labels.

Jeff Barrows
MCP, MCAD, MCSD
 
Outbak Technologies, LLC
Racine, WI
jeff.developer at gmail.com

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart
McLachlan
Sent: Wednesday, March 24, 2010 4:46 PM
To: Discussion concerning MS SQL Server
Subject: Re: [dba-SQLServer] (cross posted) Looking for some Crystal Reports
help

Classic situation for a "numbers table" or "dimension table".
Create a table called tblNumbers containing a single PK field. Populate it
with numbers from 
1 to whatever you may need.  Then include that table in your query

SELECT QyrLabels.Name, qryLabels,Adress,, tblNumbers.Number,
qryLabels.Cartons
FROM qryLables, tblNumbers
WHERE tblNumbers.Number<=[Cartons];
Order by Name,Number

will return something like

Name    Address    Number   Cartons
Joe      1 Main St      1                3
Joe      1 Main St      2                3
Joe      1 Main St      3                3
Fred     2 New St     1                 2
Fred     2 New St     2                 2

-- 
Stuart


> -----Original Message-----
> From: dba-sqlserver-bounces at databaseadvisors.com
> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jeff
> Barrows
> Sent: Wednesday, March 24, 2010 4:53 PM
> To: accessd; SQLServer; Tech List
> Subject: [dba-SQLServer] (cross posted) Looking for some Crystal Reports
> help
> 
> Has anyone done a crystal report for shipping labels where you know the
> total number of cartons, but do not have a record for each carton?
> 
> For example, I have 1 record telling me there will be 9 cartons.  I need
to
> be able to loop through the records and print a label for each carton.
> 
> -- 
> Jeff Barrows
> MCP, MCAD, MCSD
> 
> Outbak Technologies, LLC
> Racine, WI
> _______________________________________________

_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.791 / Virus Database: 271.1.1/2767 - Release Date: 03/24/10
02:33:00


_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com


No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.791 / Virus Database: 271.1.1/2749 - Release Date: 03/25/10 06:33:00




More information about the dba-SQLServer mailing list