Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 615
  • Last Modified:

Crystal report that run in VB6 RDC

I created some crystal report using vb6 in runtime.. Some minor prob occur but I dunno how to solve.. can someone give me any idea..
1.  the value in "Year" field appear "2,004" instead of "2004". How to convert it back?
2.  I insert "crSVTPageNumber" using "AddSpecialVarFieldObject". it seems like using too many space in my report..
    wat can I do to control the character space?
3.  Sometimes, there's some blank page after the report.. wat should I do?
4.  This is wat my crosstab report looks like:
                                    |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  10  |  11  |  12  |   (Month)
     Company 1 | Input    |   {  S u m m a r y       v a l u e  }
                      | Output  |   {  S u m m a r y       v a l u e  }
     Company 2 | Input    |   {  S u m m a r y       v a l u e  }
                      | Output  |   {  S u m m a r y       v a l u e  }

        a.  How could I add a row header for my CompanyName?
        b.  How could I add the "Input" & "Output" label in crosstab report during runtime?
        c.  How could I change the month from numbering to Word? MonthName({Table.Month}) wouldnt work.
        d.  Can I add a record number in front of the report?
        e.  How to custome format the font size in crosstab?

This is my crosstab report code:

  Set crSection = crReport.Sections.Item("RH")
  Set crXtabObject = crSection.AddCrossTabObject(360, 3000)
  With crXtabObject
    .EnableRepeatRowLabels = True
    .HasDropShadow = True
    'Here we add the fields for the Xtab. In this case
    'we specify the fields by their database field index.
    .ColumnGroups.Add crReport.Database.Tables(1).Fields(3)
    .RowGroups.Add crReport.Database.Tables(2).Fields(4)
    .SummaryFields.Add crReport.Database.Tables(1).Fields(5)
    .SummaryFields.Add crReport.Database.Tables(1).Fields(8)
  End With

I'll be very appreciate for your kindness to help me with my prob... A million thanks first.. ^_^
I am very sorry that I couldnt give too many points for u ppl.. I only left 100... Sorry..
  • 4
  • 2
  • 2
  • +1
1 Solution
    To solve number 1

Open the report in Crystal
Right click on the year field
Select "Format Field..."
Make sure the Number tab is selected
Click "Customize"
Clear the check mark next to "Thousands Separator"
Click OK and OK

   To solve number 3

Right click the left of the report (where it shows the section names)
Select "Format Section"
Make sure the Report Footer has "Suppress Blank Section" checked

    Oh, and as for E, you should be able to left click on each field in the Cross-Tab report and use the controls on the top left. Or right click, select "Format Field", and select the Font tab to get access to more font properties.

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

jellyfizmeAuthor Commented:
Unfortunately Dang, I'm not using the Crystal Report Software to build all those report.. All my report are created during program runtime, using vb6 source code & Report Object Creation API.

I found that it's quite difficult with some of this codes...

Any other idea?
jellyfizmeAuthor Commented:
I hav had those 2 program. The code has been add in successfully.. But none of my question is found inside.
I try to convert the integer month in the crosstab by doing this:
                               .RowGroups.Add format(crReport.Database.Tables(2).Fields(4),"mmmm")
the return error is :"The Object doesn't support this property or method"

I face a lot of problem especially in crosstab report creation in runtime.. I dunno how to customize it by controlling the font size, or add in new label.

Now I'm facing a big problem during my export to Ms Word. The words simply changed the font to other name.. making my report layout like wat... wat should i do?
Haven't done any runtime creation do I don't know.

    I vote for PAQ with points refunded.
PAQed with points refunded (85)

Community Support Moderator

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now