Friday, March 23, 2012
Formatting Rows on one line?
report to look like this:
Consulting Staffing
Active Pipeline $ 100,000 $ 150,000
Lifetime Value $ 200,000
Instead because Staffing is coming from a difference data source I am
getting a line break after staffing.
Consulting Staffing
$ 150,000
Active Pipeline $ 100,000
Lifetime Value $ 200,000
Is there any way I can make this work?Do you have to use individual data sources? Trying to "unite" your
data sources into a single table within RS, which is what you have
above, can be tricky. However, if you open your report in Design mode
and select "Expressions" for the field for Staffing, you can select
fields from other datasets.
Personally, I do as much manipulation of data within the data backend
(SQL 2005 for me) so that I can get a result-set from a view (or if
the report calls for a ton of grouping and/or calculations, I set up a
stored procedure) that closely approximates how my Report will appear.
HTH!
On Apr 7, 2:51 pm, BLAW <brad...@.gmail.com> wrote:
> I am working on a report with 4 seperate data sources. I want my
> report to look like this:
> Consulting Staffing
> Active Pipeline $ 100,000 $ 150,000
> Lifetime Value $ 200,000
> Instead because Staffing is coming from a difference data source I am
> getting a line break after staffing.
> Consulting Staffing
> $ 150,000
> Active Pipeline $ 100,000
> Lifetime Value $ 200,000
> Is there any way I can make this work?
Monday, March 12, 2012
Formatting @executiontime
of an
email. I'm setting up a subscription and would like the subject line of the
email to format the date in MMM yyyy format.
ThanksGenerally the full format including the time, is required to be displayed in
a report generation, I dont formating can be done, since these 2 variables
are created by RS (reportname,executiontime) on the subject line. Other
method is to use your custom subscription methods, but just for formating,
sure you wont go for that unless it is very very critical.
Amarnath, MCTS
"Kerry" wrote:
> Hi, is it possible to format the @.executiontime variable in the subject line
> of an
> email. I'm setting up a subscription and would like the subject line of the
> email to format the date in MMM yyyy format.
> Thanks
Formatted procs
Can somebody provide me an argument on how nicely formatted and indented procs perform better. I am currently formatting a 1000 line proc just to understand what it does ... Maybe your argument will help convince my development team to write neat procs :)
As far as my knowledge goes, indentation and formatting of the proc has nothing got to do with the performance. Its just that, u improve the readability of the code, and believe me it is very much required. I had stumbled upon a stored proc which was not working properly, it was about 1500 lines and the code was so badly written without any comments, that it took hours first to format it, then to understand the whole thing. Properly formatted code performs better in the long run, meaning after six months of coding if u have to debug the proc, it wouldn't be a mess.|||Can somebody supply me with an argument as to why my kids should help keep the house clean? They claim that it provides just as much shelter with crap strewn all over the place, because it is the roof that counts. I say that when the place is cluttered it makes it harder to find things they have lost and it is more likely that things will get accidentally broken, but they aren't buying this. So I am currently cleaning up a 1000 sqr foot floor in order to make the area a more practical and inviting place to live.
I think I will just tell my development team (oops, I mean kids) that if they don't keep the place clean they will not get their allowance.|||Make the sentence for writing undocumented, poorly formatted code be a stint doing nothing but maintenance? At least in the shops that I've worked in, that would make them consider suicide as a viable alternative!
-PatP|||Oh, I like that one!|||Buy a big bat....
I gotta find that thread where we had a war about this...
don't forget change conmtrol in the comments up front...
does anyone comment out old code and leave it if it's being altered?|||I don't even want to start this one...Naming conventions, coding standards, change control, release management, and the most dreaded one, - documentation...|||I've got a little Perl script that shrouds T-SQL. It removes all the extraneous whitespace and renames the variables, cursors, and temp tables @.v1, @.v2, @.v3... The thing is a work of pure evil, but you could always ask them to debug a 1500 line stored procedure that you'd passed through the shrouder.
-PatP|||Ha ha .. i would love to have that script ;)
formatted invoice line item report
groups. We what the table to fill the page no matter how many line items are
on the invoice. For example the invoice my only have three items on the last
page so the group footer ends up in the middle of the page. The group footer
has the invoice total. How can we place group footer at the bottom of the
last page? Even in the case of a small invoice that only has one page ?I'm going to take a stab at this but I hope someone comes up with a better
way. I could use it myself. Anyway here goes:
Insert a row in your above your totals in the group footer.
Figure out the number of line items that fit on a page.
Make the row height of the just inserted row an expression equal to
(MaxLineItemsPerPage - (LineItemCount MOD MaxLineItemsPerPage)) *
LineItemRowHeight)
This will give you the number of "blank" lines on the last page of the
invoice and make your empty footer row that height to fill in the space. The
expression will get a little more complicated if pages 2 on have more rows
than page 1 (i.e. no invoice header) but I think the calculation can be done.
Let me know if this works...Or if someone comes up with a better way!
"DJJIII" wrote:
> I am trying to make a report that show invoice line items using a table with
> groups. We what the table to fill the page no matter how many line items are
> on the invoice. For example the invoice my only have three items on the last
> page so the group footer ends up in the middle of the page. The group footer
> has the invoice total. How can we place group footer at the bottom of the
> last page? Even in the case of a small invoice that only has one page ?
formating values in chart
hello to every bodu. well i am truing to create a line chart in sql server reporting services and when in the data field i put the division of 2 values. i want to have a % represerntation
does anybody knows how i can achieve that?
than u in advance
Moving to Reporting Services forum.|||Steps:
* open the chart properties dialog by right-clicking on the chart
* go to the Y-axis tab
* set the Format code property to e.g. P1 (which results in percentage value formatting with precision of 1)
-- Robert
Friday, February 24, 2012
fORMAT eXCEPTION
I am continuously getting the error:
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Line 57: {
Line 58: Connection.Open() ;
Line 59: ThreadResult = ThreadCommand.ExecuteNonQuery() ;
Line 60: }
Line 61:
in the following part of the code :
protected void PostClick(object sender,EventArgs e)
{
SqlConnection Connection ;
SqlCommand ThreadCommand ;
SqlCommand GetThreadCommand ;
SqlCommand MessageCommand ;
SqlDataReader ThreadReader ;
string InsertThread,InsertMessage ;
string GetThread,Message ;
long ThreadID ;
int ThreadResult ;Connection = new SqlConnection("server=HT; Integrated Security= SSPI; Database=Forums");
Feedback.Text = "" ;InsertThread = "Insert Into Threads(ThreadName,TopicId) VALUES(@.ThreadName,@.TopicId)" ;
ThreadCommand = new SqlCommand(InsertThread, Connection) ;ThreadCommand.Parameters.Add(new SqlParameter("@.ThreadName", SqlDbType.VarChar,50)) ;
ThreadCommand.Parameters.Add(new SqlParameter("@.TopicId", System.Data.SqlDbType.Int));ThreadCommand.Parameters["@.ThreadName"].Value = ThreadText.Text ;
ThreadCommand.Parameters["@.TopicId"].Value = Request.QueryString["TopicId"] ;try
{
Connection.Open() ;
ThreadResult = ThreadCommand.ExecuteNonQuery() ;
}catch (System.Data.SqlClient.SqlException excp)
{
if (excp.Errors[0].Number == -105121349)
{
Feedback.Text = "<font color=red>*** There is already a thread with the name"+ThreadText.Text+". Please choose a different name and click Post.</font><br><br>" ;
}
else
{
Feedback.Text = "<font color=red>*** "+excp.Errors[0].Message +"<br><br>" ;
}
}
I would be very grateful for any suggestions.I expect the problem is here:
ThreadCommand.Parameters["@.TopicId"].Value = Request.QueryString["TopicId"] ;
Perhaps Request.QueryString["TopicId"] is null, or not a value that can be converted into a number? Debug the application and check this value, or alternately, do a Response.Write("TopicID: " + Request.QueryString["TopicId"] );|||Hi
Yes Mr.Douglas you are right. but the problem lies in this statement only in this page. Actually i think its in the following line in the other page :
<a href="http://links.10026.com/?link=threads.aspx?TopicId=<%=Request.QueryString["TopicId"]%>&TopicName= <%=Request.QueryString["TopicName"]%>"
Actually on printing TopicId, i noticed its '1' (with comma) instead of being just 1 due to the courtesy of above line. Can you please tell me how can i remove the comma thats being appended. Thanks a lot|||I presume when you say comma, you really mean the single quotes ' and ' and if so, change to this:
=<%=String.Trim(Request.QueryString["TopicId"],"'".ToCharArray()%
The best bet would be to determine why, on the previous page, it is putting the single quotes in.|||Yes you are right , i can use the trim method but Mr. Douglas why is the following statement attaching a comma.
<%=Request.QueryString["TopicId"]%
in
<a href="http://links.10026.com/?link=threads.aspx?TopicId=
<%=Request.QueryString["TopicId"]%>
&TopicName=<%=Request.QueryString["TopicName"]%>"
Thanks a lot and Mr. Douglas i would like you advise on a designing tool . Which one do u use since yesterday i was trying to do things with Html Table but thats a HeadAche and i can't even arrange the data the way i like.|||I have no idea what the value of Request.QueryString["TopicID"] is, but my guess is that somehow, it has the apostrophes.
I tend to use a mix of tables and Cascading Style sheets, but honestly, my page design skills are less than perfect.
Sunday, February 19, 2012
Format chart output
have everything working the way I like it except for the times when ther are
not 15 errors then the bargraph automatically resizes. Then it looks
terrible. Especially when there is one one item returned - then you get 1
HUGE bar that goes acress the graph.
My question is - is there a way that I can always have 15 place holders for
the bargraph? so that no matter how many values I get returned the bargraphs
will always be the same size? (except for the number of bars that are
showing).
I tried setting the min and max in the x-axis and y-axis to 0 and 15 - but
if there are less than 15 it still resizes the bars.
Thanks in advance.Hi Mike,
is that your issue solved? i also facing this same issue, when there is one
data, it becomes a HUGE columns. Or let say the chart size is best to view
for 15 placeholders but the data is >15 placeholders, all the columns will
squeeze together.
i set the category axis min/max value, also no help on this issue.
any one can help? thanks.
"Mike" wrote:
> I need to display a bargraph with the top 15 errors for a production line. I
> have everything working the way I like it except for the times when ther are
> not 15 errors then the bargraph automatically resizes. Then it looks
> terrible. Especially when there is one one item returned - then you get 1
> HUGE bar that goes acress the graph.
> My question is - is there a way that I can always have 15 place holders for
> the bargraph? so that no matter how many values I get returned the bargraphs
> will always be the same size? (except for the number of bars that are
> showing).
> I tried setting the min and max in the x-axis and y-axis to 0 and 15 - but
> if there are less than 15 it still resizes the bars.
> Thanks in advance.
Format an address
address field at the top of a letter like this:
Name
Address 1
Address 2
CityStateZip
I want to put them all in one textbox but sometimes Address 2 is NULL and I
would like to supress the one line. The code looks like this:
=Fields!FullName.Value & vbcrlf & Fields!Line1.Value & vbcrlf &
Fields!Line2.Value & vbcrlf & Fields!CityStateZip.Value
Does anybody know how to supress the NULL line? Is there a better way to do
this?
--
ZipHow about something like
=iif(Fields!Line2.Value is Nothing,
Fields!FullName.Value & vbcrlf & Fields!Line1.Value & vbcrlf &
Fields!CityStateZip.Value,
Fields!FullName.Value & vbcrlf & Fields!Line1.Value & vbcrlf &
Fields!Line2.Value & vbcrlf & Fields!CityStateZip.Value )
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Zip" <Zip@.discussions.microsoft.com> wrote in message
news:AA45AB20-23F9-4449-94D9-863B963FABB4@.microsoft.com...
>I need a little help in formatting the address field. We use a 3 or 4 line
> address field at the top of a letter like this:
> Name
> Address 1
> Address 2
> CityStateZip
> I want to put them all in one textbox but sometimes Address 2 is NULL and
> I
> would like to supress the one line. The code looks like this:
> =Fields!FullName.Value & vbcrlf & Fields!Line1.Value & vbcrlf &
> Fields!Line2.Value & vbcrlf & Fields!CityStateZip.Value
> Does anybody know how to supress the NULL line? Is there a better way to
> do
> this?
> --
> Zip|||We use a lot of these too. I package the second Address field in an 'Iif'
statement like so, where if the Address2 field is NULL an empty string is
simply appended onto Address1, otherwise there is a line break and then the
Address2 Field:
Fields!Address1.Value &
Iif((IsNothing(Fields!Address2.Value, "", vbcrlf & Fields!Address2.Value)
& vbcrlf & Fields!CityStateZip.Value
There may be cleverer ways to do it but that works for me.
Hope that helps.
rgorslin
"Zip" wrote:
> I need a little help in formatting the address field. We use a 3 or 4 line
> address field at the top of a letter like this:
> Name
> Address 1
> Address 2
> CityStateZip
> I want to put them all in one textbox but sometimes Address 2 is NULL and I
> would like to supress the one line. The code looks like this:
> =Fields!FullName.Value & vbcrlf & Fields!Line1.Value & vbcrlf &
> Fields!Line2.Value & vbcrlf & Fields!CityStateZip.Value
> Does anybody know how to supress the NULL line? Is there a better way to do
> this?
> --
> Zip
format a date in a chart
show as this ugly formated date, something like 12/15/2005 11:37:00 AM. Is
there any way to format the X-label so that it will only show the 12/15/2005?
Thanks.In Studio: Chart Properties>X Axis>Format code: d
or in XML:
<CategoryAxis>
<Axis>
<Style>
<Format>d</Format>
"Leon Chuck Gosslin" <Leon Chuck Gosslin@.discussions.microsoft.com> wrote in
message news:B18F0C63-6C8C-42C3-932B-A3FDEDBEB23E@.microsoft.com...
>I have a line graph that has a date label for the X-axis. The date labels
> show as this ugly formated date, something like 12/15/2005 11:37:00 AM.
> Is
> there any way to format the X-label so that it will only show the
> 12/15/2005?
> Thanks.
>