Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange!! Do you know if this is a bug in crystal?

Status
Not open for further replies.

RovirozM

Technical User
Dec 9, 2009
37
MX
Hi Guys,

I'm running in Visual Studio 2010 (Visual Basic) two Crystal Reports when I press a button in my app. For Example :

Button1_Click
Report1() <-- This report has two pages
Report2() <-- This report has one page

But something happen when I run it because when you click the command button the two crystal reports run, then the one that is showed on the screen first is the last one executed ( Report2() ) with one page, then after moving to the first one ( Report1() ) show me that are two pages available but when I press the Next page button on Crystal/Visual toolbar it doesn't take it to the second page (just to the Report2() again).

Why could this be happening? it is a bug ? I can never see the second page on the first report().... (Of course if I change the order of both reports I mean the one with two pages at the end works perfectly)

This is an example of how a create this kind of reports on VS2010:

Dim rcore As New Core.T2_appUsersHelper
Dim PrinterSettings As New System.Drawing.Printing.PrinterSettings

If InStr(1, Trim(FOBCodesToDisplayFIFOReport), Trim(lsvShipPlans.FocusedItem.SubItems(8).Text)) = 0 Then
Exit Sub
End If

RV1.FileName = Core.T2_appModuleHelper.GetAppPath(gCore, gAppModule) & "\Reportes\" & "Report1.rpt"
RV1.SetDatabaseLogon(gCore.User.UserName, rcore.getPasswordText(gCore.User))
RV1.PrintOptions.PrinterName = SetPrinter(PrinterSettings.PrinterName)
RV1.SetParameterValue(0, "6623957327")
RV1.SetParameterValue(1, GUSERNAME)
RV1.SetParameterValue(2, "APP")

'RV1.PrintToPrinter(1, True, 1, 500)
Dim ObjViewReport As New gui.frmCrReports(RV1, GFrmMain)
ObjViewReport.Show()

Any idea? or parameter to change?

Thanks a lot !

P.D. I put an easy MediaFire Word File with images that will describe it better.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top