How can i connect and use Crystal reports using source code only.Just like in Visual Basic 6.0, to use the Data Report (.dsr), the code will follow just like this.' Cn is the Connection'rs is the Recordset'DataReport1 is the Data Report (.dsr)Set rs = New ADODB.Recorsetrs.Open 'Select. from tblinventory', cn, adOpenStatic, adlockOptimisticSet DataReport1.datasource = rsDataReport1.ShowIn this case, we don't need the Data Environment anymore to view the reports.So is it possible to do the same in crystal reports? I want to view and control the reports using the source code.I am using Visual Basic.NET 2005 and Visual Basic 6.0.Please Help me to solve my problem.
Please send me or give me some reference links that can be of help, not just for me, but also to others that are experiencing the same problem.Thank you very much and regards to all. Thank you very much for your reply in post.In this code:'cn is the Connection'rs is the Recordset'DataReport1 is the Data Report (.dsr)Set rs = New ADODB.Recorsetrs.Open 'Select. from tblinventory', cn, adOpenStatic, adlockOptimisticSet DataReport1.datasource = rsDataReport1.Show.I have just set the datasource of the ' Datareport1', which is the 'rs'.
I would like to know the ways in which i could link crystal report XI to my visual bacis codes. 8.5 it works well with VB6 but then it doenst work with the version XI and all the reports and code. This example works, must include the crviewer.dll.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |