Dynamic Coloring Of Cells Based On The Multi-value Selction.

May 12, 2008

Hello All,

I am working on a report where in I need coloring of cells based on a Multivalue drop down selection.

Scenario:
1.) I have a exception flag as a column/field in the database which list the postion of the Exception and also the Value of the exception.
Example: ExcpFlag: 012024504213
Each digit in this ExcpFlag represents two values 0 being the first column in the table and 0 is Good data. 1 being the 2nd column and 1 is null data. 2 is 3rd column and Missing SSN...etc.
We have separate list table which list all the exceptions with key and value pairs.

ExcpTable has 0 | GoodData
1 | NullData


2 | Missing SSN's and etc.


2.) The Stored Procedure brings me the records based on the exception flag and file ID.
Example: Two Parameters to SP.


Exec sprcFileException fileID:'1025' and ExcpFlag: '0,1,3,7,9' gives me all the records for that FileID and also the ExcpFlag.

3.) Now what I need is: Dynamic Coloring of the cells which has only '0,1,3,7,9' in the report for the fileID: 1025.

I have about 24 fields/columns in the report and data displays for only '0,1,3,7,9' exception types from the selction.
Problem: I want to color all the cells which have the '0,1,3,7,9' exceptions on the report.


Please help me figuring out this issue.

Thanks in Advance.

Deepak

View 2 Replies


ADVERTISEMENT

Dynamic SQL Cells

Apr 7, 2007

How can I make the values for certain cells in a table in a database show the day a folder was created?

On the same note, How can I make other values in other cells change (say the values 101 through 200 had to change to 1-100)?

View 5 Replies View Related

Import Specific XLS Cells From Dynamic Filename

Oct 26, 2005

Hi
I'm struglling with this, can anyone assist. I'd go as far as to say, there is $$ up for the solution that works.

Here's the routine..

1) Upload file to server - works, no problem.

2) Extract cell ref A1-ws1 & A1-ws2 from the newly uploaded file (myXLSFileName - WHERE ProjectID = Session("strProjectID").

3) Update tMyTable.myfield1 with A1-ws1 & tMyTable.myfield2 with A1-ws2 WHERE ProjectID = Session("ProjectID")

All efforts greatly received!.
Thanks

View 2 Replies View Related

Copy Specific Cells Between Tables Based On Login ID

May 26, 2007

