Catherine writes "The data I am working with is apartments and premiums (fireplace, garage, etc). The premium codes in my example are letters of the aphabet to simplify my example.I am writing a report that needs to list each apartment number with the premium codes out beside it. For example:
Unit Code111 ABCD112 CD113 FVEE
I am using Crystal Reports Version 8.1.1, MS SQL Server Version 7 (No service pack), and Win NT Server 4.0 (service pack 6). I already called Crystal support and they said there is no way to do what I want within the report designer.
Below is the SQL code I have so far. My problem is that it does not loop to include more than one premium code.
create table #test( PropertyNumber char(10) null, Unit varchar(10) null, Value int null, Code varchar(30) null);insert into #test select PropertyNumber, UnitApartmentNumber, sum(PremiumValue), null from UnitPremiumView where PropertyNumber = '1' group by PropertyNumber, UnitApartmentNumber;update #test set Code = Code+PremiumCode from UnitPremiumView where PremiumValue&Value > 0;
ANY SUGGESTIONS? I did not see anything this complex on your site."