in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Report appears very urgent

Last post 04-08-2008 4:41 AM by D-eath. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 04-03-2008 8:23 AM

    • D-eath
    • Top 500 Contributor
    • Joined on 01-16-2008
    • Posts 9

    Report appears very urgent

    Hi, I got a problem regarding your C1WebReport control.

     I'm using a subreport in an report and I'll submit the RecordSource of this Subreport via my code with a stored procedure that appears like:

     
    ALTER PROCEDURE [dbo].[get_Positions]
    (
        @ID nvarchar(50),
        @TYPE nvarchar(50)
    )

    AS

    BEGIN
    SELECT * FROM qryITEM_LIST WHERE ID = @BT_ID AND TYPE = @BT_TYPE

    end
     

    qryITEM_LIST is a View and works without any problems.

    My source code is like the following:

    this.C1WebReport1.Report.Fields["subReport"].Subreport.DataSource.RecordSource = "get_Positions('" + this.GetUrlParam("ID") + "', '" + this.GetUrlParam("TYPE") + "')";
                    

    where GetUrlParam is a function to get parameters out of the URL. Everything fine, my goal was to filter the results for the subreport via the ID and TYPE. Works great, but (I have to say the subreport is in the detail section of my main report) it repeats itself over and over again.

    For example, I have 2 Items in the ItemList with ID = 2999 and TYPE = ABC.

    The report shows me the following:

    1  Article

    2 Article2

    1 Article

    2 Article2

    1 Article

    2 Article2

    1 Article

    2 Article2

     

    Might you have something to help me with this problem? Sometime sit's different and just shows everything 3 or 2 times. I don't know...

     

    Greetings 

  • 04-04-2008 3:26 AM In reply to

    Re: Report appears very urgent

    Hi,
     
    I could not really understand the problem, I think you can change your sql query to pull only distinct rows for the same ID and type.
     
    Regards,
    Patrick
    <D-eath> wrote in message news:203476@10.0.1.98...

    Hi, I got a problem regarding your C1WebReport control.

     I'm using a subreport in an report and I'll submit the RecordSource of this Subreport via my code with a stored procedure that appears like:


    ALTER PROCEDURE [dbo].[get_Positions]
    (
        @ID nvarchar(50),
        @TYPE nvarchar(50)
    )

    AS

    BEGIN
    SELECT * FROM qryITEM_LIST WHERE ID = @BT_ID AND TYPE = @BT_TYPE

    end
     

    qryITEM_LIST is a View and works without any problems.

    My source code is like the following:

    this.C1WebReport1.Report.Fields["subReport"].Subreport.DataSource.RecordSource = "get_Positions('" + this.GetUrlParam("ID") + "', '" + this.GetUrlParam("TYPE") + "')";
                    

    where GetUrlParam is a function to get parameters out of the URL. Everything fine, my goal was to filter the results for the subreport via the ID and TYPE. Works great, but (I have to say the subreport is in the detail section of my main report) it repeats itself over and over again.

    For example, I have 2 Items in the ItemList with ID = 2999 and TYPE = ABC.

    The report shows me the following:

    1  Article

    2 Article2

    1 Article

    2 Article2

    1 Article

    2 Article2

    1 Article

    2 Article2

     

    Might you have something to help me with this problem? Sometime sit's different and just shows everything 3 or 2 times. I don't know...

     

    Greetings 



    http://helpcentral.componentone.com/cs/forums/p/74828/203476.aspx#203476

  • 04-04-2008 3:39 AM In reply to

    • D-eath
    • Top 500 Contributor
    • Joined on 01-16-2008
    • Posts 9

    Re: Report appears very urgent

    Hi,

     my problem is that it shows every single line of my sql output 3 or 4 times instead of just one time and I can't find the reason.

    Greetings
     

  • 04-07-2008 4:26 PM In reply to

    Re: Report appears very urgent

    Could you please send me your report defintion?
     
    Regards,
    Patrick
     
     
    <D-eath> wrote in message news:203506@10.0.1.98...

    Hi,

     my problem is that it shows every single line of my sql output 3 or 4 times instead of just one time and I can't find the reason.

    Greetings
     



    http://helpcentral.componentone.com/cs/forums/p/74828/203506.aspx#203506

  • 04-07-2008 6:00 PM In reply to

    Re: Report appears very urgent

    Hi, i guess you're having this problem because your subreport is inside the details section of your main report, which means that the data shown for the subreport is going to be repeated for every single detail you have in your main report.

     Try moving your subreport to the report footer section of the main report and see if that's the result you want.

     Regards, Gabriel

  • 04-08-2008 4:41 AM In reply to

    • D-eath
    • Top 500 Contributor
    • Joined on 01-16-2008
    • Posts 9

    Re: Report appears very urgent

     Hi,

     thanks to Gabriel. That was the silly solution. :-)

     
    Greetings
     

Page 1 of 1 (6 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.