CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old March 26th, 2005, 01:03 AM
    mfdarvesh mfdarvesh is offline
    Junior Member
     
    Join Date: Mar 2005
    Posts: 13
    mfdarvesh is an unknown quantity at this point (<10)
    Printing Database Field on Multiple Columns

    Dear Friends:

    Is there any way exists, that may I print a database Fields on Multiple columns, like, I have a paper of bigger width approx 15", and I have only three fields i.e. PNo, Type, Amount to print to that Paper. The Type fields has certain values, like when the Type changes, the Fields may be printed on teh next part of the Paper. As I estimate, three protion can be printed on my page, but how to accomodate then, don't know, please help me.
    Reply With Quote
      #2    
    Old April 7th, 2005, 09:43 AM
    Jukka Jukka is offline
    Member
     
    Join Date: Apr 2005
    Posts: 35
    Jukka is an unknown quantity at this point (<10)
    Re: Printing Database Field on Multiple Columns

    I don't know what type of data source you have, but if you are using a relational database you could implement a stored procedure. First read the data into a cursor and based on some condition make the split to your final data structure returned by another cursor.

    e.g.

    Implement a counter that recieves a value (1,2,3) when looping your cursor

    if counter = 1 Then
    val1a := cursor_field1
    val1b := cursor_field2
    val1c := cursor_field3

    if counter = 2 Then
    val2a := cursor_field1
    val2b := cursor_field2
    val2c := cursor_field3

    if counter = 3 Then
    val3a := cursor_field1
    val3b := cursor_field2
    val3c := cursor_field3

    Set counter := 1 and
    write (val1a, val1b, val1c,val2a, val2b, val2c,val3a, val3b, val3c) to your return cursor.

    - Jukka
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 11:48 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009