Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to Crystal Please Help?

Status
Not open for further replies.

mpodlesny

Programmer
Mar 23, 2005
24
US
I am very new to crystl so I am sure my question will be very easy for someone however I can't seem to find the answer.

I have a database table called report titles. In that table are 10 records all of which need to be displayed in the report header. However when I add the database field to my report, it only shows the last record in my table.

Any ideas?
 
Need more techincal information.

Crystal Version
database and Connectivity
Sample data
expected output

Not quite sure what you are trying to do.

If the contents of the table is in the report header, what do you have in the detail sections of the report?

-LW

-LW
 
sorry about that

using Crystal 8.5

the data in my table is the following (without the quotes):
"Title line 1"
"Title line 2"
"Title line 3"
etc...

and that goes up to 10

I expect to see in my report header the exact contents of what is in the table.

There is currently no data in the actual report section since I can not get past the header section.

 
What is the purpose placing the data in the report header? Remember it is only printed once. Normally contents of a table goes into the detail and group sections.

If the only contents in the table are report titles, then simple place the field, {table.title}, in the detail section.

Suppress the report header and report footer

-LW
 
They are report titles that are saved by the user in the program, then the report needs to show these report titles on the report in the header. Since the user can have anywhere from 1 to 10 title lines it has to be able to load the information from the database.
 
Then I would create a subreport.

In the subreport, I would list the titles in the detail section

Place the subreport in the Report Header of the main report


-LW
 
a sub report? ok how the heck do I do that...when i say I am new to Crystal I am really new.
 
Before proceeding, I need to know one thing.

Aside from getting the titles in the report header, what are you trying to accomplish with the report? Who is going to read this report and what is the intent of the report? I just want to make sure that I am giving you the appropriate solution to resolve your problem.

-LW
 
Extra advice for someone new to Crystal.
----------------------------------------

Subreports make a lot of work for computers, but save time for humans. You decide which is more important for your particular circumstances. For a report header and ten records it is fine.

You can also put subreports in group headers or footers or even detail lines. This is inefficient but sometimes the only way. One common problem with linked subreports is that it adds the link as a record-selection in the subreport, additional to any test you already have.

Where I work, we go to a lot of trouble to make our mainframe screens and reports run efficiently. We use Crystal mostly for investigations and management information, cases where it doesn't much matter if a job takes twice as long because the user can be doing something else in the meantime. For a big Crystal report that is run frequently, it would be worth going to some trouble to make it efficient. In other cases it makes sense to save programmer-time.

You can't put a subreport inside a subreport. You can pass a value back from a subreport, using shared variables. These will only be usable in the next section.



[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Crystal 9.0
Connection ODBC

Hopefully someone can help me....Thanks in advance. I have two questions.

1) I have a main report which is grouped by the following:

Sales Rep#
Account #
@category (which includes the following):

IF {mc_ad_cost_view.obj_code} in ["15", "20", "50"] THEN
"Adjustments"

ELSE

IF {mc_ad_cost_view.obj_code} = "200" THEN
"Color"
ELSE

IF {mc_ad_cost_view.obj_code} = "270" THEN
"We Print Color"
ELSE

IF {mc_ad_cost_view.obj_code} = "485" THEN
"Booth"
ELSE

IF {mc_ad_cost_view.obj_code} = "900" THEN
"Internet Up Sell"
ELSE

IF {mc_ad_insertion.prod_code}= "MBDY" THEN
"Liners"
ELSE

IF {mc_ad_insertion.prod_code}= "MBMD" THEN
"Display"
ELSE

IF {mc_ad_insertion.prod_code}= "MBEX" and
dayofweek({mc_ad_insertion.insertion_date})=4 THEN
"MVP (Wed) Liners"

The main report shows the SalesRep #, Account, Revenue for each category for the Current Year and Last Year

Sales Rep#
Account Name & Account #
@category

Example:

Sales Rep# 001
GM Plan Works --- 8001352
CY $ LY $
Adjustments 542 447
Color 17 5
Liners 3 1
Booth 25 13

At the end of each Sales Rep I want the total of each
@category, see below:

SalesRep #001
Adjustments 942 857
Color 45 52
Liners 22 14
Booth 124 173

At the present time I have a subreport, which takes a while to process which gives me all this information. But, I would like to avoid using a subreport is possible. I've tried creating another group, but it doesn't work.

2) After I schedule this report to run and save as a .pdf file is there a way to move each SalesRep# to their specific folder (Rep001, Rep003, etc.) So, Reps can only access their folder???? There is a page break after each SalesRep#.

Any help would be greatly appreciated.
 
This should have been a new thread. At the top of the list of threads on the main forum page, you can find "Start New Thread."

I think you can insert a crosstab into the sales rep group footer where you use {@category} for your row field, and {table.date} as your column field. After adding the date as a column, and while it is highlighted, go into the group options and choose "print on change of year". As long as you have the date range for current year and last year in your record selection formula, this should work. Then add sum of revenue as the summary field.

I can't answer your second question, but you'll have a better chance of getting an answer if you start a new thread with a descriptive subject line.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top