Thursday, March 29, 2012
Data style?
generated from the SQL query. So, how can I go about
doing it? Example : display 59766 as 59,766 and also
datetime as date.
Please help...thanks a lot!
On Tue, 1 Feb 2005 20:39:35 -0800, Wendy W wrote:
>Hi, I would like to change the data output style
>generated from the SQL query. So, how can I go about
>doing it? Example : display 59766 as 59,766 and also
>datetime as date.
>Please help...thanks a lot!
>
Hi Wendy,
The formatting of the output of a query is entirely up to the client. If
you access the same data using Query Analyser, Enterprise Manager, Access
and some other tools, you'll already see a variety in formats used, as
each of these tools has it's own defaults.
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||
>Hi Wendy,
>The formatting of the output of a query is entirely up
to the client. If
>you access the same data using Query Analyser,
Enterprise Manager, Access
>and some other tools, you'll already see a variety in
formats used, as
>each of these tools has it's own defaults.
>Best, Hugo
>--
Thanks, Hugo but my situation is slightly different here.
I'm supposed to display records in a data grip (ASP.NET)
using the SQL statement. I can't format the data grid
column to my desired format, the grid is dynamic.
Therefore I need to format the fields in SQL statement.
How can this be solved?
|||Wendy,
You will have to provide the data as character-based data,
preformatted as needed. You could try various solutions such
as these, shown with an integer variable @.int and the getdate() function
instead of an entire table::
declare @.int integer
set @.int = 32476
select parsename(convert(varchar(20),cast(@.int as money), 1),2)
select convert(char(10),getdate(),101)
select convert(char(10),getdate(),121)
Steve Kass
Drew University
Wendy W wrote:
>to the client. If
>
>Enterprise Manager, Access
>
>formats used, as
>
>
>Thanks, Hugo but my situation is slightly different here.
>I'm supposed to display records in a data grip (ASP.NET)
>using the SQL statement. I can't format the data grid
>column to my desired format, the grid is dynamic.
>Therefore I need to format the fields in SQL statement.
>How can this be solved?
>
sql
Sunday, March 25, 2012
Data Set returns but Report doesn't display
report I'm getting an error: An error has occured during report processing.
Invalid attempt to read when no data is present. I made a minor change
(added a parameter) to the stored procedure that wouldn't impact the data set
being returned and the data set returns. The report parameter is set up
correctly in the report but is not displayed anywhere on the report. The
build succeeded. Does this error mean I need to drag & drop my fields back
onto the report layout again?I was able to fix this issue. Re-ran the stored procedure and then re-added
all of the fields. For some reason it didn't want to work when I tried it
before.
"patty" wrote:
> I'm returning a data set from a stored procedure. When I go to preview the
> report I'm getting an error: An error has occured during report processing.
> Invalid attempt to read when no data is present. I made a minor change
> (added a parameter) to the stored procedure that wouldn't impact the data set
> being returned and the data set returns. The report parameter is set up
> correctly in the report but is not displayed anywhere on the report. The
> build succeeded. Does this error mean I need to drag & drop my fields back
> onto the report layout again?
Tuesday, March 20, 2012
Data question..
How can I add a data from a textbox into a ms sql database?
Because everywhere I read, it tells me how to display data, but not how to insert data...
How are you connection to your database...ADO, ODBC...whatever the case...if you write queries to select and diplay data...then you can also write queries to insert data...just make sure your database table allows insert...
if you are using some control and not codebehind, then they have Insert option...
Please be more specific of what you want to use and you will get more help...
thanks,
bullpit
|||Im using ado...
For example lets say I create a table in mssql that allows insertion.
How can send the data from my textbox to the table.
I dont want to use a control...
From a textbox into the database...
Thank you
|||This may help you get started, hope it helps -- jpstring valueToInsert = yourTextBox.Text;string insertStr ="insert into yourTable (fieldTo) values (" + valueToInsert +")";SqlConnection conn =new SqlConnection(yourConnectionString);SqlCommand cmd =new SqlCommand(conn, insertStr);using(conn){using(cmd) { conn.Open(); cmd.ExecuteNonQuery(); }}
Sunday, March 11, 2012
Data not showing in ReportViewer but will display when exported
Hi again,
I'm having a funky problem with the ReportViewer control. When I load the report page, the ReportViewer will come up with my blank rdlc file with no data being displayed. However, when I choose to export the data, it will show in the excel or pdf. It was working fine on a test server, and all of a sudden this happened.
I am having the same issue. It was working fine using Atlas. I switched my project to Ajax, and now it's broke. My ReportViewer is inside an UpdatePanel. I removed the updatepanel tags, and I now get an Error "Execution '' cannot be found".
Data not display in dropdown lists
the 1st list, the 2nd list gets populated accordingly. For some
records in list 1 you get only a single record in the 2nd drop down.
In these cases, you don't see the item in the drop downlist, but I
tried checking in the source of the page n could see the particular
item. Any idea why this is happening?On Mar 1, 10:01 am, cham...@.gmail.com wrote:
> I have 2 drop down lists in my report. When you select an item from
> the 1st list, the 2nd list gets populated accordingly. For some
> records in list 1 you get only a single record in the 2nd drop down.
> In these cases, you don't see the item in the drop downlist, but I
> tried checking in the source of the page n could see the particular
> item. Any idea why this is happening?
It sounds kind of like you are returning a null value in the 2nd drop-
down list (and possibly the correct one after that). Have you checked
the dataset to determine what the possibilities are for the second
drop-down list given the first one's values?
Enrique Martinez
Sr. SQL Server Developer
Friday, February 24, 2012
Data Layout in Matrix
Record1 Record2 Record3
Model Model Model
Descript Descript Descript
Price Price Price
Unable to get the dynamic columns expanding to the right, or set the # of columns.
Below is the conversation so far...
Any help would be greatly appreciated!
---
Thank you for the response Chris. I've been out and unable to test this until today. I set it up as you suggested - I have a matrix with two three static rows and a column group on =RowNumber(Nothing).
I get the following error message:
"A group expression for the grouping â'matrix1_ColumnGroup1â' uses the RowNumber function with a scope parameter that is not valid. When used in a group expression, the value of the scope parameter of RowNumber must equal the name of the group directly containing the current group."
Using the List group name as the RowNumber parameter throws more errors.
What am I missing?
Michael
"Chris Hays [MSFT]" wrote:
> You'll need to use a matrix to get a horizontially growing layout.
> It should have one dynamic column grouping (group on =RowNumber(Nothing))
> and three static rows (right-click in the data area and select "Add Row"
> twice).
> To limit this to three columns per matrix, put the matrix in a list and
> group on something like this: =Ceiling(RowNumber(Nothing)/3)
>
> --
> This post is provided 'AS IS' with no warranties, and confers no rights. All
> rights reserved. Some assembly required. Batteries not included. Your
> mileage may vary. Objects in mirror may be closer than they appear. No user
> serviceable parts inside. Opening cover voids warranty. Keep out of reach of
> children under 3.
> "OTB6" <OTB6@.discussions.microsoft.com> wrote in message
> news:7EC2C1E0-98C2-4069-B951-D40123C37ABF@.microsoft.com...
> > Trying to find a way to display returned records in (n) rows of 3 columns
> or less like this:
> >
> > Record 1 Record 2 Record 3
> > col 1 col 1 col 1
> > col 2 col 2 col 2
> > col 3 col 3 col 3
> >
> > Record 4 Record 5
> > col 1 col 1
> > col 2 col 2
> > col 3 col 3
> >
> > Can someone point me in the right direction as far as the tools
> (table/matrix/list)?
> >
> > Thanks!
> >
> > Michael<-- okay really feeling like an idiot now, but...
where/how is this attachment retrieved? if sent to the email listed in my profile, I'm not receiving it. I'd REALLY like to see your solution.
m
"Chris Hays [MSFT]" wrote:
> Using the list group name should have worked.
> I'm attaching a working example so you can compare to what you've done to
> find where they differ.
>|||You really should use a real newsreader (like Outlook Express) so you can
receive and post attachments.
(Most web-based newsreaders fail to implement support for attachments.)
I'll be posting this example to my weblog later today so you'll be able to
get it there if you can't use a real newsreader for some reason:
http://blogs.msdn.com/chrishays
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"OTB6" <OTB6@.discussions.microsoft.com> wrote in message
news:8994534E-8F27-4102-832A-071AEC7D1978@.microsoft.com...
> <-- okay really feeling like an idiot now, but...
> where/how is this attachment retrieved? if sent to the email listed in my
profile, I'm not receiving it. I'd REALLY like to see your solution.
> m
> "Chris Hays [MSFT]" wrote:
> > Using the list group name should have worked.
> > I'm attaching a working example so you can compare to what you've done
to
> > find where they differ.
> >
>
Tuesday, February 14, 2012
Data formatting problem
Hello,
I'm looking for solutions to a formatting problem.
I have two stand alone textboxes on a report body that I would like to have display side by side with very little white space between them.
Example: TextBox 1 contents (variable length) = "Muddy Waters"
Textbox 2 contents (variable length) = "B.Sc"
Current display:Muddy WatersB.Sc
Desired display:Muddy Waters B.Sc
Here is my problem.
Simple concatenation of values into 1 textbox would work if the font size and font family were the same for both textboxes; unfortunately this isn't the case. The font size and family for each textbox is different. Is there a richtext control I can place on the report and load with preformatted rich text?
Any suggestions would be appreciated.
Thanks,
Roy M
Hi,
Try making the first textbox right-aligned & the second textbox left-aligned. It might possibly solve your problem.
Just an idea
-Aayush
|||1.Put both of the textboxes adjacent to each other .
2.Apply Font size and style.
3.Use Padding left for the second text box.
Hope this will solve your problem.
|||Thanks, but this won't work as I need to keep things left aligned.|||Do they have to be separate textboxes? The easiest thing would be to replace the two with a single one, replacing the content with the values from both fields as follows:
Code Snippet
=Fields!Field1.Value & " " & Fields!Field2.ValueIf your textboxes are in a table, select them both and right click for the context menu and choose 'Merge Cells' and do the same.
Good luck,
Larry|||This won't work as the text formatting for both fields needs to be different.
Thanks anyway.
Data formatting problem
Hello,
I'm looking for solutions to a formatting problem.
I have two stand alone textboxes on a report body that I would like to have display side by side with very little white space between them.
Example: TextBox 1 contents (variable length) = "Muddy Waters"
Textbox 2 contents (variable length) = "B.Sc"
Current display:Muddy WatersB.Sc
Desired display:Muddy Waters B.Sc
Here is my problem.
Simple concatenation of values into 1 textbox would work if the font size and font family were the same for both textboxes; unfortunately this isn't the case. The font size and family for each textbox is different. Is there a richtext control I can place on the report and load with preformatted rich text?
Any suggestions would be appreciated.
Thanks,
Roy M
Hi,
Try making the first textbox right-aligned & the second textbox left-aligned. It might possibly solve your problem.
Just an idea
-Aayush
|||1.Put both of the textboxes adjacent to each other .
2.Apply Font size and style.
3.Use Padding left for the second text box.
Hope this will solve your problem.
|||Thanks, but this won't work as I need to keep things left aligned.|||Do they have to be separate textboxes? The easiest thing would be to replace the two with a single one, replacing the content with the values from both fields as follows:
Code Snippet
=Fields!Field1.Value & " " & Fields!Field2.ValueIf your textboxes are in a table, select them both and right click for the context menu and choose 'Merge Cells' and do the same.
Good luck,
Larry|||This won't work as the text formatting for both fields needs to be different.
Thanks anyway.
data format
select convert(numeric(9,2),round(columnname,2)) from tablename