How To Disable Pop Up Message Which Display Query During Print Preview.
While going for print preview in bar tender using SDK and while clicking on print preview i am getting a pop up message that contains query, is there any way to disable or avoid that pop up message so that i can go to print preview directly without getting query during the process.
-
Shotaro Ito
★ BarTender Hero ★
Hi Phaneendra,
From BarTender .net Print SDK, Query prompt cannot be disabled unless Window visibility is set to None.
However you can specify value from QueryPrompts[<Query prompt name>].Value, and dialog won't be shown when all query prompt values have set.
You can disable other dialogs from SDK - like below.
[code]
//Assume btFormat is LabelFormat object, and
//Engine.Window.VisibleWindows is Seagull.BarTender.Print.VisibleWindows.InteractiveDialogs (or All).
//Set query prompt value
btFormat.DatabaseConnections.QueryPrompts["QueryPrompt1"].Value="0001";
//Disable record selection dialog
btFormat.PrintSetup.SelectRecordsAtPrint = false;
//Disable user prompt
btFormat.PrintSetup.EnablePrompting = false;
[/code]
hope that helps!0 -
Legacy Poster
★ BarTender Hero ★
No it doesnt help me, i have tried with your code even then i am not able to handle this pop up message. For your ref. I have attached the screen shot of that pop up msg.http://picasaweb.google.com/lh/view?hl=en&gbv=2&biw=1280&bih=843&q=Prompt_at_print_preview&gs_sm=s&gs_upl=0l0l0l33681l0l0l0l0l0l0l0l0ll0l0&ie=UTF-8&sa=N&tab=iq#5671027821815792514 0 -
Shotaro Ito
★ BarTender Hero ★
Mmm, I cannot find the attached - Could you tell me what message is shown on the popup?
If that's error / warning message, please tell me the message # too.0 -
The screenshot was in the Picasa link. I attach it here for convenience. 0 -
I don't recognize this message as coming from BarTender. Based on the title of the Window and its content, it seems more likely that this is a message box from your application, which you used for testing the value of the SQL statement passed to BarTender for debugging purposes. Check your code for such a function call and either comment it out or remove it.
If this is not the case though...
1. Do you get this appear when using the BarTender application manually?
2. Test to see if this is label format related by creating a simple label that connects to the same database in a similar way with just a couple of linked label objects.
3. In the database set-up for the label format, select the "Options" tab, click the "OLE DB Messages" button and tick the "Ignore all errors" check box and save the label. Does that make any difference?0 -
Shotaro Ito
★ BarTender Hero ★
Thanks Phaneendra, Ian, I can see the popup now.
It looks you show popup dialog if any message is returned, right?
Yes, without good reason, it looks .net Print SDK Print method returns Message #1200:Information:SQL Statement in messages object, even the message has been disabled in BarTender's Administer > Application Message setup.
Since this message is just information, you can ignore this message in your code.
Something like below.
[code]
// Print the format.
btFormat.Print(btFormat.BaseName, out messages);
// Show all messages but #1200
string result = "";
foreach (Seagull.BarTender.Print.Message m in messages){
if (m.ID != 1200)
{
result = result + m.ID + ":" + m.Severity + ":" + m.Text + "\r\n";
}
}
if (result != "")
{
MessageBox.Show(result);
}
[/code]
I'll check the current behavior is intended or not.0 -
Legacy Poster
★ BarTender Hero ★
messageString = messages.Where(m=>m.ID != 1200).Aggregate("Messages:" , (current, message) => current + ("\n\n" + message.Text));
0 -
Legacy Poster
★ BarTender Hero ★
Hi.
I've Failure Message on this code and nothing print, but sometimes it prints and show message// Start the BarTender print engine. btEngine.Start(); // Open a format. LabelFormatDocument btFormat = btEngine.Documents.Open(labelpath, printer); ((OLEDB)btFormat.DatabaseConnections[0]).SQLStatement = SQL; btFormat.PrintSetup.IdenticalCopiesOfLabel = copies; Messages btMessages; // Print the format. Result nResult = btFormat.Print("OUT Sticker", out btMessages); if (nResult != Result.Success) { foreach (Message m in btMessages) alert += "Category = " + m.Category + " ID = " + m.ID + " Severity = " + m.Severity + " Text = " + m.Text + " "; //"Text = " + m.Text; }
Category = Printer ID = 1200 Severity = Information Text =
SQL Statement: SELECT "Article", "Date Insert",
"Description", "GuidNo", "ID",
"Param1", "Param10", "Param11",
"Param12", "Param13", "Param14",
"Param15", "Param16", "Param17",
"Param18", "Param19", "Param2",
"Param3", "Param4", "Param5", "Param6",
"Param7", "Param8", "Param9", "Printer
Name", "Processed", "Qty", "Request Necessary
Date", "RequestId", "SAD No_ Barcode", "Ship-to
Priority", "SN", "Sticker No_", "TQty",
"User", "WO Reqd_ Date", "WO Reqd_ WeekDay" FROM
"dbo"."xxxxxxxxx" WHERE
"GuidNo" = '4C3176D2-E0BC-4A42-99F5-B047AA8DC45C' ORDER BY
"ID" "
It's on Zebra ZM400. But this format at the same time sucessfully prints on other printers (ZM400, Z4MPlus)
After restart server it works correctly till some point.What could be the problem?
Driver on all ZM400 identical ... Seagull
Bartender version: 9.010
Please sign in to leave a comment.
Comments
8 comments