12 Years
Discussion Span
Last Post by AndreRet

if u mean displaying a report on vb this is how u go about it.
Place The crystal report control on the form,
connect it to the report file name

Dim Var as CrystalReport
set Var = CrystalReport1 'setting the variable to the name of the crystal report control
Var.WindowState = crptMaximized 'Maximizing the report to full screen
Var.Action = 1 'displaying the report


first put a Crystal Report control on your form...then
copy the code to your button click event.

CR1.DiscardSavedData = True
CR1.WindowState = crptMaximized
CR1.ReportFileName = crystal_report_file

note: CR1 - is the control name for the Crystal Report control i have used.

hope this will help you...good luck.


On any componend of controls (as button ..), click with righ button and choose componends, then choose crystal report, after that you will find it with others componend (or objects).

for me, i need how to add or delete a line from a report (with VB code).
The report is created, and i need to add some lines, sometimes, i need to delete sometimes. It depend on the user choice.
Can any one help me.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.