Showing posts with label cant. Show all posts
Showing posts with label cant. Show all posts

Monday, March 12, 2012

report builder cant join views?

Hi friends
i have quick question with report builder utility .am using VS2005 and Sql 2005.
When creating report model solution ,when adding field names from a table it loads fields names as it is ,right ? so to make end users life easier i created
Views with lengthy field names.

the issue is ,i'll start with an example ,i've 2 views (ParentView and ChildView) and the tables used by these views have foreign key relation ship .when i use these 2 entities in report builder as soon as i add a column from one view (say ParentView) the other view disappears from list !! I assume Report builder looks FKey to link 2 entities and since am using views which will not have any fkeys on them it removes other entities from list.
is there any way to link these 2 views so that users can add few columns from ParentView and few more from ChildView.
Yes, If i use tables directly everything works fine .
Thanks for your help.
i finally figured out .if any one interested
when we double click on data source view (in report model project you created) it gives graphical representation of objects where we can drag & drop to create relationships just like diagrams in Enterprise Managers

report builder cant join views?

Hi friends
i have quick question with report builder utility .am using VS2005 and Sql 2005.
When creating report model solution ,when adding field names from a table it loads fields names as it is ,right ? so to make end users life easier i created
Views with lengthy field names.

the issue is ,i'll start with an example ,i've 2 views (ParentView and ChildView) and the tables used by these views have foreign key relation ship .when i use these 2 entities in report builder as soon as i add a column from one view (say ParentView) the other view disappears from list !! I assume Report builder looks FKey to link 2 entities and since am using views which will not have any fkeys on them it removes other entities from list.
is there any way to link these 2 views so that users can add few columns from ParentView and few more from ChildView.
Yes, If i use tables directly everything works fine .
Thanks for your help.
i finally figured out .if any one interested
when we double click on data source view (in report model project you created) it gives graphical representation of objects where we can drag & drop to create relationships just like diagrams in Enterprise Managers

Wednesday, March 7, 2012

Report Builder - Can't see Report Builder button

While logged in locally at the server running Reporting Services I can see
the "Report Builder" option on the menu bar but when I access the server from
another machine in the network the "Report Builder" option is not available.
I gave myself rights to every single option under security but can't run the
Report Builder. Any idears?Hi,
I think you have given from Management studio?. Try from your
"http://<server>/reports" replace <server> with your server name.
Go to Home->properties and try giving your login and select content Manager
and see whether you are getting "Report Model" option.
Amarnath
"SYoung" wrote:
> While logged in locally at the server running Reporting Services I can see
> the "Report Builder" option on the menu bar but when I access the server from
> another machine in the network the "Report Builder" option is not available.
> I gave myself rights to every single option under security but can't run the
> Report Builder. Any idears?|||Found the answer. You need to be logged in as "Administrator". Go to "Site
Settings" > "Configure site-wide security" > "New Role Assignment" > check
the "System User" checkbox & add the user name or group name in the textbox.
Click "OK" and that's it.
"SYoung" wrote:
> While logged in locally at the server running Reporting Services I can see
> the "Report Builder" option on the menu bar but when I access the server from
> another machine in the network the "Report Builder" option is not available.
> I gave myself rights to every single option under security but can't run the
> Report Builder. Any idears?

Report Builder - Can't Deploy

I am having a problem deploying a report. My target server url is
http://localhost/vbreports. I can get to this site with no problem. When I
deploy my report I get the error "A connection could not be made to the
report server http://localhost/vbreports".
Any help would be appreciated.
RobOn Mar 18, 6:31 am, Rob <R...@.discussions.microsoft.com> wrote:
> I am having a problem deploying a report. My target server url ishttp://localhost/vbreports. I can get to this site with no problem. When I
> deploy my report I get the error "A connection could not be made to the
> report serverhttp://localhost/vbreports".
> Any help would be appreciated.
> Rob
That is the url to access report manager application.
Reports are deployed to the reportserver application, typically
http://localhost/reportserver, or in your case, maybe http://localhost/vbreportserver
Rowen McDermott|||Thank you. Now I can deploy but the IE screen for the reportserver shows a
wierd screen. It shows a directory view and when I click on my models and
click on the model that I deployed I see the xml code instead of it running
the report builder. Any suggestions?
Thanks,
Rob
"Rowen" wrote:
> On Mar 18, 6:31 am, Rob <R...@.discussions.microsoft.com> wrote:
> > I am having a problem deploying a report. My target server url ishttp://localhost/vbreports. I can get to this site with no problem. When I
> > deploy my report I get the error "A connection could not be made to the
> > report serverhttp://localhost/vbreports".
> >
> > Any help would be appreciated.
> >
> > Rob
> That is the url to access report manager application.
> Reports are deployed to the reportserver application, typically
> http://localhost/reportserver, or in your case, maybe http://localhost/vbreportserver
> Rowen McDermott
>|||On Mar 21, 11:24 am, Rob <R...@.discussions.microsoft.com> wrote:
> Thank you. Now I can deploy but the IE screen for the reportserver shows a
> wierd screen. It shows a directory view and when I click on my models and
> click on the model that I deployed I see the xml code instead of it running
> the report builder. Any suggestions?
> Thanks,
> Rob
>
It sounds like you are getting confused between the report server
application and the report manager application. Both are installed
with reporting services.
The report server application 'http://localhost/reportserver' is the
primary application and includes a web service interface which can be
used to view reports. Reports are deployed to this application via the
web service.
The Report Manager application 'http://softwareserver/Reports/' is an
interface to the above web service that allows report viewing in a
more friendly manner. It is from here that you run report builder.
Rowen|||Thanks Rowen. I discovered my error last night. I can now deploy my model.
But when I open the report builder and choose my model I get the error: The
selected data source does not have any content available. I have checked the
table in the SQL database and there are records.
"Rowen" wrote:
> On Mar 21, 11:24 am, Rob <R...@.discussions.microsoft.com> wrote:
> > Thank you. Now I can deploy but the IE screen for the reportserver shows a
> > wierd screen. It shows a directory view and when I click on my models and
> > click on the model that I deployed I see the xml code instead of it running
> > the report builder. Any suggestions?
> >
> > Thanks,
> >
> > Rob
> >
> It sounds like you are getting confused between the report server
> application and the report manager application. Both are installed
> with reporting services.
> The report server application 'http://localhost/reportserver' is the
> primary application and includes a web service interface which can be
> used to view reports. Reports are deployed to this application via the
> web service.
> The Report Manager application 'http://softwareserver/Reports/' is an
> interface to the above web service that allows report viewing in a
> more friendly manner. It is from here that you run report builder.
> Rowen
>

Saturday, February 25, 2012

Reporint the last entry...

Hi,
OK, Im somewhat new to writing SQL queries and came across a problem that seems like it should be easy, but I cant figure out how to do this.
I have 2 tables with a 1 to many relationships.
The many table has a text field and a date field.
I want to report the last (most recent) row added to the 2nd table, by linking the two tables and somehow showing the last text field entered.
How can I do this?

ThanksYou can use a timestamp field in your 'many' table and use a MAX(ts_field) in your query, you will find more information on that topic in BOL.|||OK,
I must be missing something...
Here is the code for the 2nd table:

SELECT MAX(date), memo
FROM TABLE2
GROUP by memo

This does not work... how can I insure I select only the MAX date?

Thanks|||timestamp is an internal type that uses a code for each row, the higher ts mark is, the earlier insert/update was done.
So, add another field to your many table (ts_field timestamp) and perform some inserts/updates and use ts_field as any other field, lets say SELECT * FROM MANY ORDER BY TS_FIELD must show your records in updated/inserted order, ok?|||That gives me the records in order, however, I want on my 'report' only the most recent entry for each linked item between the two tables.
So if I have a quote number in table1 and 5 rows that have the same quote number in table2, I want in my join to create only once record-set that will include table1 values and the last record from table2.

Thanks|||try:

select value_field, max(date_field)
from many
where timestamp_field = (select max(timestamp_field)
from many m
where many.value_field = m.value_field)
group by value_field

