none
Question regarding printing in Visual Basic RRS feed

  • Question

  • Hi,

    I am trying to set up a report to print information from my database.  The thing is, I have used lookup tables and so my main table is full of numeric representations of the data, so simply dropping the field onto the report designer shows numbers, and not the words they represent.  I'm not sure how to establish the link back to those lookup tables from the context of the report designer. 

    Any help would be appreciated.
    • Moved by Riquel_DongModerator Thursday, August 14, 2008 3:06 AM ReportViewer issue (Moved from Visual Basic Language to Visual Studio Report Controls)
    Saturday, August 9, 2008 9:50 PM

Answers

  • personally I wouldn't try to make the reportviewer do all that work.  Much easier to do it programatically in my opinion.  Why don't you just form the data properly first, with all the right values and then hand that to the reportviewer instead?

    Most databases are setup with relationships like what you speak of, the thing is that when people retrieve data, they join tables together and get the actual data needed for the user.


    Living my life at 123mph in 11.15 seconds
    Monday, August 18, 2008 1:56 PM

All replies

  • I'm hoping someone can help me with this.

    Thanks
    Tuesday, August 12, 2008 6:39 AM
  • Hi Jason,

    Which report tool do you use? Is it the reportviewer control or the crystal report?

    Best regards,
    Riquel

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Wednesday, August 13, 2008 7:04 AM
    Moderator
  • I am trying to do it with the reportviewer control.
    Wednesday, August 13, 2008 4:00 PM
  • Anyone have any help with this?  Using the report viewer. and/or crysta reports would really make my life easy... (I think)

    I'd like to figure out how to do this in both the report viewer, and in crystal reports basic... but I'm a little stuck at the moment.
    Friday, August 15, 2008 9:38 PM
  • ok, well the question is, how do you decode your numeric representations normally?
    Living my life at 123mph in 11.15 seconds
    Saturday, August 16, 2008 12:02 PM
  • well, the logic of my set up is as follows:

    Entry form(created in data designer) has text boxes and combo boxes for entry.  The comboboxes populate their data using lookup tables, displaymember/value member stuff, where they take a display field and a value field from a lookup table, and then enter the value field number into a column in the main table. 

    eg:

    member.firstname varchar
    member.lastname varchar
    member.city int

    cities.CityID int
    cities.CityName varchar

    the cities.CityID goes into member.city.... the lookup table displays city.cityname, but uses cityID as the value.

    this works easily via the data designer in entry forms.  The question is, how to do the same kind of thing via the reportview control.

    I want to be able to have the reportview use the fields from table member, but display the cities.CityName string, and not the member.city int.

    Does that make sense?

    right now, when I pull the field member.city it is displaying the NUMBER value that is contained in that field.  I want it to display the city.CityName field that it represents.
    • Edited by Jason Archibald Sunday, August 17, 2008 1:47 AM added a little punctuation
    Sunday, August 17, 2008 1:45 AM
  • personally I wouldn't try to make the reportviewer do all that work.  Much easier to do it programatically in my opinion.  Why don't you just form the data properly first, with all the right values and then hand that to the reportviewer instead?

    Most databases are setup with relationships like what you speak of, the thing is that when people retrieve data, they join tables together and get the actual data needed for the user.


    Living my life at 123mph in 11.15 seconds
    Monday, August 18, 2008 1:56 PM