Conditionally Formating Subtotal Output

May 22, 2007

I created a subtotal for my column group by right-clicking on the group and selecting subtotal. I would like to add the condition to the subtotal, that if the value is less than 0 to print zero and not the negative subtotal amount. Is there a way to do this? I haven't been able to find a way to add an expression to the greyed out subtotal field. Thanks.

View 1 Replies


ADVERTISEMENT

Conditionally Format Subtotal For Matrix Report

Apr 3, 2006

I have a matrix that will pull out the current quarters sales figures. I want to change the color of the subtotal font ONLY when we are in the current period. I have a boolean field in the matrix report that is true when it is the current month.

For example, at the end of last month it displays January, February and March figures. I want the sub total to display the totals for January and February in white, whilst the totals for March are Yellow.

Any ideas anyone?

View 7 Replies View Related

Formating Drill Down On SubTotal Column In Matrix

Oct 18, 2006

Hello Experts,

I have a Matrix in my report where on each each cell i have a drill down to another report. The Matrix also has SubTotal Column getting generated.

But the Problem is the drill down report gets carried on the SubTotal column also and the user gets vage results as proper information is not passed to another report.

Is there a way through which if its a subTotal cell then i can hide the drill down. some IIF() condition is there is



I appreciate if somebody can help me address this problem.



/Soni



View 1 Replies View Related

FORMATING THE SQL OUTPUT

May 17, 2001

Hi!

I have couple of questions. Anybody can help me.

1. How can I format the output in T-SQL coming like as one can do in SQL*PLUS (ORACLE)?

2. I decalerd a Cursor and using that It is generating the output. I jut want to dispaly only 100 rows, its mean that I want to control the output.

Please give your feedback

View 1 Replies View Related

Formating The Output Of Mails

Nov 16, 2001

Hello,

I'm using xp_sendmail in the sp and in @query I do select * from table1.
The result also page,s
The formate is not at all readable and even if @attach_results = 'TRUE'
In the text file its not formatted as it sends mail to my manager I want it to be formatted and looks good. Can anyone help me or Is there any way to get the results in readable format.

Thanks in Advance for the help

Rani

View 2 Replies View Related

Formating Of Columns In Output Of A SQL Statement In Query Analyzer

Jan 16, 2004

Hi guys

I want to format the result of a SQL Statement carried out in the query analyzer. Example:

suppose that you have this table:

col1 col2
------------------------- -----------------------
abcdefg bdbsjjdasjdh
bdfjsjdf hasdasjdasj
jhsdjhd asjdhashdas
hasjdhj ahsjdhajshdj

and I want this output:

col1 col2
---------- ----------------
abcdefg bdbsjjdasjdh
bdfjsjdf hasdasjdasj
jhsdjhd asjdhashdas
hasjdhj ahsjdhajshdj

View 7 Replies View Related

Show Child Subtotal In Parent's Subtotal Row

Apr 1, 2008



My report has two groups, company and error type for each company.
Company1

Functional Error
Data Error
Other Error
My goal is to show the subtotals for each error types when I show Company's subtotal/total; in the group 1 footer area.
Total for Functional Error:
Total for Data Error:
Total for Company1:

Please help me in figuring out how to do that.

Thank you in advance for your help.

View 3 Replies View Related

SQL UPDATE Conditionally

Jul 20, 2005

This is probably a stupid question, but here goes: I am trying toupdate a table differently based on what is in one of the columnswithin the table. For example, I want to set Fld1 to be "On" if Fld2is "A", and I want to set Fld1 to be "Off" if Fld2 is "B". This iseasy to do in two SQL statements, but I was wondering if there's someway to do it in a single SQL statement. Thus far, I have had no luckin figuring out how to do this. Any ideas would be appreciated!!

View 1 Replies View Related

Aggregating Conditionally

Mar 7, 2008

I need some help aggregating values in a single table, where neither a simple Sum() nor a simple First() function will do... Would like to do Sum(First()) but that's not allowed!

Sample dataset (select * from cs_view):

