SSRS BIDS Placeholder line select in expression - sql

I have an SSRS report with a very large text box. When the report is rendered the data may or may not use up the entire size of the textbox. I cannot have the box expand so I have the checkbox unchecked that will allow it to expand. Instead i would like to print the remaining text in a separate placeholder.
I want to know if there is a way in an expression to select a specific number of rows of text in a text box.

Related

Is there a way to insert checkboxes and text boxes in Word using VBA?

I want to be able to populate a table of user defined length with one column of check boxes and one column of text boxes. For example, the user will enter a number of rows in a text box on a page, click a button, and generate this table. Is this possible using VBA? I have done this in excel but is there something equivalent for Word?

Average of a query column put into a Text Box

I want to put an average of my query's column into a text box. The intent is to find the average of the marks a student has and put it into a text box in the form. The code I've put in the Control Source field so far looks like this:
= Avg(SELECT Marks.Mark
FROM Marks
WHERE ([IdS]=[Marks].[IdS]))
Where [IdS] is a text box with student ID of the selected student in this form. When I go back to the form view the text box gives me #Error.
Any idea?
You are using a SQL statement for a control record source, or you need to use the query as the underlying form source or use a domain aggregate to get the desired result=DAvg("[Marks]![Mark]","Marks"," [Marks]![ID] = [IdS] "). (Don't forget to set a form requery when changing the [IdS] value)

Sum numbers in textboxes to a single textbox without button

Ok, I am looking for the code to sum numbers from multiple boxes (2 in this case) and automatically fill another box with the sum without clicking a button or anything. I'm talking about displaying the sum in the third box while numbers are being inputted into the first two boxes. Is this possible? If so, how?
You can subscribe to the TextBox TextChanged events, and update the third text box when the text in either of the first two changes.
Just make sure you handle invalid input carefully (ie: use Int32.TryParse instead of Int32.Parse), as exceptions will likely be raised as the text box values aren't numbers.

access: displaying data on a report

i have a report that is attached to a query
i want to display the contents of a query. there are three columns. i made a list box but it looks weird:
alt text http://img130.imageshack.us/img130/2245/52036335.png
i dont want the scroll bars, i just need the three fields from a query to be displayed regularly just as they would be in a spread sheet or grid
In your report's Detail section, create a text box (not a list box) for each of those 3 fields in your query.
It might be easier to get oriented by creating an autoform based on the query.

How do I show data in the header of a SQL 2005 Reporting Services report?

Out of the box SSRS reports cannot have data exposed in the page header. Is there a way to get this data to show?
One of the things I want in my reports is to have nice headers for my reports. I like to have a logo and the user's report parameters along with other data to show to give more information for the business needs the report needs to clarify. One of the things that Microsoft SQL Server 2005 Reporting Services cannot do natively is show data from a Dataset in the header. This post will explain how to work around this and how easy it is.
Create the Report Server Project in the Business Intelligence Projects section and call it AdventureWorksLTReports. I use the AdventureWorksLT sample database from CodePlex.
alt text http://www.cloudsocket.com/images/image-thumb.png
Next show the Page Header by right clicking in the Report area with the designer.
alt text http://www.cloudsocket.com/images/image-thumb1.png
The Page Header will appear. If you want to show the Page Footer this can be accessed from the same menu as the Page Header.
alt text http://www.cloudsocket.com/images/image-thumb2.png
I created a stored procedure that returns data for the Sales Order to be presented in the Page Header. I will show the following information about the Sales Order in the Page Header:
Order Date
Sales Order Number
Company
Sales Person
Total Due
I create a TextBox for each of my data fields in the Page Header along with a TextBox for the corresponding label. Do not change the Expression in the TextBoxes that you want the Sales Order data in.
alt text http://www.cloudsocket.com/images/image-thumb3.png
In the Report Body, place a TextBox for each data field needed in the Page Header. In the Visibility for each TextBox, select True for Hidden. This will be the placeholder for the data needed in the Page Header.
alt text http://www.cloudsocket.com/images/image-thumb4.png
Your report should look similar to the screenshot shown below.
alt text http://www.cloudsocket.com/images/image-thumb5.png
The last step and most important is to reference the Hidden TextBox in the TextBoxes located in the Page Header. We use the the following Expression to reference the needed TextBoxes:
=ReportItems!.Value
Your report should now look similar to the following:
alt text http://www.cloudsocket.com/images/image-thumb6.png
Your Report preview should now have the Sales Order Header data in the Report Header.
alt text http://www.cloudsocket.com/images/image-thumb7.png
You have to do it through Parameters. Add a parameter for each piece of data you would like to display, then set the parameter to Hidden. Then set the default value to "From Query" and set the Dataset and Value field to the appropriate values.
I think the best option is creating a internal parameter, with the default value the field of the dataset you want to show.
Here are two possible workarounds:
You can place the databound field within the body of the report as a hidden textbox, and then in the header place another textbox with it's value pointed at the the one hidden within the body.
Try using report parameters to store the data, and use those parameters to access the data in the header.
This technique wouldn't work if your report spans over multiple pages, use queried parameters instead, and set the textbox value to =Parameters!Name.Value as per this article.
I'm with Orion Adrian here. Report parameters are the way to go.
I wanted to show a field, common to all returned rows, in the header, and for this scenario I went for the linked table solution (placing a table containing the field in the body and link a textbox in the header to this table).
I did that because if you are using the parameter solution and no data is returned to the field in question, the text "Parameter is missing a value" is shown instead of just a blank table. I reckoned this text would confuse users (as the parameter isn't even visible).