This is probably an easy one, but its been bugging me.
If I have no rows for a particular table, is there any way that I can simply display some text saying something like 'no data available for report' ?
Similarly, I was thinking I could hider certain controls on the report if there are no rows available by using an expression in the Visible property of the control.
When I'm trying to logon the reporting service main page, the user logon dialogue box will ask you to input the authorized user id and password(It's the account created in windows system). But when I try to open certain report!on my reporting server, this logon dialogue box will be displayed again and I have to input the account and password again. All the reports can be directly opened after second entry.
So my quesition is how to setup reporting service so that I can open all the reports directly just after the first entry.That will bother users to browse report!freely only after inputing authority information twice.
PS: My platform is Windows 2K Server SP4 + SQL Server 2K SP4.
I have an HTMP form and for some reason, when I use a regular TextBox to display a field, Via an ASP conneciton to the database, it cuts it off when it gets to a " (A quote)
Example:
Field: Title Data: Where do "rabbits" come from?
If I try to pull that field into a regular html textbox it dispays,
Where do
Then if I change the textbox to a textarea it displays the entire field
Where do "rabbits" come from?
Is this a setting that causes this in SQL Server on the table.
I am new to SQL Server and am trying to learn these little differences.
Hello, I am very new to SQL and ran into a problem using Access. I hope you can help me here. The question is the following: I have to tables: Table 4x4: CommodityCode(string)/NeedofBU(high,low) Table ASDBComplete: CommodityCode/Manufacturer/Rating(red,green,yellow)
What I want to get as a result is to display all ComodityCodes that have a 'red' rating and a 'high' NeedOfBU. So far no problem. But now there usually is more than one manufacturer for one CommodityCode. What I need now is that the CommodityCode is not displayed if there actually exist a Manufacturer with 'green' or 'yellow' rating. How would you do that? What I have so far is:
SELECT [4x4].[CommodityCode], [4x4].NeedofBU, ASDBComplete.CommodityCode, ASDBComplete.Rating, ASDBComplete.Manufacturer FROM 4x4 LEFT JOIN ASDBComplete ON [4x4].[CommodityCode] = ASDBComplete.CommodityCode WHERE ((([4x4].NeedofBU)="high") AND ((ASDBComplete.Rating)="red"));
But this gives me all the Commodities with red ratings. Even if there is a supplier with a green or yellow rating.
I would need somting like: if exists 'commodityCode.XY with 'manufacuturer rating = green OR yellow' do not display commodityCode.xy
We had come a long way in implementing reports using RDLC and now we are stuck with the requirement to display RTF text using RDLC.
Is there a way to display a RTF Text in RDLC in a purely managed code?
The links mentioned below provides a work around solution to this but a part of its implementation is in un-managed code. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=551939&SiteID=1
I have a report where I have to display State, Category Name and the text. Below is the sample report
State Category Name Text
TX Unanticipated High NT due to RADD clean up- drive replacement.
NJ Unanticipated SAR efforts (SEM configuration)
But now my question is if there is no comment in any other state I would like to show no comment in the text line. Is there any formula I can use in the report level that will take care of the issue. I know in Business object there is a formula you can create which is =If (IsNull([Text]);"No Comments Reported";[Text]). I need to know in ssrs there is something.
please let me know ASAP and the steps of doing that.
The stored procedure takes ~ 10 seconds every call. The execution plan is Index seek or clustered index scan almost everywhere . No table spools or lazy loads or key lookups. Cannot share the code or execution plan due to company rules and regulations.Issue is that i am dealing with result set of around 50,000 records . Out of these i have to return 20 records at a single time (which is also customizable i.e 40 / 60/ 150 records in a page). Application cannot handle all 50k records so i have to return 20 records for every stored procedure call.
The result set changes as per the start date and end date which i recieve as parameters. In application there are few Column filters namely- Country(around 50 countries), Outcome(around 6 to 10 values ) . These filters will values in drop down( as excel ) depending on the distinct values in that columns. These filters will be populated on every page, if no filter value is selected.Issue is if user does sorting or filtering any records , this stored procedure is called and every time i have to deal with ~50000 records.
Current Code : Step 1 ) Get the required result set in temp table . Step 2) Compute the results on some business rules . (Outcome and SharesAvailable calculation - see attachment) Step 3) populate filter Columns (Country,Outcome) these values will be comma seperated. Step 4) Dynamic query to get required result set i.e if user wants only 10 records in single page then TOP 10 . Sorting can be applied on any column mentioned in screenshot.
Ok so I got my insert statement to work properly from multiple text boxes and a button control. What I'm looking to do is once the customer hits the button and it creates the new row in the table I want to then display the recently created record. Currently when I hit submit it creates the record, but the screen then goes back to default. I can then go to another page that I created to browse the records and it sees that the record was created properly. I would like for the insert to complete and then for the recently created record to be displayed either with a pop up, on the same page, or on a different page that needs to be created. I've tried tons of different options, but haven't been able to figure it out. So what I'll do is show you the working code and if you could give me a little help on what code I need to add to accomplish the task. Thanks. <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <b /> <table style="width:100%;"> <tr> <td class="style9"> Enter Bug Title:</td> <td> <asp:textbox id="bug_title" runat="server" Width="420px" EnableViewState="False"/> </td> </tr> <tr> <td class="style9"> Bug Tester:</td> <td> <asp:TextBox ID="tester" runat="server" width="420px" EnableViewState="False"/></td> </tr> <tr> <td class="style12"> Description:</td> <td class="style13"> <asp:TextBox ID="description" runat="server" Width="420px" Height="473px" EnableViewState="False" MaxLength="200" TextMode="MultiLine"></asp:TextBox> </td> </tr> <tr> <td class="style9"> Severity:</td> <td> <asp:DropDownList ID="severity" runat="server" EnableViewState="False"> <asp:ListItem>Low</asp:ListItem> <asp:ListItem>Medium</asp:ListItem> <asp:ListItem>High</asp:ListItem> </asp:DropDownList> </td> </tr> <tr> <td class="style9"> Project Group:</td> <td> <asp:DropDownList ID="project_group" runat="server" DataSourceID="ObjectDataSource1" DataTextField="GroupName" DataValueField="GroupName" EnableViewState="False"> </asp:DropDownList> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="DataSet1TableAdapters.bug_groupsTableAdapter"> </asp:ObjectDataSource> </td> </tr> <tr> <td class="style9"> </td> <td> <asp:button ID="button1" runat="server" text="Submit" OnclientClick="button1_click" /> </td> </tr> </table> And here is the code behind: Imports System.DataImports System.Data.SqlClientPartial Class Default2 Inherits System.Web.UI.Page Dim objcon As ConnectionStringSettings = ConfigurationManager.ConnectionStrings("bug_trackerConnectionString") Dim str As String = objcon.ConnectionString Dim con As New SqlConnection(Str) Dim com As New SqlCommand("", con) Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click con.Open() com.Parameters.AddWithValue("@bug_title", bug_title.Text) com.Parameters.AddWithValue("@tester", tester.Text) com.Parameters.AddWithValue("@description", description.Text) com.Parameters.AddWithValue("@project_group", project_group.Text) com.Parameters.AddWithValue("@severity", severity.Text) com.CommandText = "INSERT INTO bug_tracker (bug_title, tester, description, severity, project_group) VALUES (@bug_title, @tester, @description, @severity, @project_group)" com.ExecuteNonQuery() con.Close() End Sub
hi everyone. i want to build a page that all datas,images will store in sql server. i want to display images,text from database in a page with a template (images left of the page,text near the image and like....,programatically) there will be very much data . about 500-1000 pages data. is this possible with sql server? can SQL server store big datas? if it is possible can you give me an idea.
In SQL SErver 2008, I have a text column. I need to display either 2nd word in the text column or 1st word in the text column based on certain conditions.
How shall i display either 2nd word or 1st word from a text field.
I have reports in text files, with the formatting and alignments all intact, and need not to be changed anymore. But then, if I were to display these reports using IE, the best choice I have would be using SSRS. But then, is there such a feature in SSRS where I can do that? Just to display these reports as they are?
I've created a Stored Procedure which performs a Select against my table, and displays the rows returned via these stmts - @RowCount int Output SELECT @rowcount = @@RowCount This Works fine when Executed from SQL Server, but when trying to invoke the SP from my ASP page it complains that the SP expects parameter '@RowCount' which was not supplied. I don't need to supply it when invoking the SP directly, why do I need to supply it from ASP? I tried defining it as NULL within my SP, but can't seem to get it to accept both the NULL & Output parms. And while I'm at it, how do I get my ASP page to display this @RowCount value?
SSMS 2012: when you open up many sql files in the IDE, it starts hiding some tabs and you have to click on the drop down at the right to navigate to the tab you want. Is there a way to make it display more than one row of tabs, so that tabs are not hidden and always displayed?
I have a report that is built using the report builder and the report model that was created. With the fields that are displayed in the report, it could be possible for the database to have multiple rows with the same values for all the fields (that are displayed in the report). The PK will be different, but this is not displayed in the report as the PK won't make sense in the report. So what happens is that the report displays just 1 record even though the database has multiple records because all the fields (that are displayed in the report) are identical. Is there a way to make the report display all the rows irrespective of duplicates?
I have a report that displays many duplicate rows where all fields in several rows are exact duplicates. I would like to know how to make it so that the entire row does not show up if it is an exact duplicate of another row. Any ideas? Thanks.
SELECT NON EMPTY { [Measures].[SUM_COUNT] } ON COLUMNS, TopCount ( Filter ( {[DIM].[NAME].[NAME]}, [Measures].[SUM_COUNT] <> 0 ) , 10, [Measures].[SUM_COUNT] ) ON ROWS FROM [USAGE]
where <criteria>
I want to show the topmost 10 records. For some criteria I get the results in the chart.
But for some criteria or say for wrong criteria, there are no records. In such a case the X-axis contains all values for {[DIM].[NAME].[NAME] and value for the Y-axis is all 0. Its kind of blank report it will restrict to 10 records.
In such a scenario I want to show a message to the user saying "No records found", which I have set in the No Rows property of the chart.
If I remove the TopCount clause then I get the above message, which is obvious.
So how do I acheive the same message but at the same time limiting the records to 10?
How can I acheive this in my scenario? Can something be done at the query end?
I have a dataset that when run returns 270 rows. The table using the dataset in the report only prints the first row. I have the table grouped by a status type, but this is for when I can get multi-select paramenters installed and working. For now I just need the report to print all the returned rows. Help!!
Which suggests that if only one of the two multivalue parameter id is selected display the same (Parameters!ServiceAttribute.Value(0)).
This works fine when i select both the attributes but throws an exception "Index was outside the bounds of the array" when i select only one of the parameters. Can anyone help me with that?
Also i want this report parameter to allow null i.e. if a user does not select anything he should still be able to view the report. In case of regular dropdowns i have added a <Null> value to the existing values and set the default to null. But in case of multi-value, it does not give an option of adding <Null>
(Note when I say "rich" text I don't specifically mean rich text, I'm refering to text with user defined bold, italic, numbered lists, colors, fonts, etc.)
We have a (new) system where we want a user to enter "rich" text notes into a single column using an editor embedded in our application (much like the editor I'm using for this forum) and have the notes displayed correctly in SSRS reports. We were thinking of storing the notes as HTML but I've just tried it and the report displays the whole HTML string, rather than marking up the text.
We are open to marking up the text using any mechanism, rich text, HTML, Word, etc. just as long as we can see it in the reports.
We also need to consider viewing the same notes via Crystal reports.
(I moved this thread from datagrid area) I have a sql database that has individual records consisting of name, date, hours worked among other fields.Date and name is part of a unique identifier, so there can NOT be two records for the same person for the same date. My users need a grid view that displays days worked in ONE LINE per user. I have gotten close, but can't quite get the last part. Ive tried group by, distinct, and with rollup and no luck.TABLE:dan 12/13/2012 12:00:00 AM9.123dan 12/14/2012 12:00:00 AM3.123123cara 12/12/2012 12:00:00 AM4.222cara 12/16/2012 12:00:00 AM3.3333cara 12/17/2012 12:00:00 AM2 CODE: Select distinct(name), (select (y.hours) from dbo.testtime y where y.name=YT.name AND y.hours = YT.hours and datename(dw, date)='Sunday')as Sunday, (select (y.hours) from dbo.testtime y where y.name=YT.name AND y.hours = YT.hours and datename(dw, date)='Monday')as Monday, (select (y.hours) from dbo.testtime y where y.name=YT.name AND y.hours = YT.hours and datename(dw, date)='Tuesday')as Tuesday, (select (y.hours) from dbo.testtime y where y.name=YT.name AND y.hours = YT.hours and datename(dw, date)='Wednesday')as Wednesday, (select (y.hours) from dbo.testtime y where y.name=YT.name AND y.hours = YT.hours and datename(dw, date)='Thursday')as Thursday, (select (y.hours) from dbo.testtime y where y.name=YT.name AND y.hours = YT.hours and datename(dw, date)='Friday')as Friday, (select (y.hours) from dbo.testtime y where y.name=YT.name AND y.hours = YT.hours and datename(dw, date)='Saturday')as Saturday,(select sum(hours)from dbo.testtime y where y.name=YT.name AND y.hours = YT.hours) as Totalfrom dbo.testtime YTgroup by date, name, hours RESULTS: cara NULL NULL NULL 4.222 NULL NULL NULL 4.222cara NULL 2 NULL NULL NULL NULL NULL 2cara 3.3333 NULL NULL NULL NULL NULL NULL 3.3333dan NULL NULL NULL NULL NULL 3.123123 NULL 3.123123dan NULL NULL NULL NULL 9.123 NULL NULL 9.123 Like I said, I am SO close, I just need it to look like;NAME SUN MIN TU WED TH FR SA TOTAL cara 3.333 2 4.222 9.555 dan 9.125 3.125 12.5 TIAdan
SELECT PR.WBS1, PR.WBS2, ledgerar.invoice, SUM(CASE WHEN ledgerar.transtype = 'in' AND ledgerar.period = '200405' THEN ledgerar.amount * - 1 END) AS amount FROM PR LEFT OUTER JOIN LedgerAR ON LedgerAR.WBS1 = PR.WBS1 AND LedgerAR.WBS2 = PR.WBS2 AND LedgerAR.WBS3 = PR.WBS3 WHERE (LedgerAR.wbs1 = '001-333') AND ledgerar.period = '200405' GROUP BY pr.wbs1, pr.wbs2, ledgerar.invoice
But I don't know how to get the query to display all of wbs2 whether it is null or not. So, for each invoice number there should be five records according to the wbs2 codes (500, 100, 140, 150, 160)
I am interested in changing the way that data is displayed in my result set.Essentially I want to display a selection of rows (1 to n) as columns, the following diagram explains my intentions.Perhaps one of the greatest challenges here is the fact that I do not have a concrete number of rows (or BIN numbers). Each stock item could be stored in one or more BINS, which I will not know until running my query.
There is a valuable script out there that will take the rows from a table and display INSERT STATEMENTS.
Good thing is this script converts the data to HEXADECIMAL ( or some other ) and we don't have to worry about dealing with apostrophies embedded in varchar fields.
The following is a simplified version of my SQL statement. I am attempting to do a simple count(*) with two groupings and a where clause. This is Select command for a GridView. However, I am unable to display zeros. The rows are completely missing and I would greatly appreciate someone's help. I have already tried Group By All, but that, unfortunately, does not work. Here is my SQL statement:
"SELECT [GENDER], [RACE], COUNT(*) FROM [TABLE] WHERE ([COLUMNNAME] ='SOMETHING') GROUP BY [GENDER], [RACE]"
I have a report that retrieves its data from Analysis Services. The data includes a count and dollar value of projects against their current status: It looks something similar to
(group1) status1 10 $200,000
(detail) p1 1 $5,000
p2 1 $10,000
.
.
p10 1 $20,000
(group1) status3 5 $90,000
(detail) .
.
(group1) status4 15 $150,000
(detail) .
.
In the report I hide the detail rows. I have a fixed/known number of statuses (in this case 4) and need to show all 4 in the report. eg
(group1) status1 10 $200,000
(detail) p1 1 $5,000
p2 1 $10,000
.
.
p10 1 $20,000
(group1)status2 0 $0
(group1) status3 5 $90,000
(detail) .
.
(group1) status4 15 $150,000
(detail) .
.
ie in this case I need to show status 2 (that doesn't exist in the data set) with zero totals.
Does anyone know if this is possible to get SSRS to display each of the status groups (in a known fixed list) and then match them to the records in the dataset.
As an alternative, if I were using SQL Server I could add rows to the dataset using a union statement. Is there similar functionality using mdx? My mdx skills are very basic.
My stored procedure give me top 3 activities. My SSRS report design, I am able to display first activity when I select the Activity field from the Stored procedure, how to display 3 activities for each category.. Also I need a solution to sort the categories based on the requirement below.
I have the following problem. My SQL Query that i wrote works but the result that is displayed in Query analyzer cuts most of my long text that I want in my result. The long text string is approx about 400 characters and the type is varchar of the field. Any ideas??
SELECT '510', PRODCLASSID , '1', COMPONENTID,'ENG'+SPACE(2),'#'+SPACE(254),'#'+SPAC E(254),'#'+SPACE(254),'#'+SPACE(99),externalid, 'Desc1' = CASE WHEN SUBSTRING(externalid,1,2) = 'MF' THEN 'Full machine warranty : parts, labour, mileage and others covered at warranty rates applicable at the time of repair. ' WHEN SUBSTRING(externalid,1,2) = 'MP' THEN 'Full machine warranty, parts only : parts covered at warranty rates applicable at the time of repair. ' WHEN SUBSTRING(externalid,1,2) = 'PF' THEN 'Power line warranty : parts, labour, mileage and others covered at warranty rates applicable at the time of repair. ' WHEN SUBSTRING(externalid,1,2) = 'PP' THEN 'Power line warranty, parts only : parts are covered at warranty rates applicable at the time of repair. ' END + CASE WHEN SUBSTRING(externalid,LEN(externalid)- 3,4) = '2018' THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 18 month or 2000 HRS, whichever comes first. ' WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '3024' THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 24 month or 3000 HRS, whichever comes first. ' WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '4030' THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 30 month or 4000 HRS, whichever comes first. ' WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '5036' THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 36 month or 5000 HRS, whichever comes first. ' WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '6042' THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 42 month or 6000 HRS, whichever comes first. ' WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '8054' THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 54 month or 8000 HRS, whichever comes first. ' WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '1074' THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 74 month or 10000 HRS, whichever comes first. ' END + 'Flexible warranty is handled according to the procedures described in ESPPM 3-10.' + CASE
WHEN prodclassid IN ('P1','P11','P8','P9') THEN ' (mileage limited to 300 km)' WHEN prodclassid IN ('P7') THEN ' (mileage limited to 200 km)' ELSE NULL END + SPACE(5000 - LEN('Desc1')) .......
How do I display numeric data as text string?? I need the report to spell out the number. 1 would read as One, 2 as Two ect. For example writing the amount on a check. Need to do in SSRS.