Output Needed
Row Grouping
I am trying to create a report to match exactly as in attached file using RDLC, that has three levels of data:
Packing No
PO No
Item
Level 2 and 3 should come in a single column, to achive this I have tried using subreport:
Column Grouping - If more than one PO arrives, column is repeating horizontaly instead of extending vertically
Row Grouping - Two columns are created one for PO No, another for item details,instead on single column
Subreport inside subreport - Here first subreport have Packing No as Parameter, second subreport has Packing No & Po No as parameter, in this case first row of RDLC alone displays all data correctly, subsequent rows are not able to receive the parameter and it displays error.
I came close but not able to complete, any solution will be greatly helpful to me.
I think you are over-complicating things and don't need to place sub-report inside sub-report.
I can see that it might be needed to place (one column report with row grouping by PO#) sub-report into details cell of column 2 and pass package No to it as a parameters to filter data.
Related
I have a DataTable that I'm passing to a FlexCel report. It contains a variable number of columns, so I'm using the Full Dataset feature (e.g. <#table_name.*>).
However, only a subset of the fields are dynamically generated (I have a variable number of attachments). The column name for each attachment field starts with a common word (e.g. "Attachment0", "Attachment1", etc).
What I would like to do is output the known finite set of fields and then the variable number of attachments. It would be nice if I could write something like <#table_name.Attachment*> (and <#table_name.Attachment**>). Is there any way in FlexCel Reports I can achieve the same result?
A side benefit to such a solution means that I could keep the formatting for the known/finite set of fields.
Update
I added place holder columns to the document, each with a <#delete column> tag, so that the un-wanted columns/data are removed.
Although this works, it's not ideal. For example, if I want to see how the columns fit in the page width (in print preview), then I need to hide the columns. Then I have to remember to un-hide them again, so other developers can see/understand my handy work.
It would be much more straight forward if I could filter the fields before they're output to the document.
I realised there's an alternate way around this problem. I broke up the data into two sets of data - <#table_name.*> and <#table_name_attachments.*>.
The fixed set of fields are in the first table and the variable set of fields is in the second table (all the "Attachment*" fields). When the report is run, I place them next to each other (in the same order) in the same worksheet. This means I have two table ranges - "_table_name_" and "_table_name_attachments_" on the one sheet.
Now I'm able to run my print preview without hiding/re-showing the columns-to-be-deleted. I've also eliminated human error - it was all to easy to accidentally set the wrong number of padded/delete columns.
I don't know if its possible or not, but thought I'd ask. Many times reports need data grouping to have anchored to the bottom of the report some summary information, such as invoices. You don't want the totals shifting UPwards based on only 2 detail lines vs another with 20. I've tried working with using the Tablix bound to the data source for the output but couldn't get it quite right... It would either shift up, or force break and appear at top of following page.
So, if anyone has some ideas to help resolve that, that too would be great.
My second approach was to just use a simple report page footer. However, the overall "Report" page is not technically "BOUND" to any datasource. So, if I put a textbox in the footer and want it to show something, I can't pick "the most recent row from the datasource associated with the Tablix", it always requires an aggregate, such as
=First(Fields!SomeField.Value, "SomeDataSource" )
=Sum( ...
=Last( ...
etc...
I just want it to have whatever was the most recent... so I tried to use report variables to create one and was thinking to have it get updated per row being processed, so it always had whatever the "latest" value was and I could just dump that value at the bottom of the report.
Any suggestions to either would be great. Thanks.
I know this is an old question, but I had a very similar problem and came up with a unique solution. I had a statement that needed to have the payment slip print at the bottom of the page even if the statement line items wrapped over to another page. I solved it by:
Making all rows in the report a uniform height.
Calculating how many rows were required to fill the page (minus the height of my payment slip.
Getting the number of line items in the statement.
Calculating the remaining number of rows needed to push my payment slip to the bottom of the page.
Adding a sub-report with the calculated number of blank rows to pad out the necessary space between the line items and the payment slip.
The advantage of that approach was that I could generate bills for multiple customers, and since the padding is part of the group it would be customized for each customer's bill and bottom-justify the pay slip for each of them.
You can use a similar approach to push your "footer" info to the bottom of your page. Since it is still inside of your data group you'll have access to the data values you need as well.
In the footer you can refer to report item from report body, like this:
=ReportItems!myFooterValueTextBox.Value
The catch is that you can refer to only one report item in your footer, so you may need to add invisible footer row in your table and concatenate all your totals into one cell (myFooterValueTextBox) in that row:
=First(Fields!SomeField.Value, "SomeDataSource") + "|" +
Sum(...) + "|" + .... +
Last(...)
I used pipe as deliminator in my example, so then in the footer, I would split the string and place values in appropriate containers, like this:
=Split(ReportItems!myFooterValueTextBox.Value,"|")(0)
I have a tablix that is only returning the first row from a created dataset. I verified my stored procedure and dataset in asp and it's returning the expected results. Also I read somewhere to check the count of rows using a textbox and the CountRows() function and it indeed shows the expected count. Is there any special setting in the tablix or somewhere that I'm missing? Also if I add grouping, it would return the first row from each group which are several rows apart. This is really frustrating. Thanks in advance
If you deleted the row group it will do that. Or, if your row group is based on a single row value, that would be another reason. I had a limited result set coming back, and realized I was not grouping according to how I intended the report to behave and display.
Check to see if there is a filter on the Tablix, or perhaps you are grouping such that it only produced a single row? Please provide more information.
One of the reason I found for this issue is when a Matrix type of report (RDL) is converted to Tabular type of report by removing all grouped columns. To a developer it seems fine, but some where there is catch which does not convert a Matrix type report to Tabular and hence the grouping still continues and report never shows all the rows as expected. Only solution I found for this issue is creating a new RDL file of Tabular type and it all works fine.
I have a rdl report which contains Legend, chart and rows of records below legend and chart. I got a problem here is I can repeat legent and chard for every type new item but I cannot repeat headers for rows of records. I tried with visibility but did not work. headers are simple as row in the table in rdl report which are required to show date, time, position , like that for every record coming database , any suggestions much appreciated
If you want to repeat header with each row and you are using Visual Studio for designing, it is easy:
Simply click the data row (the one in the middle), right-click it and choose Insert Row Above, in that row you can insert your header text and it will repeat with each row record.
If I haven't deciphered your question correctly, please leave a comment.
I have a situation where I'm populating a gridview with a bound data source, and want two additional rows at the very bottom; one to show the sum of values in the columns and one to show the average of values in the columns. I can quite easily calculate these values by aggregating information taken from the rowDataBound event, but don't know how to go about manually adding the additional two rows to the gridview. Any help much appreciated.
You can use the Footer just like you use Headers in gridview. Another solution is use a query in such way:
query 1 : your original query
UNION
query 2 : your query which contains sum
(This applies only if you don't apply paging to your grid)
If it's a single row of information you can use summary footer. See Displaying Summary Information in the GridView's Footer.
(source: asp.net)
If you want two additional rows, you can stuff rows into an IList. At the business logic layer, you can add more rows to the list returned by DAL.