CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2007
    Posts
    1

    How to multiply records in CR

    Hi,

    can anyone help me by the following issue:

    I'd like to print out some stics in CR. I get all the data for each item that I need into CR. One field is quantity - now I would like to print so many detail sections, as quantity (for example if quantity is 13, I need 13 sticks, that looks the same) . How could I do this?
    Thanks

  2. #2
    Join Date
    Jul 2005
    Posts
    1,083

    Re: How to multiply records in CR

    The best approach, I believe, is to design & develop a small application to do it

  3. #3
    Join Date
    May 2006
    Posts
    324

    Re: How to multiply records in CR

    What's the maximum quantity?
    If you can create a table in the database then create one with one numeric column and 'n' rows where each row has a quantity number in it. e.g.
    create table multiply(quantity number);
    insert into multiply values (1);
    insert into multiply values (2);
    insert into multiply values (3);
    etc.

    and then join to this table on the quantity fields using a >= link, e.g.
    select t.field, t.quantity
    from table t inner join multipy m on t.quantity >= m.quantity
    order by t.field

    This'll give you 'quantity' detail records per item. The only problem I see is that items with a quantity that's greater than the maximum number in the multiply table will only have that maximum nuber of records.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured