Friday, March 30, 2012
Jump to URL in ReportViewer- Underline not displaying
I have a text box in a table that has its text-decoration property set to
Underline. The textbox has its value set from a column in a dataset. I have
also defined the following as its Jump to URL expression:
="http://" & Parameters!WebServerName.Value &
"/Policy/Reports/AdvisorAccountPolicyStatus.aspx?asofdate=" &
Parameters!dAsOfDate.Value & "&AdvId=" & Fields!ENCRYPTED_USER_ID.Value
The second I define the Jump to URL expression and deploy the report, the
Underline stops being displayed. If I remove the Jump to URL expression, the
Underline is displayed.
I am using the .Net ReportViewer control. I know that the HTML is being
rendered properly for the text-decoration, but the reportviewer control
refuses to display it. If I view the report using the SQL Reporting Services
management tool, the underline is displayed.
Does anyone have a solution?
Thanks,
Keith MisegadesIf anyone has a solution to this, it would be greatly appreciated.
Everything I have tried has failed and we really need a solution to this
issue.
Thanks,
Keith
"Keith" wrote:
> Hello,
> I have a text box in a table that has its text-decoration property set to
> Underline. The textbox has its value set from a column in a dataset. I have
> also defined the following as its Jump to URL expression:
> ="http://" & Parameters!WebServerName.Value &
> "/Policy/Reports/AdvisorAccountPolicyStatus.aspx?asofdate=" &
> Parameters!dAsOfDate.Value & "&AdvId=" & Fields!ENCRYPTED_USER_ID.Value
> The second I define the Jump to URL expression and deploy the report, the
> Underline stops being displayed. If I remove the Jump to URL expression, the
> Underline is displayed.
> I am using the .Net ReportViewer control. I know that the HTML is being
> rendered properly for the text-decoration, but the reportviewer control
> refuses to display it. If I view the report using the SQL Reporting Services
> management tool, the underline is displayed.
> Does anyone have a solution?
> Thanks,
> Keith Misegades
>sql
Jump to URL - check if valid file
I have a field in my dataset which could hold the path of a file
sometimes or would have some plain text. Before I give set that field
in the "Jump to URL", I want to check to see if it's a file and if so,
then assign that field for "Jump to URL" or leave it blank.
Is there any function to check if the value in the field is a file?
TIA
Sue..File you mean some text with ".extension" is that right ? then you can check
whether that extension exists using "INSTR" or if you are searching for the
path then you can search for "/" sign and then use "iif"
Amarnath, MCTS
"Sue" wrote:
> Hello
> I have a field in my dataset which could hold the path of a file
> sometimes or would have some plain text. Before I give set that field
> in the "Jump to URL", I want to check to see if it's a file and if so,
> then assign that field for "Jump to URL" or leave it blank.
> Is there any function to check if the value in the field is a file?
> TIA
> Sue..
>
Wednesday, March 21, 2012
Joining two datasets?
Hi All,
I have got two datasets. Some 'normal' rows with state values and an addtional dataset with the translation from state value to plain text (value / text pair).
A table object is attached to the first dataset, but I would like to show the plain text from the second dataset in a group header. So I'd like to do some kind of 'look up in another dataset'.
I wasn't able to find a function that could help me solve this problem. Does anyone has any ideas on this?
Kind regards.
Create 2 new parameters: Parameter1 will have all the values from DataSet2 (dataset with text/value paur) and Parameter2 will have all the text from DataSet2.
Write a function (VB.Net ot C#) in the report code (Report -> Report Properties -> Code tab) which will accept these parameters as object arrays and then store them in a shared variable.
Create a textbox in the beginning of the report which will call the above function by passing both the parameters. If you just specify the parameter (say Parameter!Parameter1.Value), it is considered as an array as it have more than one value and it will be received in the function as an object array.
Write another function (function2) in the code which will get the state id (or value) and then loop through the shared arrays (already stored) to find the corresponding text.
Call function2 from your table header to get the text for a given value.
Hope this helps. If more examples and explanation is needed, let me know.
Shyam
|||Hello Shyam,
thanks a lot for your post. I think this a way to solve my problem.
But also think MS should think about this for future versions. I think it is very complicated (Crystal Reports makes it much easier for developers). It would also be very helpful if datasets could be accessed directly within custom funcation.
Kind regards, CLive76
|||An alternative approach is to combine the two datasets already in the dataset query. Some options to consider:
? Linked Server functionality (see http://msdn2.microsoft.com/en-us/library/aa213283(SQL.80).aspx)
? OpenRowSet functionality to join data from another database server into the current query (http://msdn2.microsoft.com/en-us/library/ms190312.aspx, http://msdn2.microsoft.com/en-us/library/aa276850(SQL.80).aspx)
-- Robert
joining text in SP in SQL SERVER
here is my code:
declare @.strSQL nvarchar(4000);
set @.strSQL = 'select emailAddress from tblMailingList where mailingID > 0 ' ;
--send Mail
if len(@.sendMail)>0
@.strSQL+=' and sendMail =@.sendMail'
but I got this error:
Incorrect syntax near '@.strSQL'.
how can I joining the @.strSQL if the "if statement" is true?
thanks!
24sharon:
@.strSQL+=' and sendMail =@.sendMail'
Try this instead:
set @.strSQL = @.strSQL + ' and sendMail = ''' + @.sendMail + ''''
Hope this will help.
|||at last line u have some wrong code. replace last line using -->
Set @.strSQL = @.strSQL + ' and sendMail = ''' + @.sendMail + ''''
Monday, March 12, 2012
Joining datasets returned from stored procedures.
I am restricted to using stored procedures for data access. I would like to
be able to create a "Text" Dataset named C which is a join of two "Stored
Procedure" data sets (sp1, and sp2). Any idea how I can do this. Thanks.Tyr this:
SELECT * FROM OPENQUERY(servername, 'sp_1')
union
SELECT * FROM OPENQUERY(servername, 'sp_2')
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jason Agee" <jason.agee@.tlc.state.tx.us> wrote in message
news:%23%23nvqx4YEHA.1448@.TK2MSFTNGP12.phx.gbl...
> Hello,
> I am restricted to using stored procedures for data access. I would like
to
> be able to create a "Text" Dataset named C which is a join of two "Stored
> Procedure" data sets (sp1, and sp2). Any idea how I can do this. Thanks.
>
Joining 2 tables...
Hi. I'm new to SQL, and need to join 2 tables... any hints?
table1:
id (int)
title(varchar(50))
body(text)
table2:
id (int)
title(varchar(50))
body(text)
somehow need to get the id, which table the record is from, and the title and body... so if the tables had the information:
table1:
id title body
1 "first title" "first body"
2 "second title" "second body"
3 "third title" "third body"
table2:
id title body
1 "first title" "first body"
2 "second title" "second body"
3 "third title" "third body"
I would like to get...
id table title body
3 1 "third title" "third body"
3 2 "third title" "third body"
2 1 "second title" "second body"
2 2 "second title" "second body"
1 1 "first title" "first body"
1 2 "first title" "first body"
Does anyone know how to get this? I am fairly flexible if i need to change things...
cheers, eh!
SELECT 'A', Id, Title, Body FROM TABLE1
UNION
SELECT 'B', Id, Title, Body FROM TABLE2
ORDER BY Id DESC, 1 ASC
Friday, March 9, 2012
Join two text files in SSIS
Hi,
I'm trying to join outputs of two text files combined in to one text file. The lenght of both the input text files are same (590)
For example,
If contents of text_file_1.txt is: aaaaaaaaaaaaaaaaaaaaaaaaaaaa
and contents of text_file_2.txt is: bbbbbbbbbbbbbbbbbbbbbbbbbbbb
My final text file should be :
final_text.txt
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
I use flat file source for both the input file and then use "Union all" and then write out to final text file destination.
The issues is:
The second file (bbbbbbbbbbbbbbbbbbbbbb) is coming up first in the output and then there is no carriage return.
My output looks like:
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...(goes up to 590)aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaa
What is that I'm missing here. Could some one plese help.
Thanks
Sri
This is a really odd request.
I would suggest that you not bother with the Union All step. You can't necessarily predict the order that the results of a union query will come out in. Better to process the first file and "Create" your output file from that, and then process the second file and "Append" the results to the first file.
The bigger question is why would you be doing this with SSIS at all?
Some clarification questions:
1. Does each file only contain one "line" of data (one record?)
2. Does either file have a carriage return at the end of the line already?
3. Is the length of the data fixed (590) or variable?
If you are still stuck, the clarification questions will help the rest of us come up with a better solution.
Dylan.
|||It sounds like you are using a fixed width destination file. If you want a carriage return at the end of each row, use Ragged Right.
|||Good point, I forgot about that, but it won't fix the order of the result set.|||Thanks Jwelch. Yes, I was using 'fixed with'. Ragged Right fixed the carriage return problem. Now my output file is properly aligned. But still I'm not able to control the sequence as Dylan72 pointed out.
The union all puts the contents of second file first and first file second.
Answers to Dylan72 question
1. Does each file only contain one "line" of data (one record?)
No. the fist file contains few hundred rows; the second file contains strictly one row (footer record)
2. Does either file have a carriage return at the end of the line already?
I used fixed width, {CR}(LF} for the flatfile destination.
3. Is the length of the data fixed (590) or variable?
The fist file is fixed 590, the second is 42 but I defined the output column width as 590
for the second file, so that both the files merge fine.
I know this is an odd request but that's how the vendor needs it.
Let me quickly summarize what I'm doing. To cut long story short,
In step 1, after a typical ETL process, the records (590 length) is written out to
a destination flat file (fixed width (now changed to ragged right), {CR}(LF}, column out put defined as 590). This step works well. I got the out put that I needed.
In Step2, vendor wants to add a footer record which is in the format
<20 Z's><record count, 11 positions><9's 11position> So a typical footer record
will look like:
ZZZZZZZZZZZZZZZZZZZZ0000000876599999999999
This step also works great, I got the desired output. The destination flat file for step2 is defined as the same like step1 (fixed with (now changed to ragged right), {CR}(LF}, column out put defined as 590)
So I got both the files in a way I want it.
Now I have to join both the text files so that contents of the first file appears first and the
footer record file (second file) is appended to the first file.
I used Union all to do this join, but not able to control the sequencing, always the footer record (second file) shows up first.
I hope I explained it clearly what I'm doing.
I will keep trying different things.
If anyone has a better approach let me know.
Thanks again Dylan72 and Jwelch for the valuable inputs.
-Sri
|||
Two ways I can think of to do this. One Dylan72 has already suggested - use two dataflows, one to process the first set of rows, and the second set to append the final row.
Two, if you really want to do this in one flow, use a Derived Column transform to add a column to both input files in the data flow. Set the column to a value of 1 for the first file, and a value of 2 for the second one. Run both through the Union All, then run the output of that through a Sort transform, using the new column. Then they will be in the proper order to write to the flat file. Just ignore the sort order column when mapping the columns in the flat file destination.
|||Another approach is to use a script component to join the text files. This gives you the most control over the results. It requires some Visual Basic.net coding.
Here is an article demonstrating how to create a script source component (scroll down to the flat file example): http://technet.microsoft.com/en-us/library/ms136060.aspx