CR XI R2 Sp6 - How do you change the default printer used by the Viewer?

CR XI R2 Sp6
.NET
VS2005, C++
The app selects printer for the job as m_Report->PrintOptions->PrinterName = ss_Device;
This works nicely for printouts to the printer, but is ignored by the viewer. There, the machine default printer is always selected when I hit the print button.
Found this which is sortof similar:
http://forums.sdn.sap.com/thread.jspa?threadID=1275149
Is there any way to fix this? If no, then is it fixed in more recent versions of CR?

All of that above can be changed at runtime, but you'd somehow need to figure out what the default printer driver is on each machine and then assign it to the report.
Yes,but that is exactly what I do. The app normally uses the Windows default printer just as any C++/MFC app will do. On the file menu there is an option to select printer which calls CWinApp::OnFilePrintSetup(); which sets the application default printer setup.
In the app there is a function to retrieve the default printer:
CString CLpApp::GetDefaultPrinter()
     PRINTDLG     pd ;
     CString          printer("Failed") ;
     pd.lStructSize = (DWORD)sizeof(PRINTDLG) ;
     BOOL bRet = GetPrinterDeviceDefaults(&pd) ;
     if (bRet)
          // protect memory handle with ::GlobalLock and ::GlobalUnlock
          DEVMODE *pDevMode = (DEVMODE*)::GlobalLock(m_hDevMode) ;
          printer = pDevMode->dmDeviceName ;
          ::GlobalUnlock(m_hDevMode) ;
     return printer ;
When I print, I do:
void CSkrivDlg::StartReport(CLpReportJob^ jobb)
     jobb->SelectPrinter("",theApp.GetDefaultPrinter(),"");
     if(m_tillSkrivare)
          jobb->OutputToPrinter(1);
     else
          jobb->OutputToWindow("Fönsternamn", 0, 0, 200, 200, 0, NULL, NULL);
This works correctly for OutputToPrinter(1);, but not for OutputToWindow() which are simply wrappers for the CR functions:
bool CReportJob::OutputToPrinter(int nCopies)
     bool rc = true;
     try
          m_Report->PrintToPrinter(nCopies,true,0,0);
     catch (Exception ^e)
          TRACE("
%s",e->Message);
          m_LastError = e->Message;
          rc = false;
     return rc;
// OutputToWindow()
// a,b,c,d = Fönsterkoordinater eller noll för default
// style = flaggor för fönsterposition
// window = fönster efter vilket vi dyker upp
// child = rapportfönstrets handle om vi vill ha den
bool CReportJob::OutputToWindow(CString Namn, int a, int b, int c, int d, int style, CWnd* window, CWnd **child)
     bool rc = 0;
     CString title="Dummy1";
     title = m_Report->SummaryInfo->ReportTitle;
     CFloaterDlg *Floater = new CFloaterDlg(NULL);               // TODO: Get window
     Floater->Create(IDD_FLOATER_DLG, NULL);
     if(Floater != NULL)
          m_Report->ExportOptions->ExportFormatType = CrystalDecisions::Shared::ExportFormatType::PortableDocFormat;
          Floater->m_Viewer->ReportSource = m_Report;
          Floater->m_Viewer->Zoom(theApp.m_ScreenZoom);
          // Sätt fönsterrubrik från rapporten
          Floater->SetWindowText(title);
          // Puffa på så att den kan ändra storlek på Crystal-kontrollen
          Floater->Size();
          // Visa fönstret om det är stängt
          if(!Floater->IsWindowVisible())
               Floater->ShowWindow(SW_SHOW);
          rc = true;
          if (child!=NULL) *child=Floater;
     else
          AfxMessageBox("Kunde inte skapa fönster för utskrift",MB_OK);
          rc = false;
     return rc;
Floater is simply a dialog that holds the Viewer control.
For some reason does the Viewer not obey the printer selection done in the report

Similar Messages

  • How do you change/adjust border width for all the cells in a table created in Pages?

    How do you change/adjust border width for all the cells in a table created in Pages?
    Note- I am trying to figure out how to create and format tables in the latest version of the Pages app on an iPad air (iOS 8.1.1.1) . Creating tables, adding or removing borders for individual/all cells in a table seems straight forward. However the default border style seems to be a heavy black line. How do I change this?
    I found the option add or remove borders for all/ individual cells in a table, however I can't find any option within style/format dialogue screens for changing colour or line thickness for table cells. Likewise I can't find any clear instructions on how to do this in apple help pages or support website
    Btw- I'm assuming  it is possible to customize/adjust the colour & thickness of selected lines in a table created in this app (it's fairly easy to do this word processing apps like MS Word) please let me  know if this is not actually possible in Pages

    They know perfectly well what they took out of Pages '09.
    Well over 90 features.
    Do you think you posting feedback is going to remind them of what they did?
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Pages '09 should still be in your Applications/iWork folder.
    Archive/trash Pages 5 and rate/review it in the App Store, then get back to work.
    Peter

  • How do you change a device's name in the sound setting? For example, Let's say I want to change " logo headset" to "log microphone." Please help it's urgent!

    How do you change a device's name in the sound setting? For example, Let's say I want to change " logo headset" to "log microphone." I need to do this in order for Rosetta Stone to recognize my USB Logitech headset. I'm extremely confused. Please, just help.

    It is very difficult to offer troubleshooting suggestions when the "os version" you are using is unknown as each os has their own troubleshooting solutions.
    You can also post in your installed os section of the message board.

  • How do I change my default printer to print in grayscale?

    How do I change my default printer to print in grayscale using a MacBook Air?  I have gone to "system preferences" and "printers & scanners."  However, there is absolutely no option to change the print color scale.  I see that option when I go to a document & print, but I don't want to go through the hassle of changing to "gray scale" every time I print.  Thanks so much in advance!! 

    Hi,What operating system you are using? What application you are printing from?

  • What is the default length of time that a deleted email will be retained in the email trash before automatically deleting it? How do I change that default? I follow the instructions in the manual, but when there is no "advanced" to click on.

    What is the length of time that an email will be held in the email trash after being deleted? Also how do I change this default? I follow the instructions in the manual until it says to click on something called "advanced." There is nothing like that on the screen so I am stuck.

    Go to Settings > Mail
    Then tap on your account.
    SCROLL DOWN TO ADVANCED and tap advanced.
    Then look at Deleted Messages > Remove
    Tap on Remove and select the amount of time you want.

  • HT4191 iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.

    iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.  I've seen reference to the  "My iPhone" local storage put no mention on how you create this folder or access this folder within the Notes app.  I realize storing information in a local storage like this provides no syncing between other iDevices but that is exactly what I'm looking for.  I'm running iOS7.0.4 on a iPhone 5S, and a iPad Air.  Any help would be greatly appreciated.

    If you go to Settings > Notes > Default Account you will see "On My iPhone" as the default account and the only choice if you have not enabled syncing Notes in Settings >iCloud or Settings > Mail, Contacts, Calendars. If you have enabled syncing you can still select "On My iPhone" as the default account. When you are in the Notes app you won't see any accounts listed if you have not enabled syncing because they are all in the On My iPhone account and that is the only place possible. It is not a folder that you create.

  • How do you set a default Home Page in the Safari Applet?

    How do you set a default Home Page in the Safari Applet?

    How do you set a default Home Page in the Safari Applet?

  • How do you change password with out using cd on imac?

    How do you change password with out cd on imac?

    Please read:
    http://osxdaily.com/2011/08/24/reset-mac-os-x-10-7-lion-password/

  • How do you Change Group Sort Direction using Report Client

    It looks like there should be a sort direction property on the ISCRGroupOptions object but there is none. So how do you set the sort direction of the group?

    I tried that and it did not work. Here's the code to change the grouping, note I also change the associated sort object. I did notice that if you go into the crystal reports designer and bring up the Record Sort Export and select the group's corresponding sort that the Sort Direction radio buttons are disabled. The question is how to change the sort direction shown on the Change Group Options dialog?
            public bool GroupModify(short GroupIndex, string TableName, string ColumnName, SortDirection SortDirection)
                bool result = false;
                if ((_ReportClient != null) && (GroupIndex >= 0) && (GroupIndex < this.GroupCount()))
                    CrystalDecisions.CrystalReports.Engine.Group docGroup = _ReportDocument.DataDefinition.Groups[GroupIndex];
                    ISCRField field = _ReportClient.DataDefController.FindFieldByFormulaForm(docGroup.ConditionField.FormulaName);
                    if (field != null)
                        Group group = _ReportClient.DataDefController.GroupController.FindGroup(field);
                        if (group != null)
                            Group newGroup = group.Clone();
                            newGroup.ConditionField = FieldGet(TableName, ColumnName);
                            if ((newGroup.ConditionField != null) && (_ReportClient.DataDefController.GroupController.CanGroupOn(newGroup.ConditionField)))
                                _ReportClient.DataDefController.GroupController.Modify(group, newGroup);
                                result = this.SortSet(TableName, ColumnName, SortDirection);
                return result;
            public bool SortSet(string TableName, string ColumnName, SortDirection SortDirection)
                bool successful = false;
                if (_ReportClient != null)
                    ISCRField field = FieldGet(TableName, ColumnName);
                    if (field != null)
                        ISCRSort sort = _ReportClient.DataDefController.SortController.FindSort(field);
                        if (sort != null)
                            _ReportClient.DataDefController.SortController.ModifySortDirection(sort, CRSortDirection(SortDirection));
                return successful;
            public int GroupCount()
                int count;
                if (_ReportClient != null)
                    count = _ReportClient.DataDefController.DataDefinition.Groups.Count;
                else
                    count = 0;
                return count;

  • How do you change values after logging data to the citadel database (DSC)?

    How would one go about changing values that already exist in the citadel database.  So say I were logging a numeric value with a timestamp for 1 year and then wanted to change a few values for the month of June because my sensor wasn't working at that time.  How could I do this?  Is it possible without re-creating the whole database over?
    Thanks
    Matt

    mattyk wrote:
    Hey Ben,
    Thanks for the quick response.  I called NI and asked about this because this would be a big show stopper for me.  Their applications engineer said that the best way to change previous data would be to read in the trace that you want to change, modify it and save it as a new trace.  I am also looking into SQL querying.  I was able to connect to the citadel database by setting up a ODBC data source and using the database connectivity toolkit to query the database.  This worked.  Now I am trying to come up with a statement in SQL to change previously saved data.  I'll Keep you posted.
    Thanks
    Matt
    That reinforces my suspicions.
    I have an app running for about 8 years now that keeps a paper trail to enusr ethe cartdiges used in respirators (operated NIOSH National Institute of Occupational Safety and Health par teh CDC) that use DSC to enusre nobody can ever falsify those records. If they can be hacked I my customer and anyone using a respirator with a NIOSH sticker on the side of it, want to know.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How do you change your user name associated with the app store on the iphone 3G. When attempting to update, it is using an old email address that has since been changed at the apple site. The problem is that my phone does not seem to recognize this.

    I have exausted my ideas, and turn to the forum, prior to paying for something that may be a 2second simple fix. Please help if you can. Let me know if you need more info to understand my dilema.
    Thanks.

    Apps are permanently tied to the Apple ID used to purchase them.  You will always be asked for the password associated with this ID when updating apps, regardless of whether or not you are using this ID for current purchases.  The only way to stop this is to delete the old apps from your phone and iTunes and repurchase them with your current ID.
    Edit: to change the ID used for future purchases on your phone, go to Settings>Store>Apple ID, tap the ID shown, sign out, sign back in using the new ID.  As explained above, you will still be prompted with the old ID when updating apps purchase with the older ID.
    Message was edited by: randers4

  • HT204053 How do you change your region when iTunes and the App Store keep changing it

    I live in china but I'm from Canada and my iTunes is linked to Canada.  Twice so far this year I have had my iTunes, App Store, and iBooks all convert to the Chinese sites. I am trying to put it back to Canada but for some reason it won't change. My region is still Canada so I'm not quite sure what is going on. Can anyone help?

    Apps are permanently tied to the Apple ID used to purchase them.  You will always be asked for the password associated with this ID when updating apps, regardless of whether or not you are using this ID for current purchases.  The only way to stop this is to delete the old apps from your phone and iTunes and repurchase them with your current ID.
    Edit: to change the ID used for future purchases on your phone, go to Settings>Store>Apple ID, tap the ID shown, sign out, sign back in using the new ID.  As explained above, you will still be prompted with the old ID when updating apps purchase with the older ID.
    Message was edited by: randers4

  • How do you change song start quickly without dragging the little square?

    I have a song starting at bar 300 and I want to move the start to bar 1. How can you do this quickly without haveing to move the square box. The box is very slow and time consumeing with time start.
    Thanks

    create a keyboard shortcut. Hit option k, which brings up the key commands window.
    In the spotlight upper right hand corner type "go to position."
    A menu will come up which displays the all the go. The one in particular has black bullet which says "go to position" Click on that one.
    Now to the right of that menu you'll see several radial buttons. Press the one which says, "learn by key label".
    Now assign a key of you own. I used the comma which looks like , that. If you have nothing assigned to the comma it will make that go to position the , (comma) key command, which is only accessed by a key command. (thats what those black bullets mean in front of the huge menu).
    close the key commands and press the comma key. A new window will show up called the "Go to Postion". Type in the bar or the smpte and it will automatically go to that postion. Press space bar which is the global command for play.
    you'll be at bar 1 or 300 instantly! create key commands of your own with those above techniques especially when things get repetitive.
    Dual G 5 2.5 ghz hightower   Mac OS X (10.4.5)   1 gig

  • HT3529 How do you change phone number iPad Uses

    My wife's iPad mini is stuck with my iPhone number for messages?
    Wher do I change it.
    The Settup let's you change Email, but not phone numbers?

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
     Cheers, Tom

  • How do you change from UK app store to the Philippines app store while still keeping your UK balance?

    I have an iPad mini that is currently on the UK app store but I want to get onto the Philippines app store but still keep the money on my account. How do I do this?

    You can't. To use another country's store you must have an Apple ID in that country, an iTunes account in that country together with a local billing address and local bank-issued credit card.
    Contact iTunes Support - http://apple.com/emea/support/itunes/contact.html - and ask them to clear your balance.
    How to manage unused iTunes Gift Card & Gift Certificate balances

Maybe you are looking for

  • Cannot Access the internet on my Mac

    I have a MacPro, running 10.5.1 (although when this problem began it was probably a newer version the OS if there was one). I moved offices about 2 months ago-- same facility, same network. After one day in the new digs, my internet and network acces

  • Setting up a Mac OS 10.6 Server for the first time

    I'm new to servers, and I would like to set up a Mac Mini Server for my network. There would be 3 Windows clients running Vista Home Premium and 2 Mac OS 10.5 clients. I want to be able to log-in on any computer to an account from the server. Then I

  • I want lagging spaces to be written in the output file ..!

    Hi Gurus, Just check the below. data v_string type string. v_string = '     abcd        '. Open dataset v_file for output in text mode encoding utf-8. transfer v_string to v_file. close dataset v_file. and my file just has the following and I need th

  • Software license management in SAP

    Dear All, Greetings.. One of our customer is looking for license issuance functionality for their software product. The process that need to be mapped is ~ Manage Licenses - Create Server - Assign Products - Generate Licenses Can you please help us i

  • Run https and http in parallel for a site

    I have Mac OS X Lion Server 10.7.2 and things are more complicated than with 10.6. I need to have https enabled for the only website on my system since it uses wiki and calendar. However, I also have some other pages I want to be accessible without s