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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreport with no data

Status
Not open for further replies.

josemauricio

Programmer
Sep 2, 2003
65
BR
Hi dudes!

I posted the same issue in "Business Objects: Crystal Reports 3 Integrate" Forum, but noone answered me and I must to finish with this problem with some urgency, so decided to try something here also.

Here's my problem. I built a window service developed on VB .Net that is used to automatic send e-mails messages with an attachment pdf file. This pdf file is a report that is built using Crystal Reports 10 that is exrpoted to this file type. There's a subreport in this report. When I install the service on my machine and start it, everything works fine. But, when I install on the server, the report is generated with no data in the subreport. I've already done all kind of tests and noticed that there's data in the dataset that fills the subreport. I've put a header in subreport just to check if the subreport is really there in the main report and, yes, there it is! So, the problem is not the the missing data or not the missing report... the problem is just to know the missing what!!!

If someone has faced this issue sometime, I'll glade to know your experience.

Thanx since now!
 
I've had one Crystal Reports application, so I'm not an expert. But I did find that I had to recreate all the report template files to avoid weird buggy problems like the one you describe when I moved from a win2000 box to an xp box. Basically, I opened the old design file, created a new design file, and cut and pasted the report structure from the old to the new. I then saved and used the new report file.

I don't know if this will help you, and it probably won't, but it's easy enough to try.

HTH

Bob
 
Hello! I've tried it but doesn't work.

Thanx any away, BobRodes!
 
Oh well. You have exhausted the meager limits of my Crystal Reports knowledge.

Good luck,

Bob
 
Problem solved!



I don't believe how simple the solution was!



Well, on my code, I difined the datasource of the report and the subreport like this:



crFaturaDacasa.SetDataSource(DsImprimirFaturaLancamento1.DadosFatura)

crFaturaDacasa.Subreports("RptLancamentoFatura.rpt").SetDataSource(DsImprimirFaturaLancamento1.Lancamentos)



As you can see, I use one dataset wich is filled with to datatables. One for the main report and another to subreport. This code works perfectly on my machine, but when I execute the service on the server, no data was displayed in the subreport. I spent weeks looking for something that could help me, and I finally found a code that load a main report with just de dataset, without mention the datatable, like that:



crFaturaDacasa.SetDataSource(DsImprimirFaturaLancamento1)

crFaturaDacasa.Subreports("RptLancamentoFatura.rpt").SetDataSource(DsImprimirFaturaLancamento1.Lancamentos)



When I execute the service on the server, SURPRISE! It worked!!!!



So, that's it! I hope this information can be useful for someone
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top