Terry,
I did try just a simple report with 3 fields from 1 table. I know there
was/is data in the table I was trying to create a report on. Started from
scratch (with a new form, new viewer...even tried selecting the form from
the smart tag for the CRViewer. I got nothing. It was then I tried, just
for the heck of it, to create a new connection in the Set DataSource
Location from the field explorer. When I noticed that connecting to an
Access/Excel file I could get data using the same form. Without changing
the properties of the fields. Now, I made another connection to connect to
a Jet/OLE DB and that also works. I can view this information by doing the
following. Right click on the Database Fields (from Field Explorer).
Select "Set Datasource Location". Click on the + next to report to expand.
Click on the + next to the database. Click on the + next to properties.
View the Database Type. If it is an ADO.NET Dataset or...from my current
locations "Inventory_management_databaseDataSet" I do not receive any data.
If I create a new connection as a Microsoft.Jet.OLEDB.4.0 Provider / OLE DB
(ADO) Database Type with a path such as "C:\Users\Tony\Documents\...." I can
view the difficult query you helped me on last week. It works GREAT...
Until I deploy to another laptop because the database is not in the same
location as on my laptop. (ps. I have a registry entry I programmed for if
the user wants to move the DB to another location. That is why I would
prefer my "current connection" under the Set Datasource Location. I hope
this explains my dilemma.
Again...thanks for the great info on the parameters. If you would like, you
can email me your email address, I can zip my solution and you can see my
messy code...but it does work.
Tony K
[quoted text, click to view] "Terry" <TerryL@nospam.nospam> wrote in message
news:525D7980-60B0-42E6-816B-D9233E04A60A@microsoft.com...
> Hi again Tony,
> I am not sure I understand the problem. Is CR not able to connect to
> the
> Db? Seems like you would get some error if that was the case. Are you
> sure
> you are setting your parameters corretly - sounds sort of like the query
> is
> running and returning an empty result set. Try doing a report that takes
> no
> parameters and see what happens. As I pointed out in a prior email, if it
> is
> a connection problem, maybe the way to go is to populate a dataset
> yourself
> and then have CR report on the DS and not go to the Db. If you create a
> dataset and add a tableadapter based on the query that CR is trying to
> run.
> There is a way in CR to change the datasource from the query to the DS
> (w/o
> having to redo the whole report). You could then fill the DS yourself and
> 'shove'it to CR so CR will never have to connect to the Db.
> BTW, I just started working with CR a couple of months ago - so I am no
> expert, but it sure beats the VB PrintDocument (to me anyways). I really
> struggled with it for the first month and was abut to &%% can it when I
> finally started getting somewhere. The documentation really sucks but if
> you
> stick with it - it will save you a lot of time in the long run.
> --
> Terry
>
>
> "Tony K" wrote:
>
>> Getting the former. Not the latter.
>>
>> As some of you may know (Terry...btw thanks for all your help), I have
>> been
>> battling a Crystal Reports problem. I have recently made the discovery
>> that
>> my "Current Connections" or ADO.NET options for the database expert in CR
>> are not working with my project.
>>
>> IF I create a new connection to my Access DB(DAO) or use OLE DB(ADO)
>> connection I will receive correct data (results) on my report for the
>> first
>> time. Whew Hoo! If I use my ADO.NET Dataset connection from my "Current
>> Connections" or from my project, I GET N-O-T-H-I-N-G. By 'nothing' I
>> mean
>> when the report is shown in the report viewer, not one piece of data
>> shows
>> up.
>>
>> I cannot use the ones that work unfortunately because when this entire
>> project is complete, the Access DB may reside on a network drive (ie.
>> M:\InventoryManagement.mdb) These paths that are created, I wouldn't
>> know
>> where to begin to modify them.
>>
>> How do I fix this $%^&*#@ problem??
>>
>>
>> Tony K
>>
Hi Tony,
Sorry, but I am still confused. Some of what you are talking about is at
design time and some is at run time. At design time, your DS won't have any
data in it to report on. But then if you are using a DS, why does CR need to
go to the Db? Don't you fill the DS in code yourself? You originally talked
about having a DGV of the data - does that work?
As far as moving to different machines, creating different paths to the
data, you can set the connection for the report at run time, as I just did a
little poking around to see - never have really done it since I am using SQL
server express.
Dim i As CrystalDecisions.Shared.IConnectionInfo =
myrpt.DataSourceConnections(0)
'you may have to fool with the right hand side to get the right connection -
2 more overloads
i.SetConnection(server, database, user, password)
HTH
--
Terry
[quoted text, click to view] "Tony K" wrote:
> Terry,
> I did try just a simple report with 3 fields from 1 table. I know there
> was/is data in the table I was trying to create a report on. Started from
> scratch (with a new form, new viewer...even tried selecting the form from
> the smart tag for the CRViewer. I got nothing. It was then I tried, just
> for the heck of it, to create a new connection in the Set DataSource
> Location from the field explorer. When I noticed that connecting to an
> Access/Excel file I could get data using the same form. Without changing
> the properties of the fields. Now, I made another connection to connect to
> a Jet/OLE DB and that also works. I can view this information by doing the
> following. Right click on the Database Fields (from Field Explorer).
> Select "Set Datasource Location". Click on the + next to report to expand.
> Click on the + next to the database. Click on the + next to properties.
> View the Database Type. If it is an ADO.NET Dataset or...from my current
> locations "Inventory_management_databaseDataSet" I do not receive any data.
> If I create a new connection as a Microsoft.Jet.OLEDB.4.0 Provider / OLE DB
> (ADO) Database Type with a path such as "C:\Users\Tony\Documents\...." I can
> view the difficult query you helped me on last week. It works GREAT...
> Until I deploy to another laptop because the database is not in the same
> location as on my laptop. (ps. I have a registry entry I programmed for if
> the user wants to move the DB to another location. That is why I would
> prefer my "current connection" under the Set Datasource Location. I hope
> this explains my dilemma.
>
> Again...thanks for the great info on the parameters. If you would like, you
> can email me your email address, I can zip my solution and you can see my
> messy code...but it does work.
>
> Tony K
>
>
> "Terry" <TerryL@nospam.nospam> wrote in message
> news:525D7980-60B0-42E6-816B-D9233E04A60A@microsoft.com...
> > Hi again Tony,
> > I am not sure I understand the problem. Is CR not able to connect to
> > the
> > Db? Seems like you would get some error if that was the case. Are you
> > sure
> > you are setting your parameters corretly - sounds sort of like the query
> > is
> > running and returning an empty result set. Try doing a report that takes
> > no
> > parameters and see what happens. As I pointed out in a prior email, if it
> > is
> > a connection problem, maybe the way to go is to populate a dataset
> > yourself
> > and then have CR report on the DS and not go to the Db. If you create a
> > dataset and add a tableadapter based on the query that CR is trying to
> > run.
> > There is a way in CR to change the datasource from the query to the DS
> > (w/o
> > having to redo the whole report). You could then fill the DS yourself and
> > 'shove'it to CR so CR will never have to connect to the Db.
> > BTW, I just started working with CR a couple of months ago - so I am no
> > expert, but it sure beats the VB PrintDocument (to me anyways). I really
> > struggled with it for the first month and was abut to &%% can it when I
> > finally started getting somewhere. The documentation really sucks but if
> > you
> > stick with it - it will save you a lot of time in the long run.
> > --
> > Terry
> >
> >
> > "Tony K" wrote:
> >
> >> Getting the former. Not the latter.
> >>
> >> As some of you may know (Terry...btw thanks for all your help), I have
> >> been
> >> battling a Crystal Reports problem. I have recently made the discovery
> >> that
> >> my "Current Connections" or ADO.NET options for the database expert in CR
> >> are not working with my project.
> >>
> >> IF I create a new connection to my Access DB(DAO) or use OLE DB(ADO)
> >> connection I will receive correct data (results) on my report for the
> >> first
> >> time. Whew Hoo! If I use my ADO.NET Dataset connection from my "Current
> >> Connections" or from my project, I GET N-O-T-H-I-N-G. By 'nothing' I
> >> mean
> >> when the report is shown in the report viewer, not one piece of data
> >> shows
> >> up.
> >>
> >> I cannot use the ones that work unfortunately because when this entire
> >> project is complete, the Access DB may reside on a network drive (ie.
> >> M:\InventoryManagement.mdb) These paths that are created, I wouldn't
> >> know
> >> where to begin to modify them.
> >>
> >> How do I fix this $%^&*#@ problem??
> >>
> >>
> >> Tony K
> >>
Don't see what you're looking for? Try a search.