Print Page | Close Window

Report boxes

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5258
Printed Date: 03 May 2024 at 6:19am


Topic: Report boxes
Posted By: avila139
Subject: Report boxes
Date Posted: 19 Jan 2009 at 8:22am
I'm new in using crystal and I'd like to know if this is possible to do. I want the report to be able to determine how many rows to create based on a variable in my db. I don't want to have to create 8 rows when some records will only have 5 values and i don't want blamk rows. Not sure if that makes sense...please help.



Replies:
Posted By: AntDC
Date Posted: 19 Jan 2009 at 8:27am
Let the SQL in a Command do that for you.

DC


Posted By: avila139
Date Posted: 19 Jan 2009 at 8:37am
Thanks, i've been using access and I couldn't get it work so i'll give this a try.


Posted By: DBlank
Date Posted: 19 Jan 2009 at 9:25am
Hi http://www.crystalreportsbook.com/Forum/member_profile.asp?PF=6326&FID=5 - avila139 ,
What kind of variable are you referring to?
When you are grouping data, your detail rows will only display the number of rows that it finds and not disply blank rows (unless you are inserting extra details sections  manually like detail-a, detail-b, details-c, etc.).
For example, your table has a Store Name field and Store Locations field with as many rows as there are locations. Store A has 3 rows in the table and Store B has 7 rows in the table.
If you group on Store Name and put the Store locations on the details it will repeat the details only 3 time for Store A and 7 times for Store B (it will not display blank rows).
If all of your data is on one row and you are creating extra detail rows to handle this you can always conditionally suppress those sections where isnull({field})=true or {field}='' so you don't show blank rows in your report.


Posted By: avila139
Date Posted: 19 Jan 2009 at 9:54am

all of my data is on one row in the table.. which is a representation of how many internet/cable/phone plans a person is offered based on their location. i have the report divided into three sections with tables already created in each. the problem is that even when the extra fields are removed the data below doesn't move up on the report. not sure if i made my problem clear in the first post.



Posted By: DBlank
Date Posted: 19 Jan 2009 at 10:03am

You mean you have inserted extra detail sections to handle each possible "internet/cable/phone plans a person is offered based on their location" that is stored in different fields in the same row for that location?

Conditionaly suppress each detail section where that field is NULL or = " " (depending on how your data is stored in the database). Each detail section will have to check against the exact field that is supposed to be displayed in it:
detail-a displays Location1 field so conditionally suppress it with:
isnull({table.location1field})=true or {table.location1field})=''
detail-b displays Location2 field so conditionally suppress it with:
isnull({table.location2field})=true or {table.location2field})=''
Is this accurate as to your set up and will it work for what you are trying to do?


Posted By: avila139
Date Posted: 19 Jan 2009 at 11:11am

yes that works, thank you very much!




Print Page | Close Window