note that max(date_field) has nothing to do with timestamp, is just like min(date_field) because the group by clause.

the trick is in the timestamp field.

later you can add the ONE table.|||Bad design=bad result. Why are you using 1:N when you need 1:1 ?
Use TR on {active table} to track changes to {audit table}.

/*
"OneTable" - "id" PK
"ManyTable" - "newid" PK,"id", "text", "date"
*/

select m."id",xx."date",xx."newid",m."text",o.*
from "OneTable" o
join "ManyTable" m on o."id"=m."id"
join
(
select m."id",x."date","newid"=max("newid")
from "ManyTable" m
join
(
select "id","date"=max("date")
from "ManyTable"
group by "id"
) x on m."id"=xx."id"
) xx on m."newid"=xx."newid"

This query is designed for more non-sorting columns than 1 ("text")
Not tested. Post creating query.|||OK,
Im thick today
I could not follow the advice.
Here is a part of the code Im trying to use. I have included the main table (QuoteMaster) with joins to two other tables (In reality there are several other joins all from the main table).
The QUOTE is a unique key in the main table and repeats in the QuoteNotes table.
The date field is a date/time stamp.
Im trying to get a single record-set for each quote that will have the latest MEMO field from the QuoteNotes table. There arent entries in the notes table for each quote, but they may repeat

---
Here is the code:

---
SELECT QuoteMaster.Quote, QuoteMaster.CustID,
QuoteNotes.Memo, QuoteNotes.Date,
[Product Group].PDescr
FROM QuoteMaster LEFT OUTER JOIN
[Product Group] ON
QuoteMaster.ProdGrp = [Product Group].ProdGrp LEFT OUTER
JOIN
QuoteNotes ON
QuoteMaster.Quote = QuoteNotes.Quote|||1. I wrote "Not tested. Post creating query." and you have posted nothing. I mean DDL script (CREATE TABLES, PK, FK).
I still do not know, what PK has your QuoteNotes. (Quote,"date"),(Quote,"date",Memo) are near candidate keys,
but can duplicities be there? Should I reverse engineer your design?

2. So I assume QuoteNotes PK(Quote,"date")

CREATE TABLE [Product Group] (ProdGrp int primary key,PDescr varchar(8000))
CREATE TABLE QuoteMaster(Quote int primary key,CustID int null,ProdGrp int null
,foreign key (ProdGrp) references [Product Group](ProdGrp))
CREATE TABLE QuoteNotes (Quote int not null,"date" datetime not null,Memo varchar(8000) not null
,primary key (Quote,"date"),foreign key (Quote) references QuoteMaster(Quote))

SELECT qm.Quote, qm.CustID, qn2.Memo, qn2."Date", pg.PDescr
from QuoteMaster qm
left join QuoteNotes qn2 on qm.Quote=qn2.Quote
left join
(
select qn1.Quote,"date"=max(qn1."date")
from QuoteNotes qn1
group by qn1.Quote
) X on qn2.Quote=X.Quote and qn2."date"=X."date"
left join [Product Group] pg on qm.ProdGrp = pg.ProdGrp

Tuesday, February 21, 2012

Replication. Cant delete rows

Hi All.

I have the folling replication issue:

BD1 > BD0
Replicate with filter

BD2 > BD0
Replicate with filter

BD3

Four data bases BD0,BD1,BD2,BD3
In BD1 y BD2 there are two merged publications subscribed continuous in BD0.
The publications are defined as insert only and allow changes in the subscriber. Everything works perfectly. The records replicate immediately. In BD0 you can insert and modify records, however when I attemept to delete a record I get the following message:

error:

You can't insert a row with a duplicate key in the object 'dbo.MSmerge_tombstone' with unique index 'uc1MSmerge_tombstone'

Note: This is a translation of the original error message in Spanish below.

No se puede insertar una fila de clave duplicada en el objeto
'dbo.MSmerge_tombstone' con índice único 'uc1MSmerge_tombstone'

Cheers,

Have you defined multiple publications? i.e. a publication that is sent from BD0 to BD1 and a different publication that is sent from BD0 to BD2?