Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using an RDL

Status
Not open for further replies.

pk400i

MIS
Feb 10, 2009
102
US
I have a template from someone else, an RDL that is loosly modeled on one of my reports. This is called Report1.RDL

There is an error when I double click on Report1.RDL
"One or more errors encountered while loading the designer. Data at the root level is invalid. Line 1 position 1."

this is the xml for the Datasource:

"<DataSources>
<DataSource Name="DataSource1">
<DataSourceReference>DataSource1</DataSourceReference>
<rd:DataSourceID>af20beb0-8840-4d0f-aa15-d30c93ffb9a4</rd:DataSourceID>
</DataSource>
</DataSources>

I want to change the Datasource? I guess to the Testserver/2005 and the database as pbs.

Can someone show me how to make this change and is this in fact what is needed to do?
 
Is the datasource this uses no longer valid? The best place I use to change the datasource is in Visual Studio. You can use the "Data" tab in VS 2005 or there's also a "Datasets" tab on the left you can see them on. Is that what you are looking for?
Brett

--------------------------
Web/.net Programmer & DBA
Central PA
 
On the dataset there is an SQL statement that selects the records although it is in a test mode, there would have to be parameters eventually. Run I hit preview there is an error: " An error occurred during local report processing. The item /Datasource1 cannot be found"

SELECT
IV00101.ITMGEDSC,
IV00101.ITEMDESC,
RM00101.CUSTNAME,
RM00101.CPRCSTNM,
IV40600.UserCatLongDescr,
CATS.UserCatLongDescr,
SOP10200.ITEMNMBR,
SOP10200.SOPNUMBE,
SOP10200.QUANTITY,
SOP10200.OXTNDPRC,
SOP10200.SOPTYPE,
SOP10100.DOCDATE,
'Current' as source

FROM ((((SOP10200
SOP10200 INNER JOIN IV00101 IV00101 ON
SOP10200.ITEMNMBR=IV00101.ITEMNMBR)

INNER JOIN
SOP10100 SOP10100 ON
(SOP10200.SOPTYPE=SOP10100.SOPTYPE) AND
(SOP10200.SOPNUMBE=SOP10100.SOPNUMBE))

INNER JOIN
IV40600 IV40600 ON
IV00101.ITMGEDSC=IV40600.USCATVAL)

INNER JOIN
IV40600 CATS ON
IV00101.USCATVLS_2=CATS.USCATVAL)

INNER JOIN
RM00101 RM00101 ON
SOP10100.CUSTNMBR=RM00101.CUSTNMBR Where SOP10100.DOCDATE between '01-apr-2009' and '30-Apr-2009'

UNION ALL

SELECT
IV00101.ITMGEDSC,
IV00101.ITEMDESC,
RM00101.CUSTNAME,
RM00101.CPRCSTNM,
IV40600.UserCatLongDescr,
CATS.UserCatLongDescr,
SOP30300.ITEMNMBR,
SOP30300.SOPNUMBE,
SOP30300.QUANTITY,
SOP30300.OXTNDPRC,
SOP30300.SOPTYPE,
SOP30200.DOCDATE,
'History' as source

FROM ((((SOP30300
SOP30300 LEFT OUTER JOIN IV00101 IV00101 ON
SOP30300.ITEMNMBR=IV00101.ITEMNMBR)

INNER JOIN
SOP30200 SOP30200 ON
(SOP30300.SOPTYPE=SOP30200.SOPTYPE) AND
(SOP30300.SOPNUMBE=SOP30200.SOPNUMBE))

LEFT OUTER JOIN
IV40600 IV40600 ON
IV00101.ITMGEDSC=IV40600.USCATVAL)

LEFT OUTER JOIN
IV40600 CATS ON
IV00101.USCATVLS_2=CATS.USCATVAL)

INNER JOIN
RM00101 RM00101 ON
SOP30200.CUSTNMBR=RM00101.CUSTNMBR
Where SOP30200.DOCDATE between '01-apr-2009' and '30-Apr-2009'
 
Where I said to add it, you will have to add a dataset called DataSource1. In there you will tell it the name of the database, table, and credentials. The query itself is kind of useless to the report until you give it these things first. Make sense?
Brett

--------------------------
Web/.net Programmer & DBA
Central PA
 
yes it makes sense, I am not sure how to enter this connection information after the fact, after the RDL is existing. I can enter this connection info from scratch, is that what to do, start it over, enter the connection info, then bring in the RDL?
 
Weird. Not sure what to tell you without seeing it. It might be best to make a backup and start with making a dataset from scratch and then add in the query. I wish I could be of more help!!

--------------------------
Web/.net Programmer & DBA
Central PA
 
Sounds like its looking for a shared data source - as you can see it has a reference as well as a name:

<rd:DataSourceID>af20beb0-8840-4d0f-aa15-d30c93ffb9a4</rd:DataSourceID>

Even if you create a data source called DataSource1, it will not have this ID

You need to create a new shared data source in the project, bring in the rdl file, open it (it will error) then go to the "Data" tab and associate the report with the new data source

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top