Dim D As New ReportDesigner5.Designer 'Instatiate a designer object
d.Filename = <filename> 'Set the design file location
d.Rpt.Open(d.Filename) 'open the design file
d.Rpt.DataSource = <Datatable> 'Set the datasource used in the report
d.ShowDialog 'Display the design wondows form
d.Dispose 'dispose designer object
PRINT REPORT
Dim RP as New ReportDesigner5.Report 'Instantiate a report object
RP.Open(<filename>) 'Open design
rp.DataSource = <Datatable> 'Recieve data
rp.PrintPreview 'Preview or print
Last edit: Luiz 2019-06-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What is this RP thing? Somekind of global variable? How would I declare it in a C# project that attempts to use ReportBuilder?
If I add something along the lines of your VB code to a C# project, I get a NullReferenceException in PrintClass.vb, in a piece of code that once again uses this RP variable.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Could not analyze text. Text format 39 expected.
Could not analyze text. Text format 44 expected.
Could not analyze text. Text format 123 expected.
Could not analyze text. Text format 375 expected.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i am getting following error when using rp.printpreview() functuin in vb.net System.MissingMemberException: 'Overload resolution failed because no accessible 'Copy' accepts this number of arguments.'
as well as can i send parameters, create formula, add page number and can i create sub report
please guide me
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
DESIGN REPORT
PRINT REPORT
Last edit: Luiz 2019-06-05
What is this RP thing? Somekind of global variable? How would I declare it in a C# project that attempts to use ReportBuilder?
If I add something along the lines of your VB code to a C# project, I get a NullReferenceException in PrintClass.vb, in a piece of code that once again uses this RP variable.
To answer my own question, I explored a bit further and found that I need to be
using static ReportBuilder2.Module1;
What do the following error messages mean:
Could not analyze text. Text format 39 expected.
Could not analyze text. Text format 44 expected.
Could not analyze text. Text format 123 expected.
Could not analyze text. Text format 375 expected.
I can understand the error if i see the code section causing the error
i am getting following error when using rp.printpreview() functuin in vb.net System.MissingMemberException: 'Overload resolution failed because no accessible 'Copy' accepts this number of arguments.'
as well as can i send parameters, create formula, add page number and can i create sub report
please guide me