cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal 2011 RAS. Section Expert Paging tab properties does not correspond to EnableNewPageAfter, EnableNewPageBefore properties in section format

Former Member
0 Kudos

Hello,

We have application where you can select fields, select groupings and properties (for example disable page grouping ) and create custom report.

It worked with crystal 9.

Now we are converting to Crystal 2011 and I have the following problem:

I create report dynamically and set group footer EnableNewPageAfter property to false in group footer section.

When report is created , I open it and see that New Page After property in section expert is unchecked.

When I run the report, I have page break after each group - which is wrong.

If I open report in Crystal, check New Page After Property , save, exit report, open report again, uncheck New Page After Property, save and exit,And than run the report again,

My report behaves correctly:does not break after each group.

If I open report in Crystal, check New Page After Property , save, exit report and then load this report in code and look at EnableNewPageAfter property,

the property is still false - but it should be true

Do I use the wrong property?

What is the right RAS property to set  Crystal report 'New Page After' Property in the code for group footer/group header?

Below is method that sets properties for section.

All properties from common tab works, but paging tab properties does not work

public static void SetSectionSettings( ReportSectionController reportSectionController, Section section, Color backgroundColor, bool enableKeepTogether, bool enableNewPageAfter,

                                            bool enableNewPageBefore, bool enablePrintAtBottomOfPage, bool enableResetPageNumberAfter, bool enableSuppress, bool enableSuppressIfBlank,

                                            bool enableUnderlaySection, bool autoFitSection )

        {

            try

            {

                SectionFormat sectionFormat = new SectionFormat();

               

                sectionFormat.EnableKeepTogether = enableKeepTogether;

                sectionFormat.EnableNewPageAfter = enableNewPageAfter;

                sectionFormat.EnableNewPageBefore = enableNewPageBefore;

                sectionFormat.EnablePrintAtBottomOfPage = enablePrintAtBottomOfPage;

                sectionFormat.EnableResetPageNumberAfter = enableResetPageNumberAfter;

                sectionFormat.EnableSuppress = enableSuppress;

                sectionFormat.EnableSuppressIfBlank = enableSuppressIfBlank;

                sectionFormat.EnableUnderlaySection = enableUnderlaySection;

                sectionFormat.BackgroundColor = uint.Parse( ColorTranslator.ToWin32( backgroundColor ).ToString() );

               

                reportSectionController.SetProperty( section, CrReportSectionPropertyEnum.crReportSectionPropertyFormat, sectionFormat );

            }

            catch ( Exception ex )

            {

                log.Error( "ReportApplicationBuilder error - SetSectionSettings: ", ex );

                throw;

            }

        }

Thanks,

Julia Klubis

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Julia,

There have been a few escalations of this type. For some odd reason you have to call the .Set 2 times...

reportSectionController.SetProperty( section, CrReportSectionPropertyEnum.crReportSectionPropertyFormat, sectionFormat );

reportSectionController.SetProperty( section, CrReportSectionPropertyEnum.crReportSectionPropertyFormat, sectionFormat );

See if that works?

Don

Answers (0)