Showing posts with label details. Show all posts
Showing posts with label details. Show all posts

Tuesday, March 20, 2012

Asterix not showing in report details

I have a report that shows a header, details and a footer

The detail line never prints lines with asterixes in them, e.g.

"**blah blah**"

As soon as I delete the asterix from the database, the line appears on the report

Any ideas anyone?

to clarify

are you saying:

you have a value in the database that contains the text "** blah blah **"

when you run the report, only "blah blah" is rendered in the row and not "** blah blah **"

?|||

It does not print the line at all, also additionally the problem seems to be caused only by the asterix at the start of the line

so when I would expect the report to show:

Header

detail1

detail2

*blah blah

detai*l4

Footer

The report actually omits the line "*blah blah" and prints this instead:

Header

detail1

detail2

detai*l4

Footer

|||

Interesting... but I am not able to repro this in a simple case (ie an expression such as ="****" prints fine).

So here are some questions:

* -- does the disappearing line occur in all output targets? Or only some (such as HTML versus Excel)?

* -- what does the expression for your detail column look like?

>L<

|||

To reproduce this you will have to query an sql database

The detail row of the table contains:

=Last(Fields!Case_SolutionNote.Value)

|||

no, I still can't repro it. I tried a simple version (without the Last) and also one with a Last() function. I could see it fine.

What else do I have to know about your Case_SolutionNote field? What type is it? How long are the typical values? Can you post some example values (with and without * character)?

>L<

|||

Interestingly, I also get a problem with the report's group footer section, it sometimes does not print at all either, I have not worked out why yet, but I suspect it is the presence of non alphanumeric characters in the relevant database field (which is an ntext data type)

I copied the contents of the field to notepad, deleted the contents of the field from the database, then used the 'update' statement (due to bug that prevents editing of ntext cells sometimes in microsoft sql server management studio) to repopulate it with a copy of the original text from notepad, it then shows on the report

I think there is a weakness somewhere in ntext data types in sql or reporting services relating to non alphanumeric characters

|||

Oh, also...

When I delete the report's group header/footer, leaving just a basic report with detail lines, the original problem dissappears - lines with asterixes at the beginning of them appear!!

ie the report prints correctly, e.g:

detail1

detail2

*blah blah

detai*l4

also...

if i have a group header/footer present, the group footer will print lines starting with asterixes but the detail lines do not

|||

When you copy the value of the field to Notepad and back, and then using the UPDATE statement you may not be preserving the Unicode characteristics of the string. It's hard to tell, because the clipboard buffer, the way you've stated the UPDATE, and the way the interactive query-handling facility in Studio would all be involved in interpreting that data <s>.

Point is, it is not a fair test...

>L<

|||

I wish I could be absolutely sure that your report logic isn't doing something to influence is -- forgive me, I don't mean to doubt you -- it's just that you have the Last() function in there....

IOW, I can't tell whether the lines you're expecting are missing because of what you've pinpointed (the asterisk) or some other factor, such as the sort/group/whatever changing what Last() decides should come up.

Without repro'ing more of your exact scenario I can't debug, reproduce your error.. or otherwise offer advice... sorry

>L<

|||

Hi thanks for you help Smile

Regarding the second problem where the group footer was not displaying sometimes, I have worked around this by adding a space to the beginning of the data on the fly in the select statement in the report - note this only works in testing on sql server 2005 (unfortunately varchar(max) does not work in sql server 2000 where my database lives! Sad )

ie i changed this:

select....., CaseProgress.Case_SolutionNote, .......

to

select....., (cast(' ' as varchar(max)) + cast(CaseProgress.Case_SolutionNote as varchar(max))) as Case_SolutionNote, .......

What this does is to populate the field if it was null in any rows - bear in mind i am using Last!(CaseProgress.Case_SolutionNote) and the last row is usually not empty but was not printing if prior rows had a 'null' in the field - wierd

The original problem with the aterix still stands

My hunch about alphanumeric characters was a red-herring i think

|||

Actually a slightly better workaround for the second problem is:

select..,isnull(CaseProgress.Case_SolutionNote, ' ') Case_SolutionNote,...

|||

>>The original problem with the aterix still stands

Unfortunately I think I can't go any further to help without being able to repro.

I created a table with an ntext column. I replaced the data in each even-numbered row with "*" + the data. I used the Last() function. I tried it on a details level and a group level. Still worked.

I'd be willing to look at your report, if you thought it would do any good... but I still think it may be something data related, even though I don't know why or how...

>> My hunch about alphanumeric characters was a red-herring i think

Yes, I'm sure of that...

>L<

|||

Fixed:

The filter on the detail line of the report was causing the problem, I changed the filter on the detail line to this:

=len(trim(Fields!Case_ProgressNote.Value)) > =0

(i.e. ignore blank entries)

note Case_ProgressNote.Value is ntext in the database, but by the time it gets to the layout it has been converted to text (the fact that it was ntext is irrelevant at this point)

Asterix not showing in report details

I have a report that shows a header, details and a footer

The detail line never prints lines with asterixes in them, e.g.

"**blah blah**"

As soon as I delete the asterix from the database, the line appears on the report

Any ideas anyone?

to clarify

are you saying:

you have a value in the database that contains the text "** blah blah **"

when you run the report, only "blah blah" is rendered in the row and not "** blah blah **"

?|||

It does not print the line at all, also additionally the problem seems to be caused only by the asterix at the start of the line

so when I would expect the report to show:

Header

detail1

detail2

*blah blah

detai*l4

Footer

The report actually omits the line "*blah blah" and prints this instead:

Header

detail1

detail2

detai*l4

Footer

|||

Interesting... but I am not able to repro this in a simple case (ie an expression such as ="****" prints fine).

So here are some questions:

* -- does the disappearing line occur in all output targets? Or only some (such as HTML versus Excel)?

* -- what does the expression for your detail column look like?

>L<

|||

To reproduce this you will have to query an sql database

The detail row of the table contains:

=Last(Fields!Case_SolutionNote.Value)

|||

no, I still can't repro it. I tried a simple version (without the Last) and also one with a Last() function. I could see it fine.

What else do I have to know about your Case_SolutionNote field? What type is it? How long are the typical values? Can you post some example values (with and without * character)?

>L<

|||

Interestingly, I also get a problem with the report's group footer section, it sometimes does not print at all either, I have not worked out why yet, but I suspect it is the presence of non alphanumeric characters in the relevant database field (which is an ntext data type)

I copied the contents of the field to notepad, deleted the contents of the field from the database, then used the 'update' statement (due to bug that prevents editing of ntext cells sometimes in microsoft sql server management studio) to repopulate it with a copy of the original text from notepad, it then shows on the report

I think there is a weakness somewhere in ntext data types in sql or reporting services relating to non alphanumeric characters

|||

Oh, also...

When I delete the report's group header/footer, leaving just a basic report with detail lines, the original problem dissappears - lines with asterixes at the beginning of them appear!!

ie the report prints correctly, e.g:

detail1

detail2

*blah blah

detai*l4

also...

if i have a group header/footer present, the group footer will print lines starting with asterixes but the detail lines do not

|||

When you copy the value of the field to Notepad and back, and then using the UPDATE statement you may not be preserving the Unicode characteristics of the string. It's hard to tell, because the clipboard buffer, the way you've stated the UPDATE, and the way the interactive query-handling facility in Studio would all be involved in interpreting that data <s>.

Point is, it is not a fair test...

>L<

|||

I wish I could be absolutely sure that your report logic isn't doing something to influence is -- forgive me, I don't mean to doubt you -- it's just that you have the Last() function in there....

IOW, I can't tell whether the lines you're expecting are missing because of what you've pinpointed (the asterisk) or some other factor, such as the sort/group/whatever changing what Last() decides should come up.

Without repro'ing more of your exact scenario I can't debug, reproduce your error.. or otherwise offer advice... sorry

>L<

|||

Hi thanks for you help Smile

Regarding the second problem where the group footer was not displaying sometimes, I have worked around this by adding a space to the beginning of the data on the fly in the select statement in the report - note this only works in testing on sql server 2005 (unfortunately varchar(max) does not work in sql server 2000 where my database lives! Sad )

ie i changed this:

select....., CaseProgress.Case_SolutionNote, .......

to

select....., (cast(' ' as varchar(max)) + cast(CaseProgress.Case_SolutionNote as varchar(max))) as Case_SolutionNote, .......

What this does is to populate the field if it was null in any rows - bear in mind i am using Last!(CaseProgress.Case_SolutionNote) and the last row is usually not empty but was not printing if prior rows had a 'null' in the field - wierd

The original problem with the aterix still stands

My hunch about alphanumeric characters was a red-herring i think

|||

Actually a slightly better workaround for the second problem is:

select..,isnull(CaseProgress.Case_SolutionNote,' ') Case_SolutionNote,...

|||

>>The original problem with the aterix still stands

Unfortunately I think I can't go any further to help without being able to repro.

I created a table with an ntext column. I replaced the data in each even-numbered row with "*" + the data. I used the Last() function. I tried it on a details level and a group level. Still worked.

I'd be willing to look at your report, if you thought it would do any good... but I still think it may be something data related, even though I don't know why or how...

>> My hunch about alphanumeric characters was a red-herring i think

Yes, I'm sure of that...

>L<

|||

Fixed:

The filter on the detail line of the report was causing the problem, I changed the filter on the detail line to this:

=len(trim(Fields!Case_ProgressNote.Value)) > =0

(i.e. ignore blank entries)

note Case_ProgressNote.Value is ntext in the database, but by the time it gets to the layout it has been converted to text (the fact that it was ntext is irrelevant at this point)

Asterix not showing in report details

I have a report that shows a header, details and a footer

The detail line never prints lines with asterixes in them, e.g.

"**blah blah**"

As soon as I delete the asterix from the database, the line appears on the report

Any ideas anyone?

to clarify

are you saying:

you have a value in the database that contains the text "** blah blah **"

when you run the report, only "blah blah" is rendered in the row and not "** blah blah **"

?|||

It does not print the line at all, also additionally the problem seems to be caused only by the asterix at the start of the line

so when I would expect the report to show:

Header

detail1

detail2

*blah blah

detai*l4

Footer

The report actually omits the line "*blah blah" and prints this instead:

Header

detail1

detail2

detai*l4

Footer

|||

Interesting... but I am not able to repro this in a simple case (ie an expression such as ="****" prints fine).

So here are some questions:

* -- does the disappearing line occur in all output targets? Or only some (such as HTML versus Excel)?

* -- what does the expression for your detail column look like?

>L<

|||

To reproduce this you will have to query an sql database

The detail row of the table contains:

=Last(Fields!Case_SolutionNote.Value)

|||

no, I still can't repro it. I tried a simple version (without the Last) and also one with a Last() function. I could see it fine.

What else do I have to know about your Case_SolutionNote field? What type is it? How long are the typical values? Can you post some example values (with and without * character)?

>L<

|||

Interestingly, I also get a problem with the report's group footer section, it sometimes does not print at all either, I have not worked out why yet, but I suspect it is the presence of non alphanumeric characters in the relevant database field (which is an ntext data type)

I copied the contents of the field to notepad, deleted the contents of the field from the database, then used the 'update' statement (due to bug that prevents editing of ntext cells sometimes in microsoft sql server management studio) to repopulate it with a copy of the original text from notepad, it then shows on the report

I think there is a weakness somewhere in ntext data types in sql or reporting services relating to non alphanumeric characters

|||

Oh, also...

When I delete the report's group header/footer, leaving just a basic report with detail lines, the original problem dissappears - lines with asterixes at the beginning of them appear!!

ie the report prints correctly, e.g:

detail1

detail2

*blah blah

detai*l4

also...

if i have a group header/footer present, the group footer will print lines starting with asterixes but the detail lines do not

|||

When you copy the value of the field to Notepad and back, and then using the UPDATE statement you may not be preserving the Unicode characteristics of the string. It's hard to tell, because the clipboard buffer, the way you've stated the UPDATE, and the way the interactive query-handling facility in Studio would all be involved in interpreting that data <s>.

Point is, it is not a fair test...

>L<

|||

I wish I could be absolutely sure that your report logic isn't doing something to influence is -- forgive me, I don't mean to doubt you -- it's just that you have the Last() function in there....

IOW, I can't tell whether the lines you're expecting are missing because of what you've pinpointed (the asterisk) or some other factor, such as the sort/group/whatever changing what Last() decides should come up.

Without repro'ing more of your exact scenario I can't debug, reproduce your error.. or otherwise offer advice... sorry

>L<

|||

Hi thanks for you help Smile

Regarding the second problem where the group footer was not displaying sometimes, I have worked around this by adding a space to the beginning of the data on the fly in the select statement in the report - note this only works in testing on sql server 2005 (unfortunately varchar(max) does not work in sql server 2000 where my database lives! Sad )

ie i changed this:

select....., CaseProgress.Case_SolutionNote, .......

to

select....., (cast(' ' as varchar(max)) + cast(CaseProgress.Case_SolutionNote as varchar(max))) as Case_SolutionNote, .......

What this does is to populate the field if it was null in any rows - bear in mind i am using Last!(CaseProgress.Case_SolutionNote) and the last row is usually not empty but was not printing if prior rows had a 'null' in the field - wierd

The original problem with the aterix still stands

My hunch about alphanumeric characters was a red-herring i think

|||

Actually a slightly better workaround for the second problem is:

select..,isnull(CaseProgress.Case_SolutionNote,' ') Case_SolutionNote,...

|||

>>The original problem with the aterix still stands

Unfortunately I think I can't go any further to help without being able to repro.

I created a table with an ntext column. I replaced the data in each even-numbered row with "*" + the data. I used the Last() function. I tried it on a details level and a group level. Still worked.

I'd be willing to look at your report, if you thought it would do any good... but I still think it may be something data related, even though I don't know why or how...

>> My hunch about alphanumeric characters was a red-herring i think

Yes, I'm sure of that...

>L<

|||

Fixed:

The filter on the detail line of the report was causing the problem, I changed the filter on the detail line to this:

=len(trim(Fields!Case_ProgressNote.Value)) > =0

(i.e. ignore blank entries)

note Case_ProgressNote.Value is ntext in the database, but by the time it gets to the layout it has been converted to text (the fact that it was ntext is irrelevant at this point)

sql

Sunday, March 11, 2012

Assigning Passwords to Connection Managers using Expressions

Hi Experts here,

Sorry if this query had been raised earlier. While In DTS Packages we retrieve connection details for all Connections in a Package from a table and then assign them to the following global Variables

gv_Source_User, gv_Source_Pwd, gv_Source_DataSource, gv_Source_InitialCatalog

Finally we reassign these variables to repective Connection Properties using Dynamic Properties Task. After Migrating to SSIS though we are able to assign almost all variables to Properties of Connection Managers via Expression except the Password which we donot find in the drop down list in order to assign gv_Source_Pwd.

Is there any work around to assign passwords dynamically?

Many Thanks

Subhash Subramanyam

Hi, Was also thinking if we can go about using script task to do the same ..

|||No, you can't use script. You can assemble the complete connection string (with password) in an expression-based variable and then assign that to the ConnectionString property through an expression on the connection manager.

See www.connectionstrings.com if you need help building the string.
|||

Many Thanks to JayH.

I already had this in my mind yesterday with a bit of confusion - How to work out the code which uses Different connection Managers (what if it was Oracle). i.e. the Connection string built will be of different format .

A question for you is: Though the security can be compromised from Value set to ConnectionString, Why Password property hasn't been added in the dropdown list?

e.g. SQL OLEDB Connection, Data Source=Serverxyz;User ID=sa;Initial Catalog=PUBS_CATALOG;Provider=SQLOLEDB;Persist Security Info=True;

For Oracle, First Manually provide all the details, so that ConnectionString will be built on Connection Manager Properties. This seems really a burden that we must manually verify every derived connectionstring if it can successfully connect.

Many Thanks once again

Subhash Subramanyam

Thursday, February 9, 2012

asp.net

I have a file that has details as,

name :- name@.xx.com
subject :- xxxxxxxxxxxx
date :- dd-mm-yyyy
:
:

I need to read that file and enter those detials in to a sql database table.The table has three columns seperately to take those data as name,subject and date.

I need c sharp code for that.At least give it a go, it's not that hard. Have a read of ADO.NET. Granted this is a forum to help people but I, for one, am not simply going to do your job.