Gender | Program | Student | Class_Section | Heads | Credits
------ | ------- | ------- | ------------- | ----- | -------
Female | English | Elena | Phys 101-b | 1 | 4
Female | English | Elena | Hist 101-c | 1 | 4
Female | English | Elena | Engl 101-a | 1 | 4
Female | English | Elena | Engl 105-b | 1 | 4
Male | History | Rich | Phys 105-a | 1 | 4
Male | History | Rich | Engl 101-c | 1 | 4
Male | History | Rich | Hist 101-b | 1 | 4
Male | History | Jacob | Phys 101-a | 1 | 4
Male | History | Jacob | Hist 101-b | 1 | 4
Male | History | Jacob | Engl 101-c | 1 | 4
Male | History | Jacob | Phys L-101-a | 1 | 0

Dataset has one row per student enrollment in class section. No trouble summing credits by student or by program (or gender). HOWEVER, aggregate head-count should add each student only once.

Desired table:
Gender Program Heads Credits
------ ------- ----- -------
Female English 1 16
Male History 2 24 - --- 3 40If I add a third grouping level, that is, add a student-level grouping to the desired table, First(Fields!Heads.Value) will return the correct student-level head count; however, I don't know how to sum up the student-level group header rows ('subtotal' rows), to aggregate head count by gender or by program.


Thanks for taking the time...
tom

View 1 Replies View Related

Get Field Conditionally

Feb 27, 2007

Hi folks

I think this may be an increadibly simple one, but it's been driving me up the wall. I have a dataset that contains some summary information about a group of companies which i'd like to represent in a report. The dataset looks like this:

Company Lead_Type Count

Company1 Internal 2
Company2 Internal 3
Company3 Internal 5
Company2 External 10
Company1 External 7
Company3 External 3
etc...

I want to show this in a report as follows:

Internal External
Company1 2 7
Company2 3 10
Company3 5 3

I can't figure out how to select a specific field from the dataset (e.g. Company = Company1 and Lead_Type = Internal). This sort of thing must be done all the time, I'm sure I'm missing something fairly obvious. Any posts back gratefully received.

Thanks

Guy.

View 1 Replies View Related

Conditionally Parameterizing A SQLDataSource

Oct 31, 2006

I'm pararmeterizing a SQLDataSource, but I've encountered a problem.  The users want all records returned if no ID is provided.  So when they first hit the page, they will see all records, then they can filter down to one ID if needed.  However, if I add a selectparameter of ID, I have to default it to a value, which won't give the users all records. Suggestions?

View 1 Replies View Related

Conditionally Execute A Task

Sep 7, 2007


Hallo

Is there a way to conditionally execute a task?

I got a task €śMail Send€ś and I would like to execute it, just if the variable X (my message source) has a value.

I try in expressions €śDisable€? = len(@[Benutzer::Msg] ) > 5 ? false : true, but it does not work.

View 3 Replies View Related

Exit The Package Conditionally

Jan 4, 2007

I'm inside a "dataflow" and

i have a conditional spliter

 

one of the condition say "ok"

and the the other says "not ok"

 

when  my flow goes to the "not ok" condition

I want to Abort  the entire package execution

I want to make it sure that the package is terminated

and could not  triggers the next control in the control flow.

 

i want to kill/ abort the execution of all my SSIS processes

for the entire package within the current dataflow

 

 

View 3 Replies View Related

Conditionally Display Parameters

Oct 30, 2007

Is it possible with SSRS to conditionally display parameters.

Example, we have dimension concepts that we would like to use in reporting on an Either/Or basis

1. Choose Country

then choose either

2. Geography - Country>Region>Market>Submarket
3. Division - Country>Division>Submarket


The users would like a choice of reporting by Geography or Division

So, choosing Geography will then lead to cascading parameters of Region>Market

Choosing Division would lead to a Division paramter only

Is it possible to do this with SSRS?

View 3 Replies View Related

Conditionally Hidden Groups

Oct 9, 2006

Hi,

I have conditionially visible groups that are show/hide based on a report parameter. The problem is that I also want to have a document label on this group. When the group is hidden a blank entry appears in the doument map rather that no entry at all. Is this a bug or is there some work around. Thanks.