I want to copy FirstName and LastName cells from table1 to table2. Which FirstName and LastName cells depend on the username, i.e. which person has logged in.
Q1) How can this be done?  (I have chosen to SELECT from Table1 and output to variables (C# code); then INSERT these variables into Table2. [Finding it very difficult]).
Any suggestions/comments would be appreciated. Thank you in advance.

View 1 Replies View Related

Subtotal Coloring On The Matrix - Bug?

May 29, 2007

I have a matrix with both row and column subtotaling. The matrix also has alternating row coloring, which is done using a hidden static row group.



In addition to the alternating row coloing, I'm trying to color the subtotal cells. Using the InScope function I can determine whether the cell is in the Row Group or the Column group or neither.



The problem I'm having is with the coloring of the cells in the Row subtotals. My function correctly determines the appropriate color for each cell in the row total, but the column total cell coloring seems to supercede the color I'm setting on the row total.



Included is the RDL for the AdventureWorks CompanySales report, which I've modified to demonstrate my problem. I've added columns which basically indicate the current scope and the color I'm trying to set for each item in the matrix.



If anyone knows what I'm missing and how to correct this, I'd appreciate the help.








Code Snippet

<?xml version="1.0" encoding="utf-8"?>

<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

<DataSources>

<DataSource Name="AdventureWorks">

<DataSourceReference>AdventureWorks</DataSourceReference>

<rd:DataSourceID>25d3314c-0d4f-49cc-9c22-10194e825490</rd:DataSourceID>

</DataSource>

</DataSources>

<BottomMargin>0.5in</BottomMargin>

<RightMargin>0.5in</RightMargin>

<rd:DrawGrid>true</rd:DrawGrid>

<InteractiveWidth>8.5in</InteractiveWidth>

<rd:GridSpacing>0.0625in</rd:GridSpacing>

<rd:SnapToGrid>true</rd:SnapToGrid>

<Body>

<ReportItems>

<Textbox Name="Title">

<Left>0.0625in</Left>

<Top>0.0625in</Top>

<ZIndex>1</ZIndex>

<Width>3.125in</Width>

<Style>

<FontFamily>Tahoma</FontFamily>

<FontWeight>800</FontWeight>

<FontSize>18pt</FontSize>

<Color>DarkSlateBlue</Color>

</Style>

<Height>0.9375in</Height>

<Value>Adventure Works

2002 - 2003

Sales</Value>

</Textbox>

<Matrix Name="SalesMatrix">

<MatrixColumns>

<MatrixColumn>

<Width>0.875in</Width>

</MatrixColumn>

<MatrixColumn>

<Width>0.75in</Width>

</MatrixColumn>

<MatrixColumn>

<Width>0.4375in</Width>

</MatrixColumn>

<MatrixColumn>

<Width>0.625in</Width>

</MatrixColumn>

</MatrixColumns>

<Left>0.0625in</Left>

<RowGroupings>

<RowGrouping>

<Width>1.125in</Width>

<DynamicRows>

<ReportItems>

<Textbox Name="Category">

<ZIndex>7</ZIndex>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<PaddingLeft>2pt</PaddingLeft>

<BackgroundColor>Silver</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

</Style>

<Value>=Fields!ProdCat.Value</Value>

</Textbox>

</ReportItems>

<Sorting>

<SortBy>

<SortExpression>=Fields!ProdCat.Value</SortExpression>

<Direction>Descending</Direction>

</SortBy>

</Sorting>

<Grouping Name="ProductCategory">

<GroupExpressions>

<GroupExpression>=Fields!ProdCat.Value</GroupExpression>

</GroupExpressions>

</Grouping>

</DynamicRows>

</RowGrouping>

<RowGrouping>

<Width>1.125in</Width>

<DynamicRows>

<ReportItems>

<Textbox Name="SubCategory">

<ZIndex>6</ZIndex>

<ToggleImage>

<InitialState>true</InitialState>

</ToggleImage>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<PaddingLeft>2pt</PaddingLeft>

<BackgroundColor>Silver</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

</Style>

<Value>=Fields!SubCat.Value</Value>

</Textbox>

</ReportItems>

<Subtotal>

<ReportItems>

<Textbox Name="textbox2">

<rd:DefaultName>textbox2</rd:DefaultName>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<PaddingLeft>2pt</PaddingLeft>

<BackgroundColor>#0066cc</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

</Style>

<CanGrow>true</CanGrow>

<Value>Total</Value>

</Textbox>

</ReportItems>

</Subtotal>

<Sorting>

<SortBy>

<SortExpression>=Fields!SubCat.Value</SortExpression>

<Direction>Ascending</Direction>

</SortBy>

</Sorting>

<Grouping Name="ProductSubcategory">

<GroupExpressions>

<GroupExpression>=Fields!SubCat.Value</GroupExpression>

</GroupExpressions>

</Grouping>

</DynamicRows>

</RowGrouping>

<RowGrouping>

<Width>0.0625in</Width>

<DynamicRows>

<ReportItems>

<Textbox Name="txtAltColor">

<ZIndex>5</ZIndex>

<Visibility>

<Hidden>true</Hidden>

</Visibility>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<PaddingLeft>2pt</PaddingLeft>

<FontFamily>Arial Black</FontFamily>

<FontSize>1pt</FontSize>

<BackgroundColor>=Value</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

</Style>

<CanGrow>true</CanGrow>

<Value>=iif(RunningValue(Fields!SubCat.Value,CountDistinct,Nothing) Mod 2, "#C0C0C0", "White")</Value>

</Textbox>

</ReportItems>

<Grouping Name="AltColorRowGroup">

<GroupExpressions>

<GroupExpression>=1</GroupExpression>

</GroupExpressions>

</Grouping>

</DynamicRows>

</RowGrouping>

</RowGroupings>

<ColumnGroupings>

<ColumnGrouping>

<DynamicColumns>

<ReportItems>

<Textbox Name="OrderYear">

<ZIndex>13</ZIndex>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<TextAlign>Left</TextAlign>

<PaddingLeft>2pt</PaddingLeft>

<BackgroundColor>SteelBlue</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

</Style>

<Value>=Fields!OrderYear.Value</Value>

</Textbox>

</ReportItems>

<Subtotal>

<ReportItems>

<Textbox Name="textbox3">

<rd:DefaultName>textbox3</rd:DefaultName>

<ZIndex>12</ZIndex>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<PaddingLeft>2pt</PaddingLeft>

<BackgroundColor>SteelBlue</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

</Style>

<CanGrow>true</CanGrow>

<Value>Total</Value>

</Textbox>

</ReportItems>

</Subtotal>

<Sorting>

<SortBy>

<SortExpression>=Fields!OrderYear.Value</SortExpression>

<Direction>Ascending</Direction>

</SortBy>

</Sorting>

<Grouping Name="OrderYear">

<GroupExpressions>

<GroupExpression>=Fields!OrderYear.Value</GroupExpression>

</GroupExpressions>

</Grouping>

</DynamicColumns>

<Height>0.25in</Height>

</ColumnGrouping>

<ColumnGrouping>

<Height>0.25in</Height>

<StaticColumns>

<StaticColumn>

<ReportItems>

<Textbox Name="textbox4">

<rd:DefaultName>textbox4</rd:DefaultName>

<ZIndex>11</ZIndex>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<TextAlign>Right</TextAlign>

<PaddingLeft>2pt</PaddingLeft>

<BackgroundColor>SteelBlue</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

</Style>

<CanGrow>true</CanGrow>

<Value>Sales</Value>

</Textbox>

</ReportItems>

</StaticColumn>

<StaticColumn>

<ReportItems>

<Textbox Name="textbox5">

<rd:DefaultName>textbox5</rd:DefaultName>

<ZIndex>10</ZIndex>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<TextAlign>Right</TextAlign>

<PaddingLeft>2pt</PaddingLeft>

<FontSize>8pt</FontSize>

<BackgroundColor>SteelBlue</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

</Style>

<CanGrow>true</CanGrow>

<Value>Product Subcategory Scope</Value>

</Textbox>

</ReportItems>

</StaticColumn>

<StaticColumn>

<ReportItems>

<Textbox Name="textbox7">

<rd:DefaultName>textbox7</rd:DefaultName>

<ZIndex>9</ZIndex>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<TextAlign>Right</TextAlign>

<PaddingLeft>2pt</PaddingLeft>

<FontSize>8pt</FontSize>

<BackgroundColor>SteelBlue</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

</Style>

<CanGrow>true</CanGrow>

<Value>Order Year Scope</Value>

</Textbox>

</ReportItems>

</StaticColumn>

<StaticColumn>

<ReportItems>

<Textbox Name="textbox9">

<rd:DefaultName>textbox9</rd:DefaultName>

<ZIndex>8</ZIndex>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<TextAlign>Right</TextAlign>

<PaddingLeft>2pt</PaddingLeft>

<FontSize>8pt</FontSize>

<BackgroundColor>SteelBlue</BackgroundColor>

<Color>White</Color>

<PaddingRight>2pt</PaddingRight>

</Style>

<CanGrow>true</CanGrow>

<Value>BG Color from expression</Value>

</Textbox>

</ReportItems>

</StaticColumn>

</StaticColumns>

</ColumnGrouping>

</ColumnGroupings>

<DataSetName>Sales</DataSetName>

<Top>1.0625in</Top>

<Width>7.6875in</Width>

<Corner>

<ReportItems>

<Textbox Name="textbox1">

<ZIndex>14</ZIndex>

<Style>

<PaddingLeft>2pt</PaddingLeft>

<PaddingRight>2pt</PaddingRight>

</Style>

<Value />

</Textbox>

</ReportItems>

</Corner>

<MatrixRows>

<MatrixRow>

<Height>0.25in</Height>

<MatrixCells>

<MatrixCell>

<ReportItems>

<Textbox Name="Sales">

<ZIndex>4</ZIndex>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<PaddingLeft>2pt</PaddingLeft>

<FontSize>9pt</FontSize>

<Format>C0</Format>

<BackgroundColor>=Code.MatrixColor(InScope("ProductSubcategory"), InScope("OrderYear"), ReportItems!txtAltColor.Value, "#0066CC")</BackgroundColor>

<PaddingRight>2pt</PaddingRight>

</Style>

<Value>=Sum(Fields!Sales.Value)</Value>

</Textbox>

</ReportItems>

</MatrixCell>

<MatrixCell>

<ReportItems>

<Textbox Name="textbox6">

<rd:DefaultName>textbox6</rd:DefaultName>

<ZIndex>3</ZIndex>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<PaddingLeft>2pt</PaddingLeft>

<FontSize>7pt</FontSize>

<Format>C0</Format>

<BackgroundColor>=Code.MatrixColor(InScope("ProductSubcategory"), InScope("OrderYear"), ReportItems!txtAltColor.Value, "#0066CC")</BackgroundColor>

<PaddingRight>2pt</PaddingRight>

</Style>

<CanGrow>true</CanGrow>

<Value>=InScope("ProductSubcategory")</Value>

</Textbox>

</ReportItems>

</MatrixCell>

<MatrixCell>

<ReportItems>

<Textbox Name="textbox8">

<rd:DefaultName>textbox8</rd:DefaultName>

<ZIndex>2</ZIndex>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<PaddingLeft>2pt</PaddingLeft>

<FontSize>7pt</FontSize>

<Format>C0</Format>

<BackgroundColor>=Code.MatrixColor(InScope("ProductSubcategory"), InScope("OrderYear"), ReportItems!txtAltColor.Value, "#0066CC")</BackgroundColor>

<PaddingRight>2pt</PaddingRight>

</Style>

<CanGrow>true</CanGrow>

<Value>=InScope("OrderYear")</Value>

</Textbox>

</ReportItems>

</MatrixCell>

<MatrixCell>

<ReportItems>

<Textbox Name="textbox10">

<rd:DefaultName>textbox10</rd:DefaultName>

<ZIndex>1</ZIndex>

<Style>

<BorderStyle>

<Default>Solid</Default>

</BorderStyle>

<PaddingLeft>2pt</PaddingLeft>

<FontSize>7pt</FontSize>

<Format>C0</Format>

<BackgroundColor>=Code.MatrixColor(InScope("ProductSubcategory"), InScope("OrderYear"), ReportItems!txtAltColor.Value, "#0066CC")</BackgroundColor>

<PaddingRight>2pt</PaddingRight>

</Style>

<CanGrow>true</CanGrow>

<Value>=Code.MatrixColor(InScope("ProductSubcategory"), InScope("OrderYear"), ReportItems!txtAltColor.Value, "#0066CC")</Value>

</Textbox>

</ReportItems>

</MatrixCell>

</MatrixCells>

</MatrixRow>

</MatrixRows>

</Matrix>

</ReportItems>

<Height>2.0625in</Height>

<Style>

<BackgroundImage>

<Value>logoback</Value>

<Source>Embedded</Source>

</BackgroundImage>

</Style>

</Body>

<rd:ReportID>312657d4-5053-4f4c-b4fa-c580a92fd43b</rd:ReportID>

<LeftMargin>0.5in</LeftMargin>

<EmbeddedImages>

<EmbeddedImage Name="logoback">

<ImageData>/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCADCAbYDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoo

ooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAC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7BTdxO23028/n/APWrTggS3iEca4UVLRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUU

UAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/2Q==</ImageData>

<MIMEType>image/jpeg</MIMEType>

</EmbeddedImage>

</EmbeddedImages>

<DataSets>

<DataSet Name="Sales">

<Query>

<rd:UseGenericDesigner>true</rd:UseGenericDesigner>

<CommandText>SET DATEFORMAT mdy

SELECT PC.Name AS ProdCat, PS.Name AS SubCat, DATEPART(yy, SOH.OrderDate) AS OrderYear, 'Q' + DATENAME(qq, SOH.OrderDate) AS OrderQtr,

SUM(SOD.UnitPrice * SOD.OrderQty) AS Sales

FROM Production.ProductSubcategory PS INNER JOIN

Sales.SalesOrderHeader SOH INNER JOIN

Sales.SalesOrderDetail SOD ON SOH.SalesOrderID = SOD.SalesOrderID INNER JOIN

Production.Product P ON SOD.ProductID = P.ProductID ON PS.ProductSubcategoryID = P.ProductSubcategoryID INNER JOIN

Production.ProductCategory PC ON PS.ProductCategoryID = PC.ProductCategoryID

WHERE (SOH.OrderDate BETWEEN '1/1/2002' AND '12/31/2003')

GROUP BY DATEPART(yy, SOH.OrderDate), PC.Name, PS.Name, 'Q' + DATENAME(qq, SOH.OrderDate), PS.ProductSubcategoryID</CommandText>

<Timeout>30</Timeout>

<DataSourceName>AdventureWorks</DataSourceName>

</Query>

<Fields>

<Field Name="ProdCat">

<rd:TypeName>System.String</rd:TypeName>

<DataField>ProdCat</DataField>

</Field>

<Field Name="SubCat">

<rd:TypeName>System.String</rd:TypeName>

<DataField>SubCat</DataField>

</Field>

<Field Name="OrderYear">

<rd:TypeName>System.Int32</rd:TypeName>

<DataField>OrderYear</DataField>

</Field>

<Field Name="OrderQtr">

<rd:TypeName>System.String</rd:TypeName>

<DataField>OrderQtr</DataField>

</Field>

<Field Name="Sales">

<rd:TypeName>System.Decimal</rd:TypeName>

<DataField>Sales</DataField>

</Field>

</Fields>

</DataSet>

</DataSets>

<Code>public function MatrixColor(bRowGroupScope as Boolean, bColGroupScope as Boolean, sAltColor as string, sTotalColor as string) As String

Dim sReturn as String

Select Case True

Case (Not bRowGroupScope And Not bColGroupScope)

sReturn = sTotalColor

Case (bRowGroupScope And Not bColGroupScope)

sReturn = sAltColor

Case (Not bRowGroupScope And bColGroupScope)

sReturn = sTotalColor

Case (bRowGroupScope And bColGroupScope)

sReturn = sAltColor

End Select



MatrixColor = sReturn

end function</Code>

<Width>9.375in</Width>

<InteractiveHeight>11in</InteractiveHeight>

<Description>Adventure Works sales by quarter and product category. This report illustrates the use of a matrix data region that provides drilldown from summary data into detail data by showing and hiding rows. This report also illustrates the use of background images.</Description>

<TopMargin>0.5in</TopMargin>

</Report>

View 3 Replies View Related

Dynamic Query With Multi-value Parameters

Jun 1, 2008

Is anybody here knowing how to create a dynamic query based on a multi-value parameter?

e.g. there is a multi-value report parameter called names. For a static query, the where clause of a select statement likes the following

select * from students where name=@names

For the dynamic one, I tried something like the below, but it did not work.

="select * from students where name=(" & Join(Parameters!names ,',') & ")"

Any suggestion would be great appreciated.



Thanks,
KY

View 2 Replies View Related

Multi-lang, Dynamic Table And SP Problem

Oct 18, 2004

Hello all,

I got a problem with Multi language when it comes to Dynamic Tables in Store procedures.

If I do the following :


SET @StringTableName = N'System_Strings'
SET @StringID = N'100'
SET @LanguageID = N'2'
SET @StringText = N'أثممخ ًخقمي'
SET @Mandatory = N'0'

EXEC (N'INSERT ' + @StringTableName + N' (StringID, LanguageID, StringText, Mandatory) VALUES(''' + @StringID + ''', ''' + @LanguageID + ''', ''' + @StringText + ''', ''' + @Mandatory +''')')


The StringText column shows up as ????????? in the Db.

However if I do the following:


INSERT System_Strings (StringID, LanguageID, StringText, Mandatory) VALUES(@StringID, @LanguageID, @StringText, @Mandatory)


The StringText column shows with the correct Arabic text.

Does anybody know how to use Dynamic Tables aswell as Multi Language?

Best Wishes,
Farek

View 1 Replies View Related

Dynamic Multi-sheet Excel Destination

Feb 4, 2008

I need to take 5 or 6 select statements to excel. Here are my limitations...

- each of the queries (thankfully) have the same data format
- each of the queries could return more than 65k, so a new worksheet needs to be generated dynamically.
- the names of the excel worksheets need to be custom, but a naming scheme would have to be developed for queries that ran over into multiple worksheets.

What's the smartest way to do this?

I'm having a hard time getting my head around this. I would love any help... I know I'm not breaking any new ground here. I've found pieces of what I'm doing on lots of forums, but never the exact thing. The complexities compound quickly when dealing with dynamic excel worksheets. =)

View 3 Replies View Related

Working With Multi-valued, Query Based Parameters

Dec 27, 2006

I am currently working with 3 multi-valued parameters whose data sources are queries. The first 2 are required to have entries, 100% of the time, but the third one may or may not require selecting a value. Parm3's data source is filtered by the selections of Parm1 & Parm2. The data source for my report references Parm3 in a derived table that is then LEFT OUTER JOINed.

In the cases where the report does not require any selection from Parm3 I am still required to pick at least 1 entry. Can anyone shed some light on this, or provide a solution so I am not forced to pick any if I don't want?



Thanks in advance,



Michael

View 6 Replies View Related

How To Change Report Name Based On Multi Valued Parameter

May 2, 2008

Hi All,

I'm having trouoble with changing my report name when I swtich to different parameter values.

I use the following expression.


IIf(Parameters!GroupVar1.Label = "CBank", "CBank", IIf(Parameters!GroupVar1.Value ="DTC","DTC","Total"))


This works fine when I clear Mutli-Value box in paramter properties. but when I use multi-value, this does not work.

Is there any solution for this?

Thanks

View 1 Replies View Related

Two Multi-value Parameters That Are Bounded To Dynamic Datasets (using Vbscript.)

May 1, 2008


I have a report with a multi-value parameter that gets its values (value and label fields) from a dataset that is built at runtime (from vbscript code that returns a string).
When I press 'preview' all works fine.
When I add another multi-value parameter that (like the first parameter) gets its value from a dataset that is built at runtime (from vbscript code that returns a string) and press 'preview', I get a strange behavior:
The second parameter is disabled until I choose an option for the first parameter.
I do not pass value from the first parameter to the second and the two variables have 'Null' in the default values and 'from query' in the available values.

Why does the second parameter is disabled and how can I avoid it?
Thanks in advance.

View 2 Replies View Related

Web Based Sql Server Record Manipulation In Multi-user Environment

Jan 20, 2007

I was wondering if you guys might give me some advice on how best to handle a particular scenario i'm struggling with.
I have a client that basically wants web-based-update access to their sql server database.  Specifically, for a group of users to be able to access a page where they select a record for editing.  the caveat is that no two users should be able to pull up the same record at the same time.  Originally I would have thought there was some easier record-locking-mechanism I could exploit within sql server or ado.net itself, but I haven't been able to come up with anything..  so this is my current approach:
The page they use starts-out with basically a blank form.  there are custom-built paging controls at the bottom of the screen.  they click page-forward to begin and a stored procedure is ran to select a record and update a field on that record to indicate "in-process".  when they finish editing the record - or page on to the next record without updating - another stored procedure is ran - updating/resetting the status field on the record appropriately.
The entire page is encapsulated within an ajax.net updatepanel.
The entire page has caching disabled.  This works well in conjunction with the first page being blank.  if they get out of the app and try to get back in by clicking the back button - all they can do is get to the first (blank) page.
A piece of javascript window.onunload clicks a button on the page that releases the record they currently have selected in the event of a re-direct, clicking back, etc.. it appears to work with everything except a window close.  in that case, i have a stored procedure running periodically on the server that checks how long a record has been selected - and if it exceeds the time indicated - resets the record as to allow it to be re-selected later.
In the event of session timeout, they are redirected to another page that tells them their session has timed-out (and since the window.onunload fires - it takes care of releasing the record if they have one on the screen).
The concept seemed to be working well until I started multi-user testing.  Now it seems as if two users time it perfectly - they are actually able to both select the same record.  it happens pretty rarely, but it does seem to happen.  I'm guessing this has to do with how my stored procedure is structured - possibly allowing a tiny-enough window between the record being selected for editing - and the update running to actually status the record as in-process (2 separate sql statements within the one stored procedure).
I believe I also have a found a second quirk in my approach where something is causing the window.onunload event to fire twice in some strange situations..  but that's more annoying/confusing from a logging standpoint than anything..
I've read where people say to ensure you dont update a record that's already been updated - that you should compare the fields before you actually perform the update and ensure they haven't changed since you selected it..  but to me that doesn't solve anything.. if two people select the same record and both spend time working on it - the person that tries to update last has just wasted their time.
I've also toyed with the idea of maintaining a separate table in the database to hold the keys to the currently selected records and use that to keep multiple people from selecting the same record - but honestly i dont know if that approach is any better than what i'm doing now.   
anyway, I was just curious if you guys had any advice in regards to how you'd handle a request like this..  or if you see any obvious problems/fixes with my current approach..
I would greatly appreciate any info you could provide-
thanks-

View 3 Replies View Related

Transact SQL :: Dynamic Query For Multi-Header CrossTab Pivot

May 7, 2015

Have a table with a structure like:

FIELD_A
FIELD_B
FIELD_C
FIELD_D
AMOUNT

DATA_A1
DATA_B1
DATA_C2
DATA_D2
37540

[Code] ....

In such a case, devising a dynamic cross-tab query, to cover all the items, and result like a pivot like the following to represent the data in a multi-header pivot like following:

DATA_C1
DATA_C1
DATA_C1
DATA_C2
DATA_C2
DATA_C2

[Code] ....

View 5 Replies View Related

Formatting Numbers In A Mixed Column (numbers In Some Cells Strings In Other Cells) In Excel As Numbers

Feb 1, 2007

I have a report with a column which contains either a string such as "N/A" or a number such as 12. A user exports the report to Excel. In Excel the numbers are formatted as text.

I already tried to set the value as CDbl which returns error for the cells containing a string.

The requirement is to export the column to Excel with the numbers formatted as numbers and the strings such as "N/A' in the same column as string.

Any suggestions?



View 1 Replies View Related

Dynamic Join Based On Column Value??

May 4, 2007

Hi,

I have three tables.

The "Master table has a recordid, a masterID, a "IsSubField" and other stuff.



I need to do a join to a second table based on the MasterID...



However for each record, if the "IsSubField" has a True value then it has to use table A to JOIN to, where as if it's False, then it uses table B.



Make sense?



Anyone got any pointers?



Thanks in advance

James

View 8 Replies View Related

Dynamic WHERE Operator Based On User Input

Oct 17, 2007

Let's say I have a table with 3 fields: an ID field (primary key, set as an id field, etc.), a Name field (nvarchar50), and an Age field (int). I have a form that has three elements:
DropDownList1: This drop down list contains 3 choices- "=", ">", and "<".
Age: This text box is where someone would enter a number.
Button1: This is the form's submit button.
I want someone to be able to search the database for entries where the Age is either equal to ("="), greater than (">"), or less than ("<") whatever number they enter into TextBox1.
The code-behind is shown below. The part I'm confused about is that if I load this page, the query works the -first- time. Then, if I try to change the parameters in the form and submit it, I get the following error:
"The variable name '@Age' has already been declared. Variable names must be unique within a query batch or stored procedure."
Any help would be appreciated.
Here is what I'm using in my code behind:
    protected void Button1_Click(object sender, EventArgs e)    {        System.Text.StringBuilder sb = new System.Text.StringBuilder();        sb.Append("SELECT * FROM People WHERE Age ");        switch (DropDownList1.SelectedValue)        {            case "=":                sb.Append("= ");                break;            case ">":                sb.Append("> ");                break;            case "<":                sb.Append("< ");                break;        }        sb.Append("@Age");        SqlDataSource1.SelectCommand = sb.ToString();        SqlDataSource1.SelectParameters.Add("Age", TypeCode.Int32, Age.Text);    }

View 7 Replies View Related

XML With Dynamic Attributes Based On Column Values

Apr 10, 2007

I have been banging my head against the wall for TWO days. I have
gone back and forth with a very patient guy on thescripts.com. You
can see the ridiculous thread here

http://www.thescripts.com/forum/threadnav628777-1-10.html

If you have time, at least peruse that so we don't go in circles.
Anyway, if you guys can help me solve this, I will be forever
grateful!!


Here is the "basic" problem:


Here is an example for TWO different entities in the database.


EntityID XmlFieldName Value
1 City Austin
1 State TX
1 Country US
2 CityName Los Angeles
2 StateCode CA
2 CountryCode US
2 Zip 111111


Here is how the two different results should be


where EntityID = 1
<Address City="Austin" State="TX" Country="US"/>


where EntityID = 2
<Address CityName="Los Angeles" StateCode="TX" CountryCode="US"
Zip="111111"/>


Notice how the attribute names (City or CityName, State or StateCode,
etc) are based off the XmlFieldName and I don't know in advance what
the possible values will be? I also don't know how many attributes
there will be, but they can be different per entity, depending on how
they have set up an address in our application.


Another thing to note, is that I kind of have this working in an sproc
using PIVOT and generating a table with the values that have the
correct dynamic column names (you can see this on my other thread I
posted above) but I REALLY need this to not use dynamic SQL (so can
use it in a function) if possible and be able to be used in a select
statement, whether it be a temp table as I would like to get a result
set back that I can do a FOR XML RAW on. If this is confusing, it is
because I am delerious. OR is there a way to return a table from an
SPROC that has dynamic columns built?


Please help!! Thanks so much!!!


Brian

View 6 Replies View Related

Declare Cursor Based On Dynamic Query

Sep 18, 2006

Hi,

I am declaring the cursor based on a query which is generated dynamically. but it is not working



Declare @tempSQL varchar(1000)

--- This query will be generated based on my other conditon and will be stored in a variable

set @tempsql = 'select * from orders'

declare cursor test for @tempsql

open test



This code is not working.



please suggest



Nitin

View 12 Replies View Related

Dynamic Data Set Based On Calculated Fields

Mar 26, 2008



Hi,

I have three data sets. Data Set A is bound to my table in my report. There are also Data Sets B and C. All three data sets have the identical columns. I have setup data set A so that all of its fields are "Calculated". The calculation for each field will either pick the field from data set B or data set C based upon a parameter called BorC. So the calcualted fields in data set A look like the following:


=iif(Parameters!BorC.Value, First(Fields!MyField.Value, "dataset_B"), First(Fields!MyField.Value, "dataset_C"))

Problem is when I run the report I get internal error. Is it possible to populate one data set from the fields of another data set? If so is there some trick to doing this? Stripping this example down to one column in each of the data sets, and then just directly setting data set A from either B or C still gives me the same error. SO I set the one field in data set A to the following and it still doesn't work:

=First(Fields!MyField.Value, "dataset_B")

OR

=First(Fields!MyField.Value, "dataset_C")

This leads me to believe there is some fundamental problem with using another data set in a Calculated field. Since I think I have done this before I am convinced I am doing sommething wrong.

Any advice you have for me would be greatly appreciated!

Thanks.

View 1 Replies View Related

Is Possible To Create Dynamic Reports Based On Cubes?

Sep 5, 2007



Hi,



I would like to know if is possible to create dynamic reports based on cubes. What i mean is,after creating a cube with a couple of dimensions and measure if is there any way to give the normal users on the report manager or report builder the freedom to choose their own dimensions/measure so they can output the report with the choosen criteria.

Thanks.

View 3 Replies View Related

Dynamic CASE Statement Based On List Of Dates

Oct 5, 2007

I have the following table of data.  I need to take a date from a large table and do the following case:CASEWhen date < date(0)     Then '0'When date between date(0) and date(1)      Then '1'When date between date(1) and date(2)     Then '2'When date >= date(3)      Then '3'What I need is to be able to read all the dates the the Date table, sort then chronologically, and build the dynamic CASE statement so that the first When statement is < Date(0) and the last When statement is >= Date(Last)I hope I am making sense.  Dates will be added to the table about once a year or so and I don't want to keep going back into the sql function and rewrite it with the latest date.  Any ideas how to manipulate these dates into a case statement?  Don't worry about the second table below.  I just wanted you to see why I need to return an int from the Case function.thanksMilton



Dates Table

Date

4/1/2003

1/1/2006

4/2/2007

Fee Table



Date
Period
Class
Fee

1
Daily
True
329

1
Half Day
True
178

1
OT
True
49

1
Hourly
True
41

1
Daily
False
156

1
Half Day
False
86

1
OT
False
27

1
Hourly
False
19

2
Daily
True
355

2
Half Day
True
192

2
OT
True
50

2
Hourly
True
44

2
Daily
False
171

2
Half Day
False
92

2
OT
False
28

2
Hourly
False
21

3
Daily
True
364

3
Half Day
True
197

3
OT
True
51

3
Hourly
True
45

3
Daily
False
175

3
Half Day
False
94

3
OT
False
29

3
Hourly
False
21

View 3 Replies View Related

Building Dynamic Query Based On Dropdownlist Contents

Feb 18, 2008

Thanks in advance for taking the tiemt o read this post:
 
I am workingon an application in vb.net 2008 and I have 5 drop down lists on my page.
I have code that worked in .net 2005 for my databind but would like to use new features in 08 to do this same thing.
Here is my 05 code how would I do this same things in 08?
 Dim db As New DataIDataContext
Dim GlobalSQLstr As String
GlobalSQLstr = "select Orig_City, ecckt, typeflag, StrippedEcckt, CleanEcckt, ManualEcckt, Switch, Vendor, FP_ID, order_class, Line_type, id from goode2 where 1=1"
If (ddlOrigCity.SelectedValue <> "") Then
GlobalSQLstr &= "and Orig_City = '" & ddlOrigCity.SelectedValue & "'"
End If
If (ddlSwitch.SelectedValue <> "") Then
GlobalSQLstr &= "and switch = '" & ddlSwitch.SelectedValue & "'"
End If
If (ddlType.SelectedValue <> "") Then
GlobalSQLstr &= "and Order_Class = '" & ddlType.SelectedValue & "'"
End If
If (ddlFormatType.SelectedValue <> "9") Then
GlobalSQLstr &= "and typeflag = '" & ddlFormatType.SelectedValue & "'"
End If
If (ddlVendor.SelectedValue <> "") Then
GlobalSQLstr &= "and Vendor = '" & ddlVendor.SelectedValue & "'"
End IfDim AllSearch = From A In db.GoodEcckts2s
If (ddlErrorType.SelectedValue <> "0") Then
GlobalSQLstr &= "and ErrorType = '" & ddlErrorType.SelectedValue & "'"
End IfDim cmd As New SqlClient.SqlCommand
Dim rdr As SqlClient.SqlDataReaderWith cmd.Connection = New SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString1").ConnectionString)
.CommandType = Data.CommandType.Text
.CommandText = GlobalSQLstr
.Connection.Open()
rdr = .ExecuteReaderMe.gvResults.DataSource = rdrMe.gvResults.DataBind()
.Connection.Close()
.Dispose()End With
 
 
 

View 4 Replies View Related

Dynamic Build SQL In Store Procedure Based On Select

Jul 23, 2005

I have a department table like this:DeptID Department ParentID, Lineage1 HR NULL (2 Temp1 1 (1,3 Temp2 2 (1,24 PC NULL (I have a deptmember table like this:DeptID MemberID IsManager1 1 Y4 1 YI need to query table to get all department belong to MemberID 1 withall children departments.My thought is:1. Do Select * from deptmember where MemberID=1 and IsManager=Y2. Loop thru this table to build SQLWhere Lineage like '%1' OR Lineage like '%4'3. Select * from department using where statement from step 2.How do you loop thru results from step1, Do I need to use a cursor?Thanks,HL

View 3 Replies View Related

Analysis :: Dynamic Measure Value Based Upon Role / Department

Sep 28, 2015

I have an issue related to SSAS security. We have an SSAS multidimensional cube which needs 3 types of security:

- Access to the entire cube => OK, based upon a role
- Restricted access to one department (= dimension) => OK, based upon a role
- Access to the entire cube, but with dynamic security on 2 measures.

Let's say, we have 2 departments (food and non-food). Users within food are allowed to see sales and pieces from the food department, but not from the non-food department. 

It is not an option to restrict access to the non-food department because there are other measure which they have access to. I tried cell security, but this is very slow and generates multiple empty rows on my selections.

View 3 Replies View Related

Reporting Services :: Dynamic Columns Based On Parameters

Aug 21, 2015

I am trying to use SSRS to allow users to select any one or several columns from a set of cascading parameters which will then do a "data dump" of the contents of the selected columns for "export".I know how to do cascading parameters, but I am having problems coming up with a way of using the parameters to dynamically build a matrix which has as its columns the list selected in the parameters. I need the user to choose WHICH columns will be displayed.  There could be 1, 2, 3, up to 50 columns.

View 2 Replies View Related

How To Design Dynamic Reports Based On User's Choice

Dec 13, 2006

Hi all,

I'm a beginner to Report Services, and have tons of questions.

Here's the first one:

if the reports are created based on the condition that the user selects, how can I create the reports with Report Services?

For example,

the user can select the fields that will be shown on the reports, as well as the group fields, the sort fields and restrict fields. So I would not be able to pre-create all possible reports and deploy them to the report server, and I think I should create the reports dynamicly based on what the user select.

Could someone tell me how to do it (create and deploy the reports)?

Thanks a million!

Jonee

View 1 Replies View Related

Analysis :: DAX - Dynamic Masking Of Information Based On Role Security

Oct 2, 2015

I have a business requirement to build a tabular data model, where I need to mask information of other Agents from a given Agent but I still need to show the overall sales of the given product. 

For eg: IF an Agent is in APAC region he should see APAC region sales and also should be able see the sales of the same product in other region without knowing region specific break down.

For Agent  "Tom" in APAC region, the numbers will look like this
APAC_Sales = 100,000
Other_Sales = 500,000

And if "John" is in NA region, then the number will look like this for him

NA_Sales     = 200,000
Other_Sales = 400,000

I wanted to create "Roles" based on the Region, so all the agents belong to "APAC" region will have same view as Tom and "NA" region agents will have John's view.

View 2 Replies View Related

Analysis :: Dynamic Set Needed For Last 12 Months Based On Current Month Selected By User

Sep 30, 2015

I need to create a set so that when a user selects a month in filter (say 201506) then it should give me a list of months from 201406 to 201506. Any appropriate MDX query.

View 7 Replies View Related

SSRS Toggle Parameter Between Multi-Value And Single Value Based On Another Parameter

Feb 4, 2008



I would like to be able to adjust the multi-value property of a parameter based on the value of another parameter in my report. The controlling paramter would be binary with two options for Single or Multiple selection. I would like my parameter to default to multi-value, which I can do on the screen selection. I have tried to add an IIF statement to the XML code, with no success. Any ideas would be helpful.

Thanks

View 4 Replies View Related

SQL Server 2012 :: Create Dynamic Update Statement Based On Return Values In Select Statement

Jan 9, 2015

Ok I have a query "SELECT ColumnNames FROM tbl1" let's say the values returned are "age,sex,race".

Now I want to be able to create an "update" statement like "UPATE tbl2 SET Col2 = age + sex + race" dynamically and execute this UPDATE statement. So, if the next select statement returns "age, sex, race, gender" then the script should create "UPDATE tbl2 SET Col2 = age + sex + race + gender" and execute it.

View 4 Replies View Related

Dynamic Create Table, Create Index Based Upon A Given Database

Jul 20, 2005

Can I dynamically (from a stored procedure) generatea create table script of all tables in a given database (with defaults etc)a create view script of all viewsa create function script of all functionsa create index script of all indexes.(The result will be 4 scripts)Arno de Jong,The Netherlands.

View 1 Replies View Related

SQL 2012 :: Disaster Recovery Options For Multi-Database Multi-Instance Environment

Sep 23, 2014

Disaster Recovery Options based on the following criteria.

--Currently running SQL 2012 standard edition
--We have 18000 databases (same schema across databases)- majority of databases are less than 2gb-- across 64 instances approximately
--Recovery needs to happen within 1 hour (Not sure that this is realistic
-- We are building a new data center and building dr from the ground up.

What I have looked into is:

1. Transactional Replication: Too Much Data Not viable
2. AlwaysOn Availability Groups (Need enterprise) Again too many databases and would have to upgrade all instances
3. Log Shipping is a viable option and the only one I can come up with that would work right now. Might be a management nightmare but with this many databases probably all options with be a nightmare.

View 1 Replies View Related

SQL 2012 :: MSDTC In Multi-node / Multi-instanced Cluster

Aug 17, 2015

More often than not, I typically don't touch DTC on clusters anymore; however on a project where the vendor states that it's required. So a couple things here.

1) Do you really need DTC per instance or one for all?
2) Should DTC be in its own resource group or within the instance's group?
2a) If in it's own resource group, how do you tie an instance to an outside resource group? tmMappingSet right?

View 9 Replies View Related







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