|
-
Feb 23rd, 2006, 12:03 AM
#1
Thread Starter
Junior Member
reporting help
i am making this inventory program where the user can query the database...for example he can find out what items are used for this particular project for a given date span or who used those items..etc..he can even make his own sql...
but on the datareports and crystal reports i think you have to like make a template first of the report...that you have to specify the fields to be shown...but the user is given the flexibility on his queries so the fields may vary for each query...how do i make a report for that?
don't know if it makes sense but i want to have a sort of a dynamic report..where fields on the report would depend on the query of the user..
thanks
-
Feb 23rd, 2006, 12:30 AM
#2
New Member
Re: reporting help
hi,
you can make a query or views joining all the tables that you need and link it to your report.
in your vb code if you use a crystal report viewer control, you can manipulate the SQLQuery property depending on what you need..
for ex.:
if you want to display a particular product then your sqlstatement should be
cr.SQLQuery="SELECT * FROM yourView WHERE ProductName='" & txtProduct & "'"
and so on and so forth...
i just gave you one idea but there are several ways in solving your problem..
best regards,
saldiboy
-
Feb 23rd, 2006, 12:58 AM
#3
Thread Starter
Junior Member
Re: reporting help
tnx but would the layout of the report be ok? i mean..no overlapping of fields..etc? and what if i dont use cr? just asking...but i have Crystal reports 10...thanks for the reply...
-
Feb 23rd, 2006, 01:21 AM
#4
New Member
Re: reporting help
cr is the name of the crystal report control...
you can design your report on your own way, selecting your needed fields.. etc.
and save it as a rpt file.
then you can call it thru your vb code by using the crystal report control..
i haven't use crystal report 10 but i think the same principle will apply.
best regards,
saldiboy
-
Feb 23rd, 2006, 01:25 AM
#5
Thread Starter
Junior Member
Re: reporting help
the problem i have is what if the user just needed one field or lets say i designed the report with only 5 fields and the user's query is for 7 fields...now how do i solve that one?
and yeah...i know what cr means..but what i meant is are there any other way aside from crystal reports? just to keep my options open
-
Feb 23rd, 2006, 06:41 AM
#6
Re: reporting help
Crystal Reports is just one of several options.
You can design and run Access reports from VB. There are other third party report generators as well, like Report Writer.
You might want to take a look at these links that were returned by Google when I searched the subject of reporting.
What are you using for a front end by the way?
VB6?
VB.NET?
C#?
-
Feb 23rd, 2006, 06:55 AM
#7
Thread Starter
Junior Member
Re: reporting help
is there any other way where i dont have to purchase anything? just a code hack will do as long as its working...thanks
-
Feb 23rd, 2006, 07:28 AM
#8
Thread Starter
Junior Member
Re: reporting help
and where can i see the cr viewer control? all i can see is cr activex viewer library 10.0 and there's no .sqlquery like saldiboy said..
-
Feb 23rd, 2006, 08:13 AM
#9
Thread Starter
Junior Member
Re: reporting help
i think that crystal reports need to have bound fields to make a report...
what other report can i use so i just pass a sql query and the report will automatically add the fields necessary?
-
Feb 23rd, 2006, 08:14 AM
#10
Thread Starter
Junior Member
-
Feb 24th, 2006, 07:56 AM
#11
Thread Starter
Junior Member
Re: reporting help
hi hack..i was wondering if i make a php script where it will accept the sql query from vb...and open the php script on web browser control...and the script will then make a table based on the query..but is there a way where i can wrap the table? coz when the table is wide enough like the table's width is 800..then only about 650 are printed...the rest are not...what do i make of it? anyway to fit the table on the paper or wrap it?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|