Print Page | Close Window

subreports in vb.net using crystal reports

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
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=16593
Printed Date: 01 May 2024 at 5:52pm


Topic: subreports in vb.net using crystal reports
Posted By: she0589
Subject: subreports in vb.net using crystal reports
Date Posted: 26 May 2012 at 7:17pm
Hello all,

i need your help to create crystal reports in vb.net. I am using vb.net 2008 and mysqlclient. I know how to do the connection and generate a report but still i am having a bug when i add to a datatable like

dim dt as datatable
for each dr in datagridview...
dt.Rows.add(...)---confused what to write in there.

I am pretty much new to crystal reports, so very little knowledge. So the data is not displayed from the database to my report.
Now, i need to include subreports. I have looked everywhere for help but finally i was redirected over here.
I wish to obtain some hell
Thanks guys.
I will appreciate any help from you.




-------------
sheetal



Replies:
Posted By: lockwelle
Date Posted: 30 May 2012 at 6:36am
dim dr1 dataRow
for each dr in datagridview
  dr1 = dt.newrow
  dr1("field1") = dr("field1")
  dt.Rows.add(dr1)
next
 
 
as for the subreport, if you are pushing the data to the main report, and you create your subreport with the same dataset, just pushing the data to the main report is all that I have done.
 
as a note, write your dataset as xml with the data and the schema...it really helps in laying out your report.
 
HTH



Print Page | Close Window