Version: visual basic .net (visual studio) with bundled Crystal Reports
I have tried to find answers to these questions and hope that someone may be able to help!
1) I need to add images to a report at run time. I do not wish to use a database - I am therefore trying to use CRAXDDRT20 reference instead (as suggested elsewhere). eg (example code, not formatted correctly)
Dim crAppl As New CRAXDDRT20.Application
Dim report As New CRAXDDRT20.Report
report = crAppl.OpenReport("c:\testreport.rpt")
'image code here
ReportViewer.ReportSource = report
I get an error on the last line - is there a way to set the report viewer to a report loaded using CRAXDDRT20? Is there a better way to add images at runtime using .net?
2) I have each page of the report (currently) in seperate files. This may change in the future, but this is the case at this point in time (there is a reason for this even if it doesn't make sense!). Is there a way programmatically to load these all into one report document at runtime (and hence viewer)? ie. page/section 1 = "c:\page1.rpt" page/section 2 = "c:\page2.rpt". The content/pages change with certain variables. Each page will have different data on it. My aim is to send 1 print job to the printer instead of 25+.
Thank you for your time.
I have tried to find answers to these questions and hope that someone may be able to help!
1) I need to add images to a report at run time. I do not wish to use a database - I am therefore trying to use CRAXDDRT20 reference instead (as suggested elsewhere). eg (example code, not formatted correctly)
Dim crAppl As New CRAXDDRT20.Application
Dim report As New CRAXDDRT20.Report
report = crAppl.OpenReport("c:\testreport.rpt")
'image code here
ReportViewer.ReportSource = report
I get an error on the last line - is there a way to set the report viewer to a report loaded using CRAXDDRT20? Is there a better way to add images at runtime using .net?
2) I have each page of the report (currently) in seperate files. This may change in the future, but this is the case at this point in time (there is a reason for this even if it doesn't make sense!). Is there a way programmatically to load these all into one report document at runtime (and hence viewer)? ie. page/section 1 = "c:\page1.rpt" page/section 2 = "c:\page2.rpt". The content/pages change with certain variables. Each page will have different data on it. My aim is to send 1 print job to the printer instead of 25+.
Thank you for your time.
Last edited: