Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 5 of 5

printing: the parameter is incorrect if not geoPrintMap

This is a discussion on printing: the parameter is incorrect if not geoPrintMap within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, I'm trying to print with following code (prntDlg is a printer dialog form). The problem is in the geoPrintArea, ...

  1. #1
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    printing: the parameter is incorrect if not geoPrintMap

    Hi,

    I'm trying to print with following code (prntDlg is a printer dialog form). The problem is in the geoPrintArea, if it is 0 (geoPrintMap) then it print ok, but any other value (1..5) gives: 'the parameter is incorrect' error. Anyone know what the problem could be ?

    Code:
                MP.ActivePrinter = prntDlg.SelectedPrinter.Items[prntDlg.SelectedPrinter.SelectedIndex].ToString();
                MP.ActiveMap.PrintOut("",
                                      prntDlg.Title.Text,
                                      (int)prntDlg.Count.Value,
                                      (GeoPrintArea)prntDlg.GeoPrint,
                                      (GeoPrintQuality)prntDlg.Quality,
                                      (GeoPrintOrientation)prntDlg.Orientation,
                                      prntDlg.Collate.Checked,
                                      prntDlg.Legend.Checked,
                                      prntDlg.Overview.Checked,
                                      prntDlg.Faxable.Checked);

  2. #2
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    Wilfried,

    I've used this option before so I know it works. Have you tried the names of the enum types (geoPrintDirections, geoPrintHighlightedPlaces, geoPrintMap, geoPrintSelectedArea, geoPrintStripMaps, geoPrintTurnByTurn and geoPrintFullPage) instead?


    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

  3. #3
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi Richard,

    I tryed one of them and _yes_ it works Thanks. Still find it strange wy the typecast wont work. It works for all other parameters.

  4. #4
    Joel is offline Junior Member White Belt
    Join Date
    Aug 2003
    Posts
    10
    Quote Originally Posted by Wilfried
    Hi Richard,

    I tryed one of them and _yes_ it works Thanks. Still find it strange wy the typecast wont work. It works for all other parameters.
    What type of variable is GeoPrint? I'm guessing that whatever it is, isn't compatible with the cast. 0 will always cast fine. But if the cast is losing precision (or adding), then that will mess things up.

    Joel

  5. #5
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    integer, so must be valid, but to be sure I should try it again, because this method gives 'the parameter is incorrect' error when there is a print option set that should not be there, eg route if there is no route. And by the time I asked this question I did not check for these things.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. "The parameter is incorrect"
    By Jaba in forum MapPoint Desktop Discussion
    Replies: 9
    Last Post: 02-15-2005, 02:44 PM
  2. Incorrect locations?
    By harris00 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-25-2004, 11:40 PM
  3. byte parameter
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 05-22-2004, 06:12 AM
  4. How can i find address by passing Lat/Lon as parameter?
    By joesebi in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-09-2003, 10:10 AM
  5. link data wizard won't let me use parameter queries
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 08-23-2002, 11:14 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27