View 2 Replies View Related

DateTime Formating.

Oct 5, 2006

I am trying to query a calendar table that has the [start] datetime of an event and then a [title] of the event. I am trying to display them as;* 8:00 AM Get to work* Independance daysome of the events have a start time and some only have a date. the ones that do not have a start time have a start time of 12:00:00 How do I query the two fields and only show the start time & title of the events that have a start time and just the title for the ones that do not have a start time.. I've tried this...select Event = (CONVERT(CHAR(8),start,8) +' ' + title) from Calendar where CONVERT(CHAR(8),start,8) <> '12:00:00'It does display the start and event title but only for the ones that have a start time. And how do I get the 8:00 AM format for the time? Thanks for any help.Mark

View 3 Replies View Related

Formating Date

Aug 6, 2002

How do I get the following format using SQL server ( SQL QUERY ??)
yymmddhh.

In Oracle I can do simple...

Select to_char(datecolumn, 'YYMMDDHH') from tablename;

RESULT > 02080603
-- YEAR, MONTH, DATE, HOUR.

What is that I need to do to get the same result on sql server.?

tks

View 1 Replies View Related

Text Formating

Nov 9, 2006

i have this:
\FILInternalBuisnessArea*.*
\FILInternalBuisnessArea
\FILInternalBuisnessArea*.qvw
\FILInternalBuisnessArea empfileDB.mdb
\FILInternalPublic Area*.*
\FILInternalPublic Area
\FILInternalPublic Area*.xls
\FILInternalPublic Areaacro*.doc
\FILInternalPublic Areaeconomi*.xls
\FILInternalPublic AreaeconomiGroup01FileToSave*.xls
\FILInternalPublic AreaeconomiGroup01Unit01FileToSave*.xls

And i want to strip away whatever is after the last '' so the output should look like this
\FILInternalBuisnessArea
\FILInternalBuisnessArea
\FILInternalBuisnessArea
\FILInternalBuisnessArea
\FILInternalPublic Area
\FILInternalPublic Area
\FILInternalPublic Area
\FILInternalPublic Area
\FILInternalPublic Areaeconomi
\FILInternalPublic AreaeconomiGroup01
\FILInternalPublic AreaeconomiGroup01unit01

datatype = varchar (500)

thx alot in advance

//Mr

View 7 Replies View Related

Formating The Record

Apr 7, 2008

Hi all,
i am using sql server 2005.
let me explain the scenario.
I have to built a report where I have to find out no of call made by an executive to a perticular customer during a year

my table record look like

empid custid product date and other field
em111 iimran aaaa 01-04-2008 ........
em111 iimran bbbb 01-04-2008 ........
em111 iimran cccc 01-04-2008 ........
em111 xxxxxx aaaa 01-04-2008 ........
em111 xxxxxx 2222 01-04-2008 ........
em111 iimran aaaa 02-04-2008 ........
em111 iimran bbbb 02-04-2008 ........
em111 iimran cccc 02-04-2008 ........
em111 xxxxxx aaaa 02-04-2008 ........
em111 xxxxxx 2222 02-04-2008 ........

.
problem is it has to implement in this manner

Srno custname jan feb mar apr may june july aug sep oct nov dec
1 iimran 0 4 0 5 6 7 0 3 5 7 3 1

please suggest some idea.


Please Help

View 1 Replies View Related

Formating A String In Sql

May 5, 2008

Ok so here is an explanation of what i need. I have a table that has emails in it. I need to get those emails to show up as verticle line of names. these will then be sent out via email so i have the following line of code to put them into a string:

select @emails1 = isnull (@emails1 + '; ','' + char(13))+ char(13) + email from emaillist

I have tried putting Char(13) in multiple areas trying to get line break. but the email sends the list in a straight line.

can anyone help me. also if you need more info let me know i will give it to you.

example of desired output
xxxx@dgfasg.com
sfgasg@asgahi.com
saghna@asogh.com

View 20 Replies View Related

Formating Problem

Dec 18, 2007

hi all
can anybody tell me how to get double underline for the text box value in reporting services
am using sql server reporting services 2000

