Huge problem with reportviewer RRS feed

  • Question




    I have a one(Main)-to-many(Row) table which contains invoice data.


    Main table                                                         Row table

    ---------------                                                        ----------------

    Invoice_ID(key)                                                  Invoice_ID

    Customer                                                          Product

    Customer_ID                                                     Product_ID

    Date                                                                 Price

    etc.                                                                   etc.


    Now, when I try to drag the Date column to the report table into the column that has been reserved for Date, I get this:

    =First(Fields!Date.Value, "crmDataSet_Main")


    This means it will print only the first rows date to all of the rows. Why is that? Every row needs to have their own dates, this has been bugging me for a long time but I couldn't solve it by myself so please if anyone can help me I would really appreciate it. Thanks!

    Monday, October 29, 2007 8:13 AM

All replies

  • just take off the =First and the enclosing brackets.
    Monday, October 29, 2007 10:02 AM
  • I've tried that allready but I get an error:


    The Value expression for the textbox refers to the field Date. Report item expressions can only refer to fields within current data set scope or, if inside an aggregate, the specified data set scope.


    How can I fix this?

    Monday, October 29, 2007 10:24 AM
  • check your report data source - that may help check if your data set scope is right
    Monday, October 29, 2007 10:36 AM
  • Scope is set for the dataset containing the Row table information. Which is correct except for the Date information from the Main table.

    Monday, October 29, 2007 10:45 AM
  • I'm not 100% sure how you want your report to work / display data. Do you want a master/detail type of report? If so you would need to add another datasource, or create a db view that collects all the data you want to display. If your dataset contains the Row table information as you say, the date won't appear there, so you will get an error.
    Monday, October 29, 2007 11:08 AM
  • Hmm...that db view you said sounds like an answer, I'll try that and report if it was successfull.


    Monday, October 29, 2007 11:14 AM
  • Cool, hope you get it working. You might want to group by your 'Main' table in some way.
    Monday, October 29, 2007 11:20 AM

    It worked perfectly with the way you said, awesome!Thanks mate! Smile
    Tuesday, October 30, 2007 6:48 AM
  • nice one! glad to help - could you mark the reply that helped as the 'answer'  - should help other people coming to the forum.
    Tuesday, October 30, 2007 8:26 AM