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!

Crystal from a dao recordset, new report page for subsequent records

Status
Not open for further replies.

mwhalen

Programmer
Oct 31, 2000
217
CA
I have a Crystal Report that I want to pull info from my VB program,
specifically from a recordset, data control or list box - not
directly from a database table. The data returned to the recordset,
datcontrol or list box is based on an sql query dependent on
variables user inputs. I never know how many variables (records)
might be returned, it could be 5 or it could be 20. The Crystal
Report can access the first record but does not create new pages for
subsequent records. I also want to stay away from creating a temp
database table. I am using Crystal Reports version 5. Thx!
 
Do you have a table that you based the report on that can display the first record? I'm assuming that the table structure that the report is based on does not change based on the variable values from the form. Is this a correct assumtion?

Since the report can get the first record is it safe to assume that if there were more than one record that it would pull those also?

Do you have the output of the fields on the report in the detail section or did you put them in a group? Snaggs
tribesaddict@swbell.net
 
I misunderstood your question... There should be an option in Crystal that tells it to print the next option on a new page. If not, then you can open the detail seciton of the report big enough so it prints only one detail record per page. However, I don't know how this last technique will work from printer to printer. Snaggs
tribesaddict@swbell.net
 
Hi, thanks. I do have a table that I base the values on, however, I don't change the data in them for this particular form. This is why I can't really access the table fields directly in my report. Another reason is because the original programmer designed my database in such a mess, the relationships and keys are not reliable. I just want to stay away from them as they are bad news.

Okay I just read your next posting. When Crystal prints the new option on the next page, will it automatically reference the next record in my recordset?
 
Yes, it will pull the records from whatever table or tables the report is based on. I assume that it's printing each record one right after the other on the same page. If you want to stretch the records out across seperate pages, increase the size of the detail section of the report to be big enough so that each detail prints on a seperate page. Don't increase the database field sizes as far as height goes, just drag the bar below the details section down about 6 or more inches until it forces each detail to print on a different page. It's a trial an error method that you'll have to experiment with until you get the spacing you need. Again, it may vary from printer to printer, so this might not be the optimal solution to the question. Snaggs
tribesaddict@swbell.net
 
the problem is I can't bind the Crystal Report field to a table field AT ALL. I have to bind the Crystal Report field to a recordset field or list box text. The thing is there may be more than one item in the list box or the recordset.
 
Send me your email address by clicking on mine above.
You'd have to send me the report so I can see what it is you're trying to do, if you can do that. Confidentiality will be assured. Snaggs
tribesaddict@swbell.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top