View 3 Replies View Related

Condtional Formating

Oct 26, 2007



Hi all,

This expression gives me an error anyone know why?


=IIF(Fields!M.Value = 0,"Average",(MonthName(Fields!M.Value)))

Thanks

View 4 Replies View Related

Drill Down Formating

May 22, 2006

Does anyone know what code I'd use in an expression to conditionally format based on if the drill down is expanded or collapsed?

Thanks.

in an
in-an
inane
Inna
Ian
Edit...
Revert to "inan"conditionally
conditional
conditionals
conditionality
Edit...
Revert to "conditionaly"

View 3 Replies View Related

Formating Datetime

Mar 14, 2008

I have a decimal time field that I would like to convert to "hh:mms"

If I try to use =cdate(Fields!Avg_Visit_Duration.Value) I get #Error in my result. The error message is:

Conversion from type 'Double' to type 'Date' is not valid.

0.0044612654 should be shown as 00:06:25. I can do this very easy in SSAS or Excel... SSRS is giving me fits.

edit: made question clearer. nlm

View 5 Replies View Related

Conditionally Grouping Different String Values Together

Jan 29, 2008

 I have a sql server table column that can contain the following possible values. 1. 766/IT 2. 777/HR3.  890/EG4.  012/AS5.  Trainee6.  Contractor 7.  Others I want to write an SQL query grouped by this column, Trainee should be one group, Contractor should be another different group, Others should be another different group and then  every thing else ( 766/IT ,777/HR ,890/EG, 012/AS) should be grouped together as one group. Think of it in terms of a pie chart with those groups. 

View 4 Replies View Related

Stored Procedure Conditionally Using @@Identity

Feb 21, 2006

Im having a play using @@identity

I want to insert some data into a table

Get the AutoID value on the inserted data

then insert some other data into another table
and set its id value to the captured @@identity

My question
I only want to do the second insert only if
@FieldValue2 contains a value ie not empty

below is a basic procedure without conditonal part



Code:

CREATE PROCEDURE conditional_Insert

@FieldID As int,
@FieldValue As Nvarchar(50),
@FieldValue2 As Nvarchar(50)
AS

declare @id int

set nocount on

INSERT INTO Table1(fieldID,fieldvalue)
VALUES( @FieldID, @FieldValue)

set @id = @@identity

INSERT INTO Table2(fieldID2, FieldValue2)
VALUES(@id, @FieldValue2)

select @id
GO

View 2 Replies View Related

Possible To UPDATE Multiple Fields Conditionally?

Nov 14, 2013

I have a am doing some date calcs () . The situation is that I have a Move date (date a customer moved to a new home). I want to calculate their sales for the following 0-3 months after the move (month 0 being the move month). I have the month and year of the move (MthStart, YrStart), and I am adding 3 to MthStart to get the MthEnd of that 0-3 month period. I will then find sales BETWEEN YrStart&MthStart AND YrEnd&MthEnd (there is a YrMth field in the sales table)

Of course, for MthStarts 10, 11, and 12, the ends are 13, 14, and 15. So for these, I need to subtract 12, and increment the YrEnd by 1.

I am wondering if there is a way to update both the MthEnd and YrEnd fields at one time instead of separate SETs (or maybe I am just thinking about this the hard way to begin with). Is there a way to update both in a single CASE statement like WHEN MthEnd> 12 THEN MthEnd-12 AND YrEnd+1?

Code:
CREATE TABLE #myTable (
YrStart INT,
MthStart INT,
YrEnd INT,
MthEnd INT);

[code]....

View 4 Replies View Related

Can A Trigger On Table Fire Off Conditionally

Oct 29, 2014

Is there a way to make a sql table trigger fire off conditionally on calling app?We have this vendor app database which also have in-house custom built app operates on them. Some one are thinking using triggers to audit second part of the app activities, but want to skip the vendor app part of operation for at least performance reason.To my knowledge, the answer is no. An insert trigger will fire off whenever there is an insert. It doesn't provide a mechanism to check which app/process first, then conditionally fire or not fire.

View 6 Replies View Related

Conditionally Showing/hiding A Parameter

Jul 16, 2007

I have a report that in most cases takes 4 parameters. In a few special cases, though, it takes 5 parameters. I have my code modified enough such that it can handle this exception, however I cannot figure out how to conditionally show the 5th parameter based on the 4th parameter. Is this possible?

View 3 Replies View Related

Conditionally Extraction Of Data From A View

Mar 19, 2007

Hi all,
I am really new to SSIS, so may be this is a really simple question, but I couldnt find an answer yet.
I need to build a package that
1) counts the rows from a view
2) if rowcount >0 extracts the data into a file

I tryed to do this using a Row Count Transformation in the data flow, but after putting the count in a variable I am not able to perform the "conditional" phase two.
I mean that I want to check the value of the variable, but cannot figure out how to conditionally execute the flat file extraction.

Using Row Count, I have to build 2 data flow tasks.
Is there a way to do this in a single data flow?
May be using an Execute SQL Task instead of row count?

Any suggestions will ge greately appreciated
IgorB

View 6 Replies View Related

How To Conditionally Count Distinct Values?

Mar 17, 2008

Here is my dataset used by my report definition. The combo of barcode and order id is unique. The 'isDiscountedItem' field indicates if the customer used a coupon to purchased an item at a lower price.

departmentId classId barcode orderId isDiscountedItem
----------------------------------------------------------------------------------------------------------------------
1 1 123 1 True
2 7 456 1 False
1 1 123 2 False
1 1 123 3 True
1 1 789 3 True
2 7 456 3 False
... ... ... ... ...

I want to group my report by department id, class id and barcode. Then, I want to count all distinct order ids for which there was at leat one discounted item.

My report would produce the following output considering the above dataset:






Merchandise Number of customers who used a coupon
--------------------------------------------------------------------------------------------------------------
Department 1 2

Class 1 2

Barcode 123 2
Barcode 789 1
Department 2 0

Class 7 0

Barcode 456 0


I've been looking at a possible solution using hash tables defined in the report code but I would like to find a 'cleaner' solution. Any help would be appreciated.





View 3 Replies View Related

Conditionally Hide 2 Out Of 6 Rows In A Matrix?

Jul 26, 2007



I just spent about 30mins searching through the forums for this and saw several posts, but I didn't find a straight answer that seems like it would work for my report. How can I add only 2 data rows to a group (to hide them via the group's visible properties) and keep the rest of the rows outside of the group, but still in the same column (vertical area), as shown:

This is the view of all rows:








Cat1
Cat2

Product A
Data 1
#
#


Data 2
#
#


Data 3
#
#


Data 4
#
#


Data 5
#
#


Data 6
#
#

Product B
Data 1
#
#


Data 2
#
#


Data 3
#
#


Data 4
#
#


Data 5
#
#


Data 6
#
#

And this is the view I'm seeking in some cases:








Cat1
Cat2

Product A
Data 1
#
#


Data 4
#
#


Data 5
#
#


Data 6
#
#

Product B
Data 1
#
#


Data 4
#
#


Data 5
#
#


Data 6
#
#

View 4 Replies View Related

How To Limit Conditionally Records Exported

Aug 24, 2006

I apologize if I'm posting this question in the wrong forum.

I have a query that exports data from an Oracle database to an Excel spreadsheet. The application that executes the query is Computer Associates Eureka Report writer. I do not have direct access to the database or any of its objects. With the data in Excel, I run a VBA macro-driven inventory report. The Excel spreadsheet row limitation is not a problem presently, however, the query exports a lot of extraneous data that I don't need. I actually export about a dozen columns of data however I'm only listing 4 in the example below.

Example:

CaseNum ActionDate ActionType ComplCd
1029901 09/08/2006 F 0
1029901 09/11/2006 C 0
1029901 08/18/2006 C 1
1029901 08/17/2006 F 1
1029901 08/01/2006 F 1

When the ComplCd = 1 I only want the query to export one row of data for each CaseNum. Is
there a way to code my query to accomplish this?

ugabulldog

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved