cancel
Showing results for 
Search instead for 
Did you mean: 

force page break

Former Member
0 Kudos

I am using CR8.5. In the CRViewer I can force a page break if a user choose to do that.

if blnPage = true then

crReport.Sections.Item(3).NewPageBefore = True

end if

Now I am using CR XI. I can't make it work. Any suggestions?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello, Yongling Xin;

I have tested the following line with Crystal Reports XI R1 (11.0) and it succeeds.

crReport.Sections.Item(3).NewPageBefore = True

I am not sure what your 'If statement' is doing.

if blnPage = true then

Is it possible it is not resolving to true?

What references have you chosen for Crystal Reports in your project?

Elaine

Former Member
0 Kudos

When I use the code, it tells me that sections is not a memeber of CrystalDecisions.CrystalReports.Engine.ReportDocument

Here is the variable:

Dim crReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument

I also add this reference to the project: CrystalDecisions.CrystalReports.Engine

Do I miss anything here?

Thank you very much.

former_member183750
Active Contributor
0 Kudos

I'd recommend looking at our samples from here:

https://smpdl.sap-ag.de/~sapidp/012002523100006252822008E/net_win_smpl.exe

Normally, the references you'd have would be:

crystaldecisions.crystalreports.engine

crystaldecisions.shared

crystaldecisions.reportsource

crystaldecisions.web - for web apps

crystaldecisions.windows - for win apps

This article is also good to have:

http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf

And the developer help files are always a great source of info:

https://boc.sdn.sap.com/developer/library

If the above still does not help, what version of .NET are you using and what CR SP level are you at?

Ludek

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks a bunch. I will try that.

Former Member
0 Kudos

I put all the reference I can think of. I am using crviewer with VB.NET 2005.

It seems to me I can not use crViewer.Sections.Item(3).NewPageBefore. In my VB code I used CRAXDRT.Report and it allows me to use "Sections". I must miss a reference or something.

I am going to check my SP and make sure I have everything.

Thanks

former_member183750
Active Contributor
0 Kudos

OK, here is the problem; You are using CR XI r1 (11.0) and .NET 2005. CR 11 does not have assemblies for framework 2.0, so you must use CR XI release 2 (11.5).

Search the forum as there are a number of post regarding this.

CR XI r2 can be downloaded from here:

https://smpdl.sap-ag.de/~sapidp/012002523100006008462008E/crxir2.zip

Uninstall your current version of Crystal Reports 11. The install the above, using the same keycode as you did for CR 11.0.

I would also recommend that after you have installed CR XI r2, download the latest service pack for CR from here:

https://smpdl.sap-ag.de/~sapidp/012002523100006255422008E/crxir2_sp4_inc.exe

Ludek