Showing posts with label items. Show all posts
Showing posts with label items. Show all posts

Friday, March 30, 2012

problem in inner join

Hey,

I want to update the price in the items table to be equal to the corrosponding price in the books table but my problem is in the "on stmt", i cant set items.id=books.id because in the items table the id is saved as nvarcharex:b1234 where b identifies a book and in the books table it is saved as int as follows 1234 and this is the only primary key ! so how can i solve it and how can i write the query to update the price in the items table??

Thank you

Hiba

You can try to use some string functions to do so. Fo r example you can try RIGHT(items.id,4)=books.id if both ids' column is nvarchar column. Or

SUBSTRING( items.id, 2,LEN( items.id))=CONVERT(NVARCHAR,books.id)) if the books id is not nvarchar.

|||

Actually you can use RIGHT or SUBSTRING to get you data like RIGHT(book,4) if you are sure that your ID will be no longer then 4 digits or

if you know that you will always have 1 character to identify book you can use syntax like

where items.ID= LEFT(items.ID,1)+books.id

actually it is the same like using

where items.ID= SUBSTRING(items.ID,0,1)+books.id

Because Left just call substring to do its work.

Thanks

JPazgier

|||

hi.

are u familiar with adobc?

how can i use dataadapter using adobc?

my code is:

Dim sqldataadapter As New SqlClient.SqlDataAdapter(stringQuery, MyConn)
Dim ds As New DataSet()
Dim foundrow, temprow As DataRow
Dim ds2 As New DataSet
Dim temp_data_table As New DataTable
sqldataadapter.Fill(ds, "TT0001")

Dim sqldataadapter2 As New SqlClient.SqlDataAdapter(stringQuery2, MyConn)
sqldataadapter2.Fill(ds2, "tempo_db")
Dim date_ctr As Integer

but it doesnt accept sqlClient....what can u suggest?

|||

Hey, Anyways thank you but I sloved it in this way:

update

items

set

items.weight=books.weight,items.profit=books.profit,items.alldiscount=books.alldiscount

from

(booksjoin itemson'b'+cast(books.idAsnvarchar(12))=items.id)

where

items.center='lb'and items.ordernum>47000

Thanx

Hiba

Friday, March 9, 2012

Problem deploying custom report item. Items shows in preview screen in VS, but not in server dep

I have developed a custom report item that works fine in design and preview mode while in Visual Studio. I cannot get it to show up on my deployed reports. Here's what I have done so far:

1. Deployed the report using Visual Studio

2. updated the rsreportserver.config file with the following entry:

<ReportItems>
<ReportItem Name="PedigreeChart" Type="Uabr.Rap.PedigreeChart.PedigreeChartRenderer, Uabr.Rap.PedigreeChart" />
</ReportItems>

3. Updated the rssrvpolicy.config file with the following entry.

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Description="This code group grants Uabr.Rap.PedigreeChart.dll FUllTrust permission. ">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin\Uabr.Rap.PedigreeChart.dll" />
</CodeGroup>

I've also tried using the StrongNameMembershipCondition with no better results.

4. The dll and its dependencies are copied to the bin directory of the report server.

5. When I load a report with this custom report item on it, the report loads fine with no errors or warnings in the log file (even with verbose tracing). The area where the custom item should be is just white. It's almost like Reporting Services isn't registering the item correctly.

This is particularly frustrating because the report works fine in Visual Studio - apparently I configured that correctly. Any suggestions would be greatly appreciated. I'm stumped.

Hello,

I'm having the exact same problem that you describe. I am also stumped and was wondering if you've found a solution to this problem?

Thanks

|||I got it working, but I'm honestly not sure what I did to get it to work. I ended up granting all assemblies on the server fulltrust, which wasn't my preference but seemed to take care of the issue. However I'm still not sure if that was the item that fixed things. What I am sure about was that is was some configuration issue and not an assembly problem in my case because all I did was srcrew with the configuration for a while. It was a frustrating experience and I'm sorry I can't help more.|||

Hi,

I hab the same problem in the beginning. What solved it for me was that ALL assemblies being used by the CRI have to be trusted, including unmanaged C++ DLLs if there are any. First I listed each DLL but then I gave all my DLLs a strong name and now it works with only the strong name membership condition.

For debugging I enabled something named like 'assembly load logging' on the local report server. I also tried attaching to the worker process in order to read the debugging messages in VS if I remember that right.

Hth,

Thomas

Problem deploying custom report item. Items shows in preview screen in VS, but not in server dep

I have developed a custom report item that works fine in design and preview mode while in Visual Studio. I cannot get it to show up on my deployed reports. Here's what I have done so far:

1. Deployed the report using Visual Studio

2. updated the rsreportserver.config file with the following entry:

<ReportItems>
<ReportItem Name="PedigreeChart" Type="Uabr.Rap.PedigreeChart.PedigreeChartRenderer, Uabr.Rap.PedigreeChart" />
</ReportItems>

3. Updated the rssrvpolicy.config file with the following entry.

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Description="This code group grants Uabr.Rap.PedigreeChart.dll FUllTrust permission. ">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin\Uabr.Rap.PedigreeChart.dll" />
</CodeGroup>

I've also tried using the StrongNameMembershipCondition with no better results.

4. The dll and its dependencies are copied to the bin directory of the report server.

5. When I load a report with this custom report item on it, the report loads fine with no errors or warnings in the log file (even with verbose tracing). The area where the custom item should be is just white. It's almost like Reporting Services isn't registering the item correctly.

This is particularly frustrating because the report works fine in Visual Studio - apparently I configured that correctly. Any suggestions would be greatly appreciated. I'm stumped.

Hello,

I'm having the exact same problem that you describe. I am also stumped and was wondering if you've found a solution to this problem?

Thanks

|||I got it working, but I'm honestly not sure what I did to get it to work. I ended up granting all assemblies on the server fulltrust, which wasn't my preference but seemed to take care of the issue. However I'm still not sure if that was the item that fixed things. What I am sure about was that is was some configuration issue and not an assembly problem in my case because all I did was srcrew with the configuration for a while. It was a frustrating experience and I'm sorry I can't help more.|||

Hi,

I hab the same problem in the beginning. What solved it for me was that ALL assemblies being used by the CRI have to be trusted, including unmanaged C++ DLLs if there are any. First I listed each DLL but then I gave all my DLLs a strong name and now it works with only the strong name membership condition.

For debugging I enabled something named like 'assembly load logging' on the local report server. I also tried attaching to the worker process in order to read the debugging messages in VS if I remember that right.

Hth,

Thomas

Problem deploying custom report item. Items shows in preview screen in VS, but not in server dep

I have developed a custom report item that works fine in design and preview mode while in Visual Studio. I cannot get it to show up on my deployed reports. Here's what I have done so far:

1. Deployed the report using Visual Studio

2. updated the rsreportserver.config file with the following entry:

<ReportItems>
<ReportItem Name="PedigreeChart" Type="Uabr.Rap.PedigreeChart.PedigreeChartRenderer, Uabr.Rap.PedigreeChart" />
</ReportItems>

3. Updated the rssrvpolicy.config file with the following entry.

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Description="This code group grants Uabr.Rap.PedigreeChart.dll FUllTrust permission. ">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin\Uabr.Rap.PedigreeChart.dll" />
</CodeGroup>

I've also tried using the StrongNameMembershipCondition with no better results.

4. The dll and its dependencies are copied to the bin directory of the report server.

5. When I load a report with this custom report item on it, the report loads fine with no errors or warnings in the log file (even with verbose tracing). The area where the custom item should be is just white. It's almost like Reporting Services isn't registering the item correctly.

This is particularly frustrating because the report works fine in Visual Studio - apparently I configured that correctly. Any suggestions would be greatly appreciated. I'm stumped.

Hello,

I'm having the exact same problem that you describe. I am also stumped and was wondering if you've found a solution to this problem?

Thanks

|||I got it working, but I'm honestly not sure what I did to get it to work. I ended up granting all assemblies on the server fulltrust, which wasn't my preference but seemed to take care of the issue. However I'm still not sure if that was the item that fixed things. What I am sure about was that is was some configuration issue and not an assembly problem in my case because all I did was srcrew with the configuration for a while. It was a frustrating experience and I'm sorry I can't help more.|||

Hi,

I hab the same problem in the beginning. What solved it for me was that ALL assemblies being used by the CRI have to be trusted, including unmanaged C++ DLLs if there are any. First I listed each DLL but then I gave all my DLLs a strong name and now it works with only the strong name membership condition.

For debugging I enabled something named like 'assembly load logging' on the local report server. I also tried attaching to the worker process in order to read the debugging messages in VS if I remember that right.

Hth,

Thomas