Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Paul Gibson
  Where is Paul Gibson?
 Glasgow
 United Kingdom
 Paul Gibson
 To: FRED QUAYE
  Where is FRED QUAYE?
 
 Ghana
 FRED QUAYE
 Tags
Subject: RE: problem print group rpt with header
Thread ID: 415590 Message ID: 416151 # Views: 32 # Ratings: 0
Version: Not Applicable Category: C#.NET
Date: Monday, December 22, 2014 5:03:55 PM         
   


> >
> >
> > Thanks for answering the first question.
> >
> > Did you answer the second question? I can't see an answer to that one.
> >
> > Can you please clarify what you have tried already? Did you try the option in my screenshot?
>
>
>
> Thanks a lot.
>
>
> I have worked on it and its breaking all right but I am having one row on each page for a group.
>
>
> How do I correct this ?
>
> The stored procedure grouping is as follows
>
> SELECT #MGFINAL.* ,#MGFINAL.IDNO+#MGFINAL.LOANUMBER AS IDNOLOANUMBER,
> LOANS.CUSTOMER,
> LOANS.ADVLOAN AS PRINCIPAL,
> LOANS.AC_BALANCE AS ACCOUNT_BAL,
> LOANS.TERM_START AS ORIGIN_TERM,
> LOANS.TERM_NOW,
> LOANS.TOTPAYMT AS TOT_AMT_PAID
> FROM #MGFINAL
> LEFT JOIN LOANS ON #MGFINAL.IDNO=LOANS.IDNO
> GROUP BY #MGFINAL.IDNO+#MGFINAL.LOANUMBER
> ORDER BY #MGFINAL.IDNO+#MGFINAL.LOANUMBER,#MGFINAL.TX_DATE
>

>
> End
>
> please review the stored procedure.
>

When you say "breaking all right" do you mean that you are getting the page breaks?

I'm afraid you are not giving anywhere near enough information to help me work out what your problem is so I am going to have to make a lot of guesses based on what you have supplied. It really would be very useful if you are as descriptive as possible when trying to explain your issue and remember that a picture paints a thousand words.

Your query says you are grouping on the column you create as IDNOLOANUMBER what is your group expression on the RDLC? Without knowing what your RDLC group expression is I can't guess what you need to change it to.

If the RDLC group is also IDNOLOANUMBER then you are only going to get one record per group because that's what a SQL group does it merges all the data from the non-grouped columns per different data in the grouped column leaving you with rows with only different different data in the grouped column so when the data is displayed by the Report Viewer if you have the group on the same column then it gives you a new group each time the data changes which is obviously every record because that's how you grouped it in the data.

One thing I find useful when debugging report data in .NET is when you get the data back into your DataSet output it to some XML file that you can review. I do this extremely simply:

DataSet reportDS = new DataSet();
' Code which gets the data
' .....
' Output the dataset to an XML file
reportDS.WriteXml(logPath);


...(make logPath a temp path on your c: drive during Debugging), you can then look at the XML and see if there is anything odd or unexpected about your data.

To be honest though your query looks strange because it has so many non-aggregate columns that are not mentioned in the GROUP BY clause and that looks like it would error because you might get inconsistent results.

I'm out of ideas because you've not supplied very much information.

ENTIRE THREAD

problm print grp rpt with header (sos) Posted by FRED QUAYE @ 12/8/2014 6:52:32 AM
RE: problem print group rpt with header Posted by Paul Gibson @ 12/8/2014 10:28:43 AM
RE: problem print group rpt with header Posted by FRED QUAYE @ 12/8/2014 11:40:07 AM
RE: problem print group rpt with header Posted by Paul Gibson @ 12/8/2014 12:17:32 PM
RE: problem print group rpt with header Posted by FRED QUAYE @ 12/22/2014 2:29:12 PM
RE: problem print group rpt with header Posted by Paul Gibson @ 12/22/2014 5:03:55 PM
RE: problem print group rpt with header Posted by FRED QUAYE @ 12/22/2014 5:50:38 PM
RE: problem print group rpt with header Posted by Paul Gibson @ 12/23/2014 10:19:05 AM
RE: problem print group rpt with header Posted by FRED QUAYE @ 12/24/2014 11:25:14 PM