Crystal report that run in VB6 RDC

Posted on 2005-05-06
Last Modified: 2008-01-09
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..
Question by:jellyfizme
    LVL 9

    Expert Comment

        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

    LVL 9

    Expert Comment

       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

    LVL 9

    Expert Comment

        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.


    Author Comment

    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?
    LVL 100

    Expert Comment


    Author Comment

    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?
    LVL 100

    Expert Comment

    Haven't done any runtime creation do I don't know.

    LVL 9

    Expert Comment

        I vote for PAQ with points refunded.

    Accepted Solution

    PAQed with points refunded (85)

    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    Title # Comments Views Activity
    zeroFront challenge 7 58
    array6 challenfge 6 48
    countPairs challenge 7 37
    pairs challenge 5 29
    A short article about problems I had with the new location API and permissions in Marshmallow
    This is about my first experience with programming Arduino